2012-09-21 18:45:32

by Sujith Manoharan

[permalink] [raw]
Subject: [PATCH] ath9k: Disable ASPM only for AR9285

Currently, ASPM is disabled for all WLAN+BT combo chipsets
when BTCOEX is enabled. This is incorrect since the workaround
is required only for WB195, which is a AR9285+AR3011 combo
solution. Fix this by checking for the HW version when enabling
the workaround.

Cc: [email protected]
Signed-off-by: Sujith Manoharan <[email protected]>
---
drivers/net/wireless/ath/ath9k/pci.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index a8f6126..c0c5996 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -128,8 +128,9 @@ static void ath_pci_aspm_init(struct ath_common *common)
if (!parent)
return;

- if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) {
- /* Bluetooth coexistance requires disabling ASPM. */
+ if ((ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) &&
+ (AR_SREV_9285(ah))) {
+ /* Bluetooth coexistance requires disabling ASPM for AR9285. */
pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &aspm);
aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1);
pci_write_config_byte(pdev, pos + PCI_EXP_LNKCTL, aspm);
--
1.7.12



2012-09-22 03:30:37

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] ath9k: Disable ASPM only for AR9285

On Fri, Sep 21, 2012 at 11:44 AM, Sujith Manoharan
<[email protected]> wrote:
> Currently, ASPM is disabled for all WLAN+BT combo chipsets
> when BTCOEX is enabled. This is incorrect since the workaround
> is required only for WB195, which is a AR9285+AR3011 combo
> solution. Fix this by checking for the HW version when enabling
> the workaround.
>
> Cc: [email protected]
> Signed-off-by: Sujith Manoharan <[email protected]>

I've sucked this into the origin/linux-3.5.y branch, and am working on
ckmake test compiling a new stable release that brings up on to
v3.5.4. All changes have been pushed. The new Bluetooth stable patches
from linux-next were plain stupid but I've tried backporting them.

waiting on ckmake result.

Luis

2012-09-24 14:32:26

by Paul Stewart

[permalink] [raw]
Subject: Re: [PATCH] ath9k: Disable ASPM only for AR9285

On Fri, Sep 21, 2012 at 11:44 AM, Sujith Manoharan
<[email protected]> wrote:
> Currently, ASPM is disabled for all WLAN+BT combo chipsets
> when BTCOEX is enabled. This is incorrect since the workaround
> is required only for WB195, which is a AR9285+AR3011 combo
> solution. Fix this by checking for the HW version when enabling
> the workaround.
>
> Cc: [email protected]
> Signed-off-by: Sujith Manoharan <[email protected]>
Tested-by: Paul Stewart <[email protected]>
> ---
> drivers/net/wireless/ath/ath9k/pci.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
> index a8f6126..c0c5996 100644
> --- a/drivers/net/wireless/ath/ath9k/pci.c
> +++ b/drivers/net/wireless/ath/ath9k/pci.c
> @@ -128,8 +128,9 @@ static void ath_pci_aspm_init(struct ath_common *common)
> if (!parent)
> return;
>
> - if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) {
> - /* Bluetooth coexistance requires disabling ASPM. */
> + if ((ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) &&
> + (AR_SREV_9285(ah))) {
> + /* Bluetooth coexistance requires disabling ASPM for AR9285. */
> pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &aspm);
> aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1);
> pci_write_config_byte(pdev, pos + PCI_EXP_LNKCTL, aspm);
> --
> 1.7.12
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2012-09-25 22:02:00

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] ath9k: Disable ASPM only for AR9285

On Fri, Sep 21, 2012 at 8:30 PM, Luis R. Rodriguez
<[email protected]> wrote:
> On Fri, Sep 21, 2012 at 11:44 AM, Sujith Manoharan
> <[email protected]> wrote:
>> Currently, ASPM is disabled for all WLAN+BT combo chipsets
>> when BTCOEX is enabled. This is incorrect since the workaround
>> is required only for WB195, which is a AR9285+AR3011 combo
>> solution. Fix this by checking for the HW version when enabling
>> the workaround.
>>
>> Cc: [email protected]
>> Signed-off-by: Sujith Manoharan <[email protected]>
>
> I've sucked this into the origin/linux-3.5.y branch, and am working on
> ckmake test compiling a new stable release that brings up on to
> v3.5.4. All changes have been pushed. The new Bluetooth stable patches
> from linux-next were plain stupid but I've tried backporting them.
>
> waiting on ckmake result.

All ckmake tests passed, uploaded all new releases based on new v3.5.4
and with this patch applied.

http://wireless.kernel.org/en/users/Download/stable#compat-wireless_3.5_stable_releases

Luis

2012-09-24 15:04:27

by Sujith Manoharan

[permalink] [raw]
Subject: Re: [PATCH] ath9k: Disable ASPM only for AR9285

Paul Stewart wrote:
> > Cc: [email protected]
> > Signed-off-by: Sujith Manoharan <[email protected]>
> Tested-by: Paul Stewart <[email protected]>

Thanks !

Sujith