Messages in this thread | | | Date | Mon, 05 Feb 2001 10:23:37 -0600 | From | Eric Sandeen <> | Subject | Re: "kaweth" usb ethernet driver in 2.4? |
| |
Ok, so the problem with the current driver is that it will attempt to load the firmware even if firmware is already loaded. This will hang the device.
The trick is to look at the device release number (dev->descriptor.bcdDevice) - if no firmware is present, it returns 0x0002, if firmware is present, it returns 0x0202.
The second trick is to explicitly call usb_get_device_descriptor() before checking this, as it seems to be cached otherwise. Brad and I had a simultaneous revelation on this one. :)
Adding this test before the (firmware download, fix download, firmware trigger) sequence makes things work much more reliably, although it still fails occasionally if the device is plugged in after the driver is loaded - fails on usb_get_device_descriptor() for some reason... perhaps a short delay before re-reading the desriptor might help? (just guessing here...)
Patches sent to Brad & Michael.
-Eric - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |