From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fumitoshi UKAI Date: Fri, 18 Jan 2002 03:10:15 +0000 Subject: Re: Forward: hotplugging usb-storage: bcdDevice at fault? Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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