Hrm... this isn't right. We discussed this a long time ago, and decided that the better way to do this was to use an "or equals" comparison on one end. The idea was that the common construct was to say that "devices up to revisions x.xx have this bug", so the comparison was supposed to be ">= and <" The kernel was supposed to be changed long ago, but I guess it never got done. Matt On Fri, Jan 18, 2002 at 12:10:15PM +0900, Fumitoshi UKAI wrote: > At Thu, 17 Jan 2002 12:22:39 -0800, > David Brownell wrote: > > > > The match algorithm in userland is supposed to be exactly > > the same as that in the kernel. If it doesn't do the same thing, > > then fix the userland version ... > > Ok. The match algorithm about device_id in kernel drivers/usb/usb.c: > usb_match_id() as follows: > > /* No need to test id->bcdDevice_lo != 0, since 0 is never > greater than any unsigned number. */ > if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) && > (id->bcdDevice_lo > dev->descriptor.bcdDevice)) > continue; > > if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) && > (id->bcdDevice_hi < dev->descriptor.bcdDevice)) > continue; > > I believe this code has not been changed, according to > http://linuxusb.bitkeeper.com:8088/usb-2.4/anno/drivers/usb/usb.c@1.23?nav=index.html|src/.|src/drivers|src/drivers/usb > > So, I'll apply the following patch. > > Index: etc/hotplug/usb.agent > =================================================================== > RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/usb.agent,v > retrieving revision 1.18 > diff -u -u -r1.18 usb.agent > --- etc/hotplug/usb.agent 2002/01/14 17:04:19 1.18 > +++ etc/hotplug/usb.agent 2002/01/18 03:01:59 > @@ -233,9 +233,9 @@ > continue > fi > > - # bcdDevice_lo <= bcdDevice < bcdDevice_hi > + # bcdDevice_lo <= bcdDevice <= bcdDevice_hi > if [ $USB_MATCH_DEV_HI -eq $(( $match_flags & $USB_MATCH_DEV_HI )) ] && > - [ $usb_bcdDevice -ge $bcdDevice_hi ]; then > + [ $usb_bcdDevice -gt $bcdDevice_hi ]; then > continue > fi > > Regards, > Fumitoshi UKAI > > _______________________________________________ > Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net > Linux-hotplug-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel -- Matthew Dharm Home: mdharm-usb@one-eyed-alien.net Maintainer, Linux USB Mass Storage Driver I see you've been reading alt.sex.chubby.sheep voraciously. -- Tanya User Friendly, 11/24/97