All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Christian Lamparter <chunkeey@googlemail.com>
Cc: Oleksij Rempel <linux@rempel-privat.de>,
	Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	Seth Forshee <seth.forshee@canonical.com>,
	ath9k_htc_fw <ath9k_htc_fw@lists.infradead.org>,
	USB list <linux-usb@vger.kernel.org>,
	<linux-wireless@vger.kernel.org>
Subject: Re: FUSB200 xhci issue
Date: Fri, 9 Aug 2013 10:13:52 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1308091011130.1405-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <201308090006.07690.chunkeey@googlemail.com>

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


  parent reply	other threads:[~2013-08-09 14:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <51ED4E12.8030006@rempel-privat.de>
2013-07-22 19:54 ` FUSB200 xhci issue Christian Lamparter
2013-07-22 20:47   ` Oleksij Rempel
2013-07-22 21:23     ` Christian Lamparter
2013-07-23  4:59       ` Oleksij Rempel
2013-07-23 18:26         ` Christian Lamparter
2013-07-24 10:37           ` Oleksij Rempel
2013-07-27 21:59             ` Christian Lamparter
2013-07-28  5:50               ` Oleksij Rempel
2013-07-28 11:38                 ` Christian Lamparter
2013-07-28 12:12                   ` Oleksij Rempel
2013-07-28 14:28                     ` Oleksij Rempel
2013-07-28 20:41                       ` Christian Lamparter
2013-07-31  6:52                         ` Oleksij Rempel
2013-08-08 15:35                           ` Oleksij Rempel
2013-08-08 19:09                             ` Christian Lamparter
2013-08-08 20:19                               ` Alan Stern
2013-08-08 22:06                                 ` Christian Lamparter
2013-08-09  2:52                                   ` Sujith Manoharan
2013-08-09 14:32                                     ` ath9k_htc firmware problem [was: Re: FUSB200 xhci issue] Alan Stern
2013-08-09 14:13                                   ` Alan Stern [this message]
2013-08-09 14:34                                     ` FUSB200 xhci issue Oleksij Rempel
2013-08-09 14:52                                       ` Alan Stern
2013-08-09 15:51                                         ` Oleksij Rempel
2013-08-09 17:16                                           ` Alan Stern
2013-08-09 18:53                                             ` Oleksij Rempel
2013-08-09 19:32                                               ` Alan Stern
2013-08-10  6:19                                                 ` Oleksij Rempel
2013-08-10 11:57                                                   ` Alan Stern
2013-08-12  7:58                                                     ` Oleksij Rempel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44L0.1308091011130.1405-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=ath9k_htc_fw@lists.infradead.org \
    --cc=chunkeey@googlemail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=seth.forshee@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.