linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: Fix softlockup in AR9485
@ 2012-06-12 14:43 Mohammed Shafi Shajakhan
  2012-06-12 19:44 ` John W. Linville
  0 siblings, 1 reply; 4+ messages in thread
From: Mohammed Shafi Shajakhan @ 2012-06-12 14:43 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-wireless, Rodriguez Luis, ath9k-devel, Sujith Manoharan,
	Rajkumar Manoharan, Mohammed Shafi Shajakhan, stable

From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

steps to recreate:
load latest ath9k driver with AR9485
stop the network-manager and wpa_supplicant
bring the interface up

	Call Trace:
	[<ffffffffa0517490>] ? ath_hw_check+0xe0/0xe0 [ath9k]
	[<ffffffff812cd1e8>] __const_udelay+0x28/0x30
	[<ffffffffa03bae7a>] ar9003_get_pll_sqsum_dvc+0x4a/0x80 [ath9k_hw]
	[<ffffffffa05174eb>] ath_hw_pll_work+0x5b/0xe0 [ath9k]
	[<ffffffff810744fe>] process_one_work+0x11e/0x470
	[<ffffffff8107530f>] worker_thread+0x15f/0x360
	[<ffffffff810751b0>] ? manage_workers+0x230/0x230
	[<ffffffff81079af3>] kthread+0x93/0xa0
	[<ffffffff815fd3a4>] kernel_thread_helper+0x4/0x10
	[<ffffffff81079a60>] ? kthread_freezable_should_stop+0x70/0x70
	[<ffffffff815fd3a0>] ? gs_change+0x13/0x13

ensure that the PLL-WAR for AR9485/AR9340 is executed only if the STA is
associated (or) IBSS/AP mode had started beaconing. Ideally this WAR
is needed to recover from some rare beacon stuck during stress testing.
Before the STA is associated/IBSS had started beaconing, PLL4(0x1618c)
always seem to have zero even though we had configured PLL3(0x16188) to
query about PLL's locking status. When we keep on polling infinitely PLL4's
8th bit(ie check for PLL locking measurements is done), machine hangs
due to softlockup.

fixes https://bugzilla.redhat.com/show_bug.cgi?id=811142

Reported-by: Rolf Offermanns <rolf.offermanns@gmx.net>
Cc: stable@vger.kernel.org
Tested-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/link.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
index 0cc4c70..a105c94 100644
--- a/drivers/net/wireless/ath/ath9k/link.c
+++ b/drivers/net/wireless/ath/ath9k/link.c
@@ -136,6 +136,14 @@ void ath_hw_pll_work(struct work_struct *work)
 	u32 pll_sqsum;
 	struct ath_softc *sc = container_of(work, struct ath_softc,
 					    hw_pll_work.work);
+	/*
+	 * ensure that the PLL WAR is executed only
+	 * after the STA is associated (or) if the
+	 * beaconing had started in interfaces that
+	 * uses beacons.
+	 */
+	if (!test_bit(SC_OP_BEACONS, &sc->sc_flags))
+		return;
 
 	ath9k_ps_wakeup(sc);
 	pll_sqsum = ar9003_get_pll_sqsum_dvc(sc->sc_ah);
-- 
1.7.0.4


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

* Re: [PATCH] ath9k: Fix softlockup in AR9485
  2012-06-12 14:43 [PATCH] ath9k: Fix softlockup in AR9485 Mohammed Shafi Shajakhan
@ 2012-06-12 19:44 ` John W. Linville
  2012-06-13  4:43   ` Mohammed Shafi Shajakhan
  2012-06-14  4:48   ` Mohammed Shafi
  0 siblings, 2 replies; 4+ messages in thread
From: John W. Linville @ 2012-06-12 19:44 UTC (permalink / raw)
  To: Mohammed Shafi Shajakhan
  Cc: linux-wireless, Rodriguez Luis, ath9k-devel, Sujith Manoharan,
	Rajkumar Manoharan, stable

Do you have a version that applies to 3.5 and earlier?

