linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: bring back direction setting in ath9k_{start_stop}
@ 2016-09-01 17:47 Giedrius Statkevičius
  2016-09-03 16:08 ` Giedrius Statkevičius
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Giedrius Statkevičius @ 2016-09-01 17:47 UTC (permalink / raw)
  To: kvalo
  Cc: ath9k-devel, linux-wireless, ath9k-devel, netdev, linux-kernel,
	Miaoqing Pan, Kalle Valo, stable, Giedrius Statkevičius

A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup
led_pin initial") that broken the WLAN status led on my laptop with
AR9287 after suspending and resuming.

Steps to reproduce:
* Suspend (laptop)
* Resume (laptop)
* Observe that the WLAN led no longer turns ON/OFF depending on the
  status and is always red

Even though for my case it only needs to be set to OUT in ath9k_start
but for consistency bring back the IN direction setting as well.

Cc: Miaoqing Pan <miaoqing@codeaurora.org>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
---
This patch should be applied to all 4.7 and later kernels

Another user complaining about probably the same problem:
https://bugzilla.kernel.org/show_bug.cgi?id=151711

 drivers/net/wireless/ath/ath9k/main.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 8b63988..121dc05 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -718,9 +718,12 @@ static int ath9k_start(struct ieee80211_hw *hw)
 	if (!ath_complete_reset(sc, false))
 		ah->reset_power_on = false;
 
-	if (ah->led_pin >= 0)
+	if (ah->led_pin >= 0) {
 		ath9k_hw_set_gpio(ah, ah->led_pin,
 				  (ah->config.led_active_high) ? 1 : 0);
+		ath9k_hw_gpio_request_out(ah, ah->led_pin, NULL,
+					  AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
+	}
 
 	/*
 	 * Reset key cache to sane defaults (all entries cleared) instead of
@@ -864,9 +867,11 @@ static void ath9k_stop(struct ieee80211_hw *hw)
 
 	spin_lock_bh(&sc->sc_pcu_lock);
 
-	if (ah->led_pin >= 0)
+	if (ah->led_pin >= 0) {
 		ath9k_hw_set_gpio(ah, ah->led_pin,
 				  (ah->config.led_active_high) ? 0 : 1);
+		ath9k_hw_gpio_request_in(ah, ah->led_pin, NULL);
+	}
 
 	ath_prepare_reset(sc);
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ath9k: bring back direction setting in ath9k_{start_stop}
  2016-09-01 17:47 [PATCH] ath9k: bring back direction setting in ath9k_{start_stop} Giedrius Statkevičius
@ 2016-09-03 16:08 ` Giedrius Statkevičius
  2016-09-03 17:35 ` Kalle Valo
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Giedrius Statkevičius @ 2016-09-03 16:08 UTC (permalink / raw)
  To: kvalo
  Cc: ath9k-devel, linux-wireless, ath9k-devel, netdev, linux-kernel,
	Miaoqing Pan, Kalle Valo, stable

Some more users complaining about this:
https://bbs.archlinux.org/viewtopic.php?id=215978

On Thu, Sep 01, 2016 at 08:47:02PM +0300, Giedrius Statkevičius wrote:
> A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup
> led_pin initial") that broken the WLAN status led on my laptop with
> AR9287 after suspending and resuming.
> 
> Steps to reproduce:
> * Suspend (laptop)
> * Resume (laptop)
> * Observe that the WLAN led no longer turns ON/OFF depending on the
>   status and is always red
> 
> Even though for my case it only needs to be set to OUT in ath9k_start
> but for consistency bring back the IN direction setting as well.
> 
> Cc: Miaoqing Pan <miaoqing@codeaurora.org>
> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
> ---
[...]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ath9k: bring back direction setting in ath9k_{start_stop}
  2016-09-01 17:47 [PATCH] ath9k: bring back direction setting in ath9k_{start_stop} Giedrius Statkevičius
  2016-09-03 16:08 ` Giedrius Statkevičius
@ 2016-09-03 17:35 ` Kalle Valo
  2016-09-07 13:11 ` Kalle Valo
  2016-09-07 13:23 ` Kalle Valo
  3 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2016-09-03 17:35 UTC (permalink / raw)
  To: Giedrius Statkevi?ius
  Cc: kvalo, ath9k-devel, linux-wireless, ath9k-devel, netdev,
	linux-kernel, Miaoqing Pan, stable, Giedrius Statkevičius

Giedrius Statkevi?ius <giedrius.statkevicius@gmail.com> wrote:
> A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup
> led_pin initial") that broken the WLAN status led on my laptop with
> AR9287 after suspending and resuming.
> 
> Steps to reproduce:
> * Suspend (laptop)
> * Resume (laptop)
> * Observe that the WLAN led no longer turns ON/OFF depending on the
>   status and is always red
> 
> Even though for my case it only needs to be set to OUT in ath9k_start
> but for consistency bring back the IN direction setting as well.
> 
> Cc: Miaoqing Pan <miaoqing@codeaurora.org>
> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>

I'm planning to queue this to 4.8 if no objections.

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9309829/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ath9k: bring back direction setting in ath9k_{start_stop}
  2016-09-01 17:47 [PATCH] ath9k: bring back direction setting in ath9k_{start_stop} Giedrius Statkevičius
  2016-09-03 16:08 ` Giedrius Statkevičius
  2016-09-03 17:35 ` Kalle Valo
@ 2016-09-07 13:11 ` Kalle Valo
  2016-09-07 13:16   ` Kalle Valo
  2016-09-07 13:23 ` Kalle Valo
  3 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2016-09-07 13:11 UTC (permalink / raw)
  To: Giedrius Statkevi?ius
  Cc: kvalo, ath9k-devel, linux-wireless, ath9k-devel, netdev,
	linux-kernel, Miaoqing Pan, stable, Giedrius Statkevičius

