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