[PATCH] Eagle and ADI 930 usb adsl modem driver

Duncan Sands duncan.sands at math.u-psud.fr
Tue Nov 1 07:40:41 EST 2005


Hi Andrew,

> > +/*
> > + * 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);
> > +}
> 
> egad.   Is there no better way?

this code looks like a 'orrible hack to work around a common problem
with USB modem's of this type: if the modem is plugged in while the
system boots, the driver may look for firmware before the filesystem
holding the firmware is mounted; I guess the delay usually gives
the filesystem enough time to be mounted.  I'm told that the correct
solution is to stick the firmware in an initramfs as well.  That's a
pity: it would be nice if users could just dump the firmware in an
appropriate directory and have everything work [*].  As it is, they
also have to regenerate an initramfs.

Ciao,

Duncan.

[*] For legal reasons, users usually have to download and install
the firmware themselves.  For the speedtouch modems I don't know
of any distribution which comes with the firmware preinstalled.



More information about the Usbatm mailing list