From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: [linux-usb-devel] [PATCH] fix some hubs and hid devices at startup
Date: Tue, 12 Mar 2002 22:52:36 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-101597414801392@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-101588456410451@msgid-missing>
On Tue, Mar 12, 2002 at 02:15:05PM -0800, David Brownell wrote:
> > > It doesn't make sense to me that if more delays are added in
> > > the kernel code, userland needs to see even more.
> >
> > I agree, but Olaf and others prove that this works.
>
> There was that hypothesis that it's really control traffic
> interference ... I notice that usb_control_msg() chose
> against the "keep the setup data in struct usb_device
> and lock it with a semaphore" strategy (it kmallocs
> the setup buffer), so I could see how that'd happen.
It's always been this way, right?
> "usbmodules" asks the device for its config descriptor,
> rather than reading /proc/bus/usb/BBB/DDD, so HCDs
> that don't handle control queuing (I think OHCI behaves
> there, and EHCI, but not the UHCIs) might suffer from
> concurrent control messages from it and from HID ...
>
> I think the best that can be done for now would be a
> hack: add a lock in usb_device that must be held
> by whoever submits a control request, and released
> when that request completes. The non-hack solution
> is to support control queuing in all HCDs.
>
> What kind of lock? Maybe that binary semaphore.
> Code that needs to issue control requests in_interrupt()
> would need to be modified, as would usb_control_msg().
Yes, this would be the best way. I don't think it's a hack, as some
drivers (like the usb-storage one) have said that they really need to
lock the control pipe for a while to prevent things from happening out
of order (for very dumb devices.)
> Usbmodules is used to cope with /sbin/hotplug not providing
> a complete interface descriptor dump: it only shows the first
> of N inferface descriptors. With coldplug, it doesn't run, and
> doesn't provide any descriptors at all -- so it must be used.
>
> However, even for the hotplug case "usbmodules" gives a
> more complete module list. In the case of an audio device
> with a sound/ISO interface and a control/HID interface, it'll
> pick up the HID.
Ah, thanks for explaining this, makes more sense now.
greg k-h
_______________________________________________
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-03-12 22:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-11 22:08 [linux-usb-devel] [PATCH] fix some hubs and hid devices at startup Johannes Erdfelt
2002-03-12 0:20 ` David Brownell
2002-03-12 20:27 ` Greg KH
2002-03-12 20:29 ` Greg KH
2002-03-12 22:15 ` David Brownell
2002-03-12 22:52 ` Greg KH [this message]
2002-03-13 1:52 ` David Brownell
2002-03-14 13:21 ` Olaf Hering
2002-03-15 18:28 ` Greg KH
2002-05-15 20:25 ` David Brownell
2002-05-15 20:37 ` Olaf Hering
2002-05-15 21:37 ` Johannes Erdfelt
-- strict thread matches above, loose matches on Subject: below --
2002-05-15 20:08 Olaf Hering
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-101597414801392@msgid-missing \
--to=greg@kroah.com \
--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).