On Sun, Jan 23, 2011 at 05:03:18AM +0000, Jacob Meuser wrote: > NetBSD (where our usb stack came from) has a /dev/usb device node. > this node exists primarily for reading usb events. however, we > do not create /dev/usb, which means we have no way to get the usb > events. usb events are device/driver attach/detachments. we have > hotplug(4) to get this info. > > I don't see any reason to keep the usb event handling. > > thoughts? ok? > > PS notice how some drivers only do one of attach and detach instead of > both, and that some drivers don't do either ...
<snip> > @@ -717,83 +630,6 @@ usbioctl(dev_t devt, u_long cmd, caddr_t > return (0); > } > > -int > -usbpoll(dev_t dev, int events, struct proc *p) > -{ > - int revents, mask, s; > - > - if (minor(dev) == USB_DEV_MINOR) { > - revents = 0; > - mask = POLLIN | POLLRDNORM; > - > - s = splusb(); > - if (events & mask && usb_nevents > 0) > - revents |= events & mask; > - if (revents == 0 && events & mask) > - selrecord(p, &usb_selevent); > - splx(s); > - > - return (revents); > - } else { > - return (POLLERR); > - } > -} sigh. this is needed as well. obviously. sorry about that ... -- jake...@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org Index: conf.h =================================================================== RCS file: /cvs/src/sys/sys/conf.h,v retrieving revision 1.109 diff -u -p conf.h --- conf.h 8 Jan 2011 19:45:09 -0000 1.109 +++ conf.h 23 Jan 2011 05:25:32 -0000 @@ -396,7 +396,7 @@ extern struct cdevsw cdevsw[]; #define cdev_usb_init(c,n) { \ dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \ (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \ - (dev_type_stop((*))) enodev, 0, dev_init(c,n,poll), \ + (dev_type_stop((*))) enodev, 0, selfalse, \ (dev_type_mmap((*))) enodev } /* open, close, write, ioctl */