linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Julien Massot <jmassot@aldebaran-robotics.com>
Cc: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>,
	Kalle Valo <kvalo@qca.qualcomm.com>,
	linux-wireless@vger.kernel.org, ath6kl-devel@qca.qualcomm.com
Subject: Re: ath6kl: AR6004 failed to start on computer boot
Date: Thu, 21 Feb 2013 11:06:27 -0600	[thread overview]
Message-ID: <51265413.9080609@lwfinger.net> (raw)
In-Reply-To: <CADGp=QfOyyTpwEg1=XXiyvRE7ZOGsn6TfiPQHs3+Jc3C69RM6Q@mail.gmail.com>

On 02/21/2013 08:03 AM, Julien Massot wrote:
> Hi,
> I just find a quick and dirty patch to workaround this issue.
> I just reset the device on initialization failure.
>
> I hope this helps to understand the real issue.
>
> [    7.012514] usb 1-7: firmware: requesting ath6k/AR6004/hw1.3/bdata.bin
> [    7.035276] cfg80211: World regulatory domain updated:
> [    7.035287] cfg80211:   (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp)
> [    7.035299] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz),
> (300 mBi, 2000 mBm)
> [    7.037916] usb 1-7: firmware: requesting ath6k/AR6004/hw1.3/fw-3.bin
> [    9.378940] ath6kl: f59afe4c
> [    9.379054] ath6kl: f59afe6c
> [    9.379391] ath6kl_usb: probe of 1-7:1.0 failed with error -5
> Here I reset the device.
>
> [    9.380081] usbcore: registered new interface driver ath6kl_usb
> [   10.396824] usb 1-7: USB disconnect, address 7
> [   10.712160] usb 1-7: new high speed USB device using ehci_hcd and address 8
> [   10.832491] usb 1-7: firmware: requesting ath6k/AR6004/hw1.3/bdata.bin
> [   10.838218] usb 1-7: firmware: requesting ath6k/AR6004/hw1.3/fw-3.bin
> [   11.026652] ath6kl: f5287c50
>
> and it works..
>
> ---
> drivers/net/wireless/ath/ath6kl/main.c | 1 +
> drivers/net/wireless/ath/ath6kl/usb.c  | 1 +
>   2 files changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/main.c
> b/drivers/net/wireless/ath/ath6kl/main.c
> index d0080b3..9060380 100644
> --- a/drivers/net/wireless/ath/ath6kl/main.c
> +++ b/drivers/net/wireless/ath/ath6kl/main.c
> @@ -375,6 +375,7 @@ void ath6kl_reset_device(struct ath6kl *ar, u32 target_type,
>   	if (status)
>   		ath6kl_err("failed to reset target\n");
>   }
> +EXPORT_SYMBOL(ath6kl_reset_device);
>
>   static void ath6kl_install_static_wep_keys(struct ath6kl_vif *vif)
>   {
> diff --git a/drivers/net/wireless/ath/ath6kl/usb.c
> b/drivers/net/wireless/ath/ath6kl/usb.c
> index c7b87be..910bef9 100644
> --- a/drivers/net/wireless/ath/ath6kl/usb.c
> +++ b/drivers/net/wireless/ath/ath6kl/usb.c
> @@ -1121,6 +1121,7 @@ static int ath6kl_usb_probe(struct usb_interface
> *interface,
>   	ret = ath6kl_core_init(ar, ATH6KL_HTC_TYPE_PIPE);
>   	if (ret) {
>   		ath6kl_err("Failed to init ath6kl core: %d\n", ret);
> +                ath6kl_reset_device(ar, ar->target_type, true, true);
>   		goto err_core_free;
>   	}
>
> --

I am certain that the real problem here is that ath6kl is requesting firmware 
with a synchronous call using request_firmware() rather than with the 
asynchronous request_firmware_nowait(). That used to work, but updates to udev 
caused the firmware read operation to time out. It works after a reset because 
the file reading routines are now running; however, the correct fix is to 
rewrite the firmware reading section.

Larry



  parent reply	other threads:[~2013-02-21 17:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 14:39 ath6kl: AR6004 failed to start on computer boot Julien Massot
2012-12-13 17:46 ` Kalle Valo
2013-02-15 10:09 ` Kalle Valo
2013-02-15 14:10   ` Julien Massot
2013-02-15 14:22     ` Mohammed Shafi Shajakhan
2013-02-21 14:03       ` Julien Massot
2013-02-21 14:18         ` Mohammed Shafi Shajakhan
2013-03-08 10:28           ` Kalle Valo
2013-03-12 16:15             ` Mohammed Shafi Shajakhan
2013-02-21 17:06         ` Larry Finger [this message]
2013-02-22 15:06           ` Kalle Valo
2013-02-25 17:19             ` Yvan
2013-02-25 19:39               ` Larry Finger
     [not found]                 ` <1448005898.305768.1361866657564.open-xchange@ox-webdesk.1and1.fr>
2013-02-26 14:09                   ` Larry Finger

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=51265413.9080609@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=ath6kl-devel@qca.qualcomm.com \
    --cc=jmassot@aldebaran-robotics.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mohammed@qca.qualcomm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).