On Tue, Jun 12, 2012 at 08:13:43PM +0530, Mohammed Shafi Shajakhan wrote:
> From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
> 
> steps to recreate:
> load latest ath9k driver with AR9485
> stop the network-manager and wpa_supplicant
> bring the interface up
> 
> 	Call Trace:
> 	[<ffffffffa0517490>] ? ath_hw_check+0xe0/0xe0 [ath9k]
> 	[<ffffffff812cd1e8>] __const_udelay+0x28/0x30
> 	[<ffffffffa03bae7a>] ar9003_get_pll_sqsum_dvc+0x4a/0x80 [ath9k_hw]
> 	[<ffffffffa05174eb>] ath_hw_pll_work+0x5b/0xe0 [ath9k]
> 	[<ffffffff810744fe>] process_one_work+0x11e/0x470
> 	[<ffffffff8107530f>] worker_thread+0x15f/0x360
> 	[<ffffffff810751b0>] ? manage_workers+0x230/0x230
> 	[<ffffffff81079af3>] kthread+0x93/0xa0
> 	[<ffffffff815fd3a4>] kernel_thread_helper+0x4/0x10
> 	[<ffffffff81079a60>] ? kthread_freezable_should_stop+0x70/0x70
> 	[<ffffffff815fd3a0>] ? gs_change+0x13/0x13
> 
> ensure that the PLL-WAR for AR9485/AR9340 is executed only if the STA is
> associated (or) IBSS/AP mode had started beaconing. Ideally this WAR
> is needed to recover from some rare beacon stuck during stress testing.
> Before the STA is associated/IBSS had started beaconing, PLL4(0x1618c)
> always seem to have zero even though we had configured PLL3(0x16188) to
> query about PLL's locking status. When we keep on polling infinitely PLL4's
> 8th bit(ie check for PLL locking measurements is done), machine hangs
> due to softlockup.
> 
> fixes https://bugzilla.redhat.com/show_bug.cgi?id=811142
> 
> Reported-by: Rolf Offermanns <rolf.offermanns@gmx.net>
> Cc: stable@vger.kernel.org
> Tested-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath9k/link.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
> index 0cc4c70..a105c94 100644
> --- a/drivers/net/wireless/ath/ath9k/link.c
> +++ b/drivers/net/wireless/ath/ath9k/link.c
> @@ -136,6 +136,14 @@ void ath_hw_pll_work(struct work_struct *work)
>  	u32 pll_sqsum;
>  	struct ath_softc *sc = container_of(work, struct ath_softc,
>  					    hw_pll_work.work);
> +	/*
> +	 * ensure that the PLL WAR is executed only
> +	 * after the STA is associated (or) if the
> +	 * beaconing had started in interfaces that
> +	 * uses beacons.
> +	 */
> +	if (!test_bit(SC_OP_BEACONS, &sc->sc_flags))
> +		return;
>  
>  	ath9k_ps_wakeup(sc);
>  	pll_sqsum = ar9003_get_pll_sqsum_dvc(sc->sc_ah);
> -- 
> 1.7.0.4
> 
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH] ath9k: Fix softlockup in AR9485
  2012-06-12 19:44 ` John W. Linville
@ 2012-06-13  4:43   ` Mohammed Shafi Shajakhan
  2012-06-14  4:48   ` Mohammed Shafi
  1 sibling, 0 replies; 4+ messages in thread
From: Mohammed Shafi Shajakhan @ 2012-06-13  4:43 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-wireless, Rodriguez Luis, ath9k-devel, Sujith Manoharan,
	Rajkumar Manoharan, stable, Mohammed Shafi Shajakhan

Hi John,

On Wednesday 13 June 2012 01:14 AM, John W. Linville wrote:
> Do you have a version that applies to 3.5 and earlier?

thanks, will soon send a back ported version for 3.5. thanks.

>
> On Tue, Jun 12, 2012 at 08:13:43PM +0530, Mohammed Shafi Shajakhan wrote:
>> From: Mohammed Shafi Shajakhan<mohammed@qca.qualcomm.com>
>>
>> steps to recreate:
>> load latest ath9k driver with AR9485
>> stop the network-manager and wpa_supplicant
>> bring the interface up
>>
>> 	Call Trace:
>> 	[<ffffffffa0517490>] ? ath_hw_check+0xe0/0xe0 [ath9k]
>> 	[<ffffffff812cd1e8>] __const_udelay+0x28/0x30
>> 	[<ffffffffa03bae7a>] ar9003_get_pll_sqsum_dvc+0x4a/0x80 [ath9k_hw]
>> 	[<ffffffffa05174eb>] ath_hw_pll_work+0x5b/0xe0 [ath9k]
>> 	[<ffffffff810744fe>] process_one_work+0x11e/0x470
>> 	[<ffffffff8107530f>] worker_thread+0x15f/0x360
>> 	[<ffffffff810751b0>] ? manage_workers+0x230/0x230
>> 	[<ffffffff81079af3>] kthread+0x93/0xa0
>> 	[<ffffffff815fd3a4>] kernel_thread_helper+0x4/0x10
>> 	[<ffffffff81079a60>] ? kthread_freezable_should_stop+0x70/0x70
>> 	[<ffffffff815fd3a0>] ? gs_change+0x13/0x13
>>
>> ensure that the PLL-WAR for AR9485/AR9340 is executed only if the STA is
>> associated (or) IBSS/AP mode had started beaconing. Ideally this WAR
>> is needed to recover from some rare beacon stuck during stress testing.
>> Before the STA is associated/IBSS had started beaconing, PLL4(0x1618c)
>> always seem to have zero even though we had configured PLL3(0x16188) to
>> query about PLL's locking status. When we keep on polling infinitely PLL4's
>> 8th bit(ie check for PLL locking measurements is done), machine hangs
>> due to softlockup.
>>
>> fixes https://bugzilla.redhat.com/show_bug.cgi?id=811142
>>
>> Reported-by: Rolf Offermanns<rolf.offermanns@gmx.net>
>> Cc: stable@vger.kernel.org
>> Tested-by: Mohammed Shafi Shajakhan<mohammed@qca.qualcomm.com>
>> Signed-off-by: Mohammed Shafi Shajakhan<mohammed@qca.qualcomm.com>
>> ---
>>   drivers/net/wireless/ath/ath9k/link.c |    8 ++++++++
>>   1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
>> index 0cc4c70..a105c94 100644
>> --- a/drivers/net/wireless/ath/ath9k/link.c
>> +++ b/drivers/net/wireless/ath/ath9k/link.c
>> @@ -136,6 +136,14 @@ void ath_hw_pll_work(struct work_struct *work)
>>   	u32 pll_sqsum;
>>   	struct ath_softc *sc = container_of(work, struct ath_softc,
>>   					    hw_pll_work.work);
>> +	/*
>> +	 * ensure that the PLL WAR is executed only
>> +	 * after the STA is associated (or) if the
>> +	 * beaconing had started in interfaces that
>> +	 * uses beacons.
>> +	 */
>> +	if (!test_bit(SC_OP_BEACONS,&sc->sc_flags))
>> +		return;
>>
>>   	ath9k_ps_wakeup(sc);
>>   	pll_sqsum = ar9003_get_pll_sqsum_dvc(sc->sc_ah);
>> --
>> 1.7.0.4
>>
>>
>


-- 
thanks,
shafi

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

* Re: [PATCH] ath9k: Fix softlockup in AR9485
  2012-06-12 19:44 ` John W. Linville
  2012-06-13  4:43   ` Mohammed Shafi Shajakhan
@ 2012-06-14  4:48   ` Mohammed Shafi
  1 sibling, 0 replies; 4+ messages in thread
From: Mohammed Shafi @ 2012-06-14  4:48 UTC (permalink / raw)
  To: John W. Linville
  Cc: Mohammed Shafi Shajakhan, linux-wireless, Rodriguez Luis,
	ath9k-devel, Sujith Manoharan, Rajkumar Manoharan, stable

Hi,

On Wed, Jun 13, 2012 at 1:14 AM, John W. Linville
<linville@tuxdriver.com> wrote:
> Do you have a version that applies to 3.5 and earlier?

the back ported version of this patch
http://www.spinics.net/lists/linux-wireless/msg92125.html

>
> On Tue, Jun 12, 2012 at 08:13:43PM +0530, Mohammed Shafi Shajakhan wrote:
>> From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
>>
>> steps to recreate:
>> load latest ath9k driver with AR9485
>> stop the network-manager and wpa_supplicant
>> bring the interface up
>>
>>       Call Trace:
>>       [<ffffffffa0517490>] ? ath_hw_check+0xe0/0xe0 [ath9k]
>>       [<ffffffff812cd1e8>] __const_udelay+0x28/0x30
>>       [<ffffffffa03bae7a>] ar9003_get_pll_sqsum_dvc+0x4a/0x80 [ath9k_hw]
>>       [<ffffffffa05174eb>] ath_hw_pll_work+0x5b/0xe0 [ath9k]
>>       [<ffffffff810744fe>] process_one_work+0x11e/0x470
>>       [<ffffffff8107530f>] worker_thread+0x15f/0x360
>>       [<ffffffff810751b0>] ? manage_workers+0x230/0x230
>>       [<ffffffff81079af3>] kthread+0x93/0xa0
>>       [<ffffffff815fd3a4>] kernel_thread_helper+0x4/0x10
>>       [<ffffffff81079a60>] ? kthread_freezable_should_stop+0x70/0x70
>>       [<ffffffff815fd3a0>] ? gs_change+0x13/0x13
>>
>> ensure that the PLL-WAR for AR9485/AR9340 is executed only if the STA is
>> associated (or) IBSS/AP mode had started beaconing. Ideally this WAR
>> is needed to recover from some rare beacon stuck during stress testing.
>> Before the STA is associated/IBSS had started beaconing, PLL4(0x1618c)
>> always seem to have zero even though we had configured PLL3(0x16188) to
>> query about PLL's locking status. When we keep on polling infinitely PLL4's
>> 8th bit(ie check for PLL locking measurements is done), machine hangs
>> due to softlockup.
>>
>> fixes https://bugzilla.redhat.com/show_bug.cgi?id=811142
>>
>> Reported-by: Rolf Offermanns <rolf.offermanns@gmx.net>
>> Cc: stable@vger.kernel.org
>> Tested-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
>> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
>> ---
>>  drivers/net/wireless/ath/ath9k/link.c |    8 ++++++++
>>  1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
>> index 0cc4c70..a105c94 100644
>> --- a/drivers/net/wireless/ath/ath9k/link.c
>> +++ b/drivers/net/wireless/ath/ath9k/link.c
>> @@ -136,6 +136,14 @@ void ath_hw_pll_work(struct work_struct *work)
>>       u32 pll_sqsum;
>>       struct ath_softc *sc = container_of(work, struct ath_softc,
>>                                           hw_pll_work.work);
>> +     /*
>> +      * ensure that the PLL WAR is executed only
>> +      * after the STA is associated (or) if the
>> +      * beaconing had started in interfaces that
>> +      * uses beacons.
>> +      */
>> +     if (!test_bit(SC_OP_BEACONS, &sc->sc_flags))
>> +             return;
>>
>>       ath9k_ps_wakeup(sc);
>>       pll_sqsum = ar9003_get_pll_sqsum_dvc(sc->sc_ah);
>> --
>> 1.7.0.4
>>
>>
>
> --
> John W. Linville                Someday the world will need a hero, and you
> linville@tuxdriver.com                  might be all we have.  Be ready.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
thanks,
shafi

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

end of thread, other threads:[~2012-06-14  4:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-12 14:43 [PATCH] ath9k: Fix softlockup in AR9485 Mohammed Shafi Shajakhan
2012-06-12 19:44 ` John W. Linville
2012-06-13  4:43   ` Mohammed Shafi Shajakhan
2012-06-14  4:48   ` Mohammed Shafi

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