Re: [PATCH] Eagle and ADI 930 usb adsl modem driver

From: Duncan Sands
Date: Tue Nov 01 2005 - 07:46:18 EST


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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/