Re: FUSB200 xhci issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 09.08.2013 16:13, schrieb Alan Stern:
On Fri, 9 Aug 2013, Christian Lamparter wrote:

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.

I was not able to find good direct way to check firmware version. If i would add some new command then i will get option like: if responding FW is updated; if not, then dead or old. How about overwriting iProduct field? Let say, if iProduct == ath9k_htc, then firmware is updated? Is it more or less acceptable method? I need to ask this because it is really new for me.
--
Regards,
Oleksij
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux