linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Genoud <richard.genoud@gmail.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>, linux-wireless@vger.kernel.org
Cc: users@rt2x00.serialmonkey.com
Subject: Re: [PATCH 4/4] Revert "rt2x00: Endless loop on hub port power down"
Date: Tue, 02 Dec 2014 12:17:57 +0100	[thread overview]
Message-ID: <547D9FE5.1010006@gmail.com> (raw)
In-Reply-To: <1417012156-26197-4-git-send-email-sgruszka@redhat.com>

On 26/11/2014 15:29, Stanislaw Gruszka wrote:
> This reverts commit 2ad69ac5976191e9bb7dc4044204a504653ad1bb. It
> causes wireless device disappear when we get -EPROTO error form USB
> request. I encounter such situation occasionally when resume form
> suspend with RT3070 adapter:
> 
> [  289.619985] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0404 with error -71
> [  289.639368] ieee80211 phy0: rt2800_wait_bbp_ready: Error - BBP register access failed, aborting
> [  289.639374] ieee80211 phy0: rt2800usb_set_device_state: Error - Device failed to enter state 4 (-5)
> 
> Without the patch, except printing error, device works just fine after
> resume.
> 
> Currently after timeouts and REGISTER_BUSY_COUNT tuning, we should
> not have any "endless loop", though we can wait quite long when driver
> is trying to communicate with the device through non functioning USB
> connection. Generally the problem that commit 2ad69ac597619 solves
> is kinda artificial.
> 
> Cc: Richard Genoud <richard.genoud@gmail.com>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
>  drivers/net/wireless/rt2x00/rt2x00usb.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
> index c2346f8..892270d 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
> @@ -64,12 +64,6 @@ int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,
>  		}
>  	} while (time_before(jiffies, expire));
>  
> -	/* If the port is powered down, we get a -EPROTO error, and this
> -	 * leads to a endless loop. So just say that the device is gone.
> -	 */
> -	if (status == -EPROTO)
> -		clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
> -
>  	rt2x00_err(rt2x00dev,
>  		   "Vendor Request 0x%02x failed for offset 0x%04x with error %d\n",
>  		   request, offset, status);
> 
It tested this serie but unfortunately, reverting this still caused an infinite loop.
(cf https://lkml.org/lkml/2014/4/3/492 to reproduce)

[  642.007812] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.023437] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.031250] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.046875] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.054687] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.062500] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.078125] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.085937] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.101562] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.117187] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.125000] ieee80211 phy0: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 4 in queue 0
[  642.132812] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.250000] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1700 with error -71
[  642.359375] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0438 with error -71
[  642.468750] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0438 with error -71
[  642.476562] ieee80211 phy0: rt2800usb_watchdog: Warning - TX HW queue 1 timed out, invoke forced kick
[  642.585937] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0408 with error -71
[  642.695312] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0408 with error -71
[  642.718750] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.734375] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.742187] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.757812] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.765625] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.773437] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.789062] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.796875] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.812500] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  642.820312] ieee80211 phy0: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 5 in queue 0
[  642.835937] ieee80211 phy0: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[...]
So it seems the "forced kick" is not done 

With patches 1-3 applied but not this one, I've got:
[  154.015625] ieee80211 phy1: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  154.031250] ieee80211 phy1: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  154.039062] ieee80211 phy1: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  154.054687] ieee80211 phy1: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  154.062500] ieee80211 phy1: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  154.070312] ieee80211 phy1: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  154.085937] ieee80211 phy1: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  154.093750] ieee80211 phy1: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  154.109375] ieee80211 phy1: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  154.117187] ieee80211 phy1: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 8 in queue 0
[  154.132812] ieee80211 phy1: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[  154.242187] ieee80211 phy1: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0438 with error -71
[  154.250000] ieee80211 phy1: rt2800usb_watchdog: Warning - TX HW queue 0 timed out, invoke forced kick
[  154.765625] cfg80211: Calling CRDA to update world regulatory domain
[  155.710937] wlan0: authenticate with 00:17:9a:84:fb:94
[  155.718750] wlan0: send auth to 00:17:9a:84:fb:94 (try 1/3)
[  155.726562] wlan0: send auth to 00:17:9a:84:fb:94 (try 2/3)
[  155.734375] wlan0: send auth to 00:17:9a:84:fb:94 (try 3/3)
[  155.742187] wlan0: authentication with 00:17:9a:84:fb:94 timed out
Here, the forced kick is done.

Richard



  reply	other threads:[~2014-12-02 11:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 14:29 [PATCH 1/4] rt2x00: use timeout in rt2x00usb_vendor_request Stanislaw Gruszka
2014-11-26 14:29 ` [PATCH 2/4] rt2x00: change REGISTER_BUSY_COUNT for USB Stanislaw Gruszka
2014-11-26 14:29 ` [PATCH 3/4] rt2x00: change REGISTER_TIMEOUT Stanislaw Gruszka
2014-11-26 14:29 ` [PATCH 4/4] Revert "rt2x00: Endless loop on hub port power down" Stanislaw Gruszka
2014-12-02 11:17   ` Richard Genoud [this message]
2014-12-02 12:15     ` Stanislaw Gruszka
2014-12-02 16:35       ` Richard Genoud

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=547D9FE5.1010006@gmail.com \
    --to=richard.genoud@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.com \
    --cc=users@rt2x00.serialmonkey.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).