lkml.org 
[lkml]   [2001]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: "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/

\
 
 \ /
  Last update: 2005-03-22 12:56    [W:1.172 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site