Giedrius Statkevi?ius <giedrius.statkevicius@gmail.com> wrote:
> A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup
> led_pin initial") that broken the WLAN status led on my laptop with
> AR9287 after suspending and resuming.
> 
> Steps to reproduce:
> * Suspend (laptop)
> * Resume (laptop)
> * Observe that the WLAN led no longer turns ON/OFF depending on the
>   status and is always red
> 
> Even though for my case it only needs to be set to OUT in ath9k_start
> but for consistency bring back the IN direction setting as well.
> 
> Cc: Miaoqing Pan <miaoqing@codeaurora.org>
> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>

Thanks, 1 patch applied to ath-next branch of ath.git:

088a60926b66 ath9k: bring back direction setting in ath9k_{start_stop}

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9309829/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ath9k: bring back direction setting in ath9k_{start_stop}
  2016-09-07 13:11 ` Kalle Valo
@ 2016-09-07 13:16   ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2016-09-07 13:16 UTC (permalink / raw)
  To: Giedrius Statkevi?ius
  Cc: ath9k-devel, linux-wireless, ath9k-devel, netdev, linux-kernel,
	Miaoqing Pan, stable

Kalle Valo <kvalo@qca.qualcomm.com> writes:

> Giedrius Statkevi?ius <giedrius.statkevicius@gmail.com> wrote:
>> A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup
>> led_pin initial") that broken the WLAN status led on my laptop with
>> AR9287 after suspending and resuming.
>> 
>> Steps to reproduce:
>> * Suspend (laptop)
>> * Resume (laptop)
>> * Observe that the WLAN led no longer turns ON/OFF depending on the
>>   status and is always red
>> 
>> Even though for my case it only needs to be set to OUT in ath9k_start
>> but for consistency bring back the IN direction setting as well.
>> 
>> Cc: Miaoqing Pan <miaoqing@codeaurora.org>
>> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
>> Cc: <stable@vger.kernel.org>
>> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
>
> Thanks, 1 patch applied to ath-next branch of ath.git:
>
> 088a60926b66 ath9k: bring back direction setting in ath9k_{start_stop}

Oops, I was supposed to apply this to ath-current branch. Please ignore
this. Luckily I didn't push yet so I can easily fix this.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ath9k: bring back direction setting in ath9k_{start_stop}
  2016-09-01 17:47 [PATCH] ath9k: bring back direction setting in ath9k_{start_stop} Giedrius Statkevičius
                   ` (2 preceding siblings ...)
  2016-09-07 13:11 ` Kalle Valo
@ 2016-09-07 13:23 ` Kalle Valo
  3 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2016-09-07 13:23 UTC (permalink / raw)
  To: Giedrius Statkevi?ius
  Cc: kvalo, ath9k-devel, linux-wireless, ath9k-devel, netdev,
	linux-kernel, Miaoqing Pan, stable, Giedrius Statkevičius

Giedrius Statkevi?ius <giedrius.statkevicius@gmail.com> wrote:
> A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup
> led_pin initial") that broken the WLAN status led on my laptop with
> AR9287 after suspending and resuming.
> 
> Steps to reproduce:
> * Suspend (laptop)
> * Resume (laptop)
> * Observe that the WLAN led no longer turns ON/OFF depending on the
>   status and is always red
> 
> Even though for my case it only needs to be set to OUT in ath9k_start
> but for consistency bring back the IN direction setting as well.
> 
> Cc: Miaoqing Pan <miaoqing@codeaurora.org>
> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>

Thanks, 1 patch applied to ath-current branch of ath.git:

e34f2ff40e03 ath9k: bring back direction setting in ath9k_{start_stop}

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9309829/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-07 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 17:47 [PATCH] ath9k: bring back direction setting in ath9k_{start_stop} Giedrius Statkevičius
2016-09-03 16:08 ` Giedrius Statkevičius
2016-09-03 17:35 ` Kalle Valo
2016-09-07 13:11 ` Kalle Valo
2016-09-07 13:16   ` Kalle Valo
2016-09-07 13:23 ` Kalle Valo

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).