From: Greg KH <greg@kroah.com>
To: Duncan Sands <duncan.sands@math.u-psud.fr>
Cc: Oliver Neukum <oliver@neukum.org>,
linux-usb-devel@lists.sourceforge.net,
usbatm@lists.infradead.org,
matthieu castet <castet.matthieu@free.fr>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [linux-usb-devel] Re: [PATCH] Eagle and ADI 930 usb adsl modem driver
Date: Wed, 2 Nov 2005 13:39:39 -0800 [thread overview]
Message-ID: <20051102213939.GB23247@kroah.com> (raw)
In-Reply-To: <200511020952.56673.duncan.sands@math.u-psud.fr>
On Wed, Nov 02, 2005 at 09:52:56AM +0100, Duncan Sands wrote:
> On Wednesday 2 November 2005 09:45, Oliver Neukum wrote:
> > Am Mittwoch, 2. November 2005 09:03 schrieb Greg KH:
> > > On Wed, Nov 02, 2005 at 08:54:22AM +0100, Duncan Sands wrote:
> > > > > > + * sometime hotplug don't have time to give the firmware the
> > > > > > + * first time, retry it.
> > > > > > + */
> > > > > > +static int sleepy_request_firmware(const struct firmware **fw,
> > > > > > + const char *name, struct device *dev)
> > > > > > +{
> > > > > > + if (request_firmware(fw, name, dev) == 0)
> > > > > > + return 0;
> > > > > > + msleep(1000);
> > > > > > + return request_firmware(fw, name, dev);
> > > > > > +}
> > > > >
> > > > > No, use the async firmware download mode instead of this. That will
> > > > > solve all of your problems.
> > > >
> > > > Hi Greg, it looks like you understand what the problem is here. Could
> > > > you please explain to us lesser mortals ;)
> > >
> > > If you use the async mode, there is no timeout. When userspace gets
> > > around to giving you the firmware, then you continue on with the rest of
> > > your device initialization (don't block the usb probe function though.)
> >
> > How would you handle errors in setting up the device?
> > A driver cannot reject a device after probe, yet you need to handle
> > errors appearing only after the firmware is in the device.
>
> Isn't that the case anyway with the sync version?
Yes.
> After all, sync loading of firmware from the probe method is
> unacceptable, since it can block khubd for a long time (also, if the
> firmware lives on a USB device that gets disconnected just as probe
> for the device that loads firmware is called, or some variation of
> this theme, couldn't horrible blockage happen?).
Yes it could. That's why you should use the async version :)
One of these days I'll start multi-threading the device probe stuff, and
it will not be that big of a deal...[1]
thanks,
greg k-h
[1] Yes, I know the usb core and drivers will not expect this, and work
will be needed to get this working properly.
next prev parent reply other threads:[~2005-11-02 23:30 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-29 22:37 matthieu castet
2005-10-31 23:58 ` Andrew Morton
2005-11-01 12:40 ` Duncan Sands
2005-11-01 13:04 ` David Woodhouse
2005-11-01 13:12 ` Marco d'Itri
2005-11-02 7:42 ` Duncan Sands
2005-11-02 7:45 ` David Woodhouse
2005-11-02 8:02 ` Duncan Sands
2005-11-02 10:46 ` Roman Kagan
2005-11-02 11:01 ` Duncan Sands
2005-11-01 13:49 ` matthieu castet
2005-11-02 5:29 ` Andrew Morton
2005-11-02 22:27 ` Greg KH
2005-11-02 7:45 ` Duncan Sands
2005-11-01 14:08 ` matthieu castet
2005-11-02 5:34 ` Andrew Morton
2005-11-02 7:47 ` Duncan Sands
2005-11-01 22:45 ` Greg KH
2005-11-02 7:54 ` Duncan Sands
2005-11-02 8:03 ` Greg KH
2005-11-02 8:45 ` [linux-usb-devel] " Oliver Neukum
2005-11-02 8:52 ` Duncan Sands
2005-11-02 21:39 ` Greg KH [this message]
2005-11-02 21:37 ` Greg KH
2005-11-02 15:56 ` Alan Stern
2005-11-02 20:15 ` matthieu castet
2005-11-02 21:18 ` matthieu castet
2005-11-07 17:47 ` Greg KH
2005-11-06 18:44 ` matthieu castet
2005-11-07 17:47 ` Greg KH
2005-11-07 17:46 ` Greg KH
2005-11-07 18:47 ` matthieu castet
2005-11-07 22:27 ` matthieu castet
2005-11-07 23:02 ` matthieu castet
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=20051102213939.GB23247@kroah.com \
--to=greg@kroah.com \
--cc=castet.matthieu@free.fr \
--cc=duncan.sands@math.u-psud.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=oliver@neukum.org \
--cc=usbatm@lists.infradead.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
all inboxes | Powered by JetHome®