Thread (29 messages) 29 messages, 4 authors, 2013-08-12

Re: FUSB200 xhci issue

From: Alan Stern <stern@rowland.harvard.edu>
Date: 2013-08-09 14:13:53

On Fri, 9 Aug 2013, Christian Lamparter wrote:
quoted
After loading firmware, a reset generally is necessary.  Some devices 
will do it themselves; others require you to call usb_reset_device().
This makes things complicated. Because, as far as I remember,
usb_reset_device() will cause the current driver to be unbound
unless its called during .probe, right?
If the driver defines pre_reset and post_reset methods, it won't get 
unbound during a reset.
You see, ath9k_htc loads its firmware asynchronously in ".probe"
(ath9k_htc's .probe routine finishes before the firmware is
retrieved via the firmware loader helper... so part of the
firmware download is done in a firmware_complete callback
on a workqueue). 

So, if we call usb_reset_device there and the driver is unbound
and later rebound. the next ath9k_htc .probe will start again and
again and again not knowing that it is already initialized 
(and we have a loop).


This could be solved, if the devices changes the usb-id again 
when a proper "wifi" ath9k_htc firmware was downloaded. So, the
driver would know that it doesn't have to download and reset
the device... But we need a "free" USB-ID for that.
What about a "get firmware version" sort of thing?  There really should 
be a way for the driver to tell whether the firmware has already been 
updated.

Alan Stern
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help