From: Fumitoshi UKAI <ukai@debian.or.jp>
To: linux-hotplug@vger.kernel.org
Subject: Re: Forward: hotplugging usb-storage: bcdDevice at fault?
Date: Fri, 18 Jan 2002 03:10:15 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-101132349115633@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-101128461527545@msgid-missing>
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
next prev parent reply other threads:[~2002-01-18 3:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-17 16:22 Forward: hotplugging usb-storage: bcdDevice at fault? Fumitoshi UKAI
2002-01-17 20:22 ` David Brownell
2002-01-18 3:10 ` Fumitoshi UKAI [this message]
2002-01-18 8:03 ` Matthew Dharm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-hotplug-101132349115633@msgid-missing \
--to=ukai@debian.or.jp \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).