Patchwork [1/1,Precise] UBUNTU: (pre-stable): bcma: add ext PA workaround for BCM4331 and BCM43431

login
register
mail settings
Submitter Seth Forshee
Date June 14, 2012, 7:26 p.m.
Message ID <1339702005-1164-2-git-send-email-seth.forshee@canonical.com>
Download mbox | patch
Permalink /patch/165005/
State New
Headers show

Comments

Seth Forshee - June 14, 2012, 7:26 p.m.
MacBook Pro models with BCM4331 wireless have been found to have the ext
PA lines disabled after resuming from S3 without external power attach.
This causes them to be unable to transmit. Add a workaround to ensure
that the ext PA lines are enabled on BCM4331. Also extend all handling
of ext PA line muxing to BCM43431 as is done in the Broadcom SDK.

BugLink: http://bugs.launchpad.net/bugs/925577
Cc: Arend van Spriel <arend@broadcom.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: stable@vger.kernel.org
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(backported from commit 69aaedd3cfd23b2c732e3cf1227370a35f5c89d4)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/bcma/driver_chipcommon_pmu.c |    4 +++-
 drivers/bcma/sprom.c                 |    4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
Tim Gardner - June 14, 2012, 7:32 p.m.

Brad Figg - June 14, 2012, 9:04 p.m.
On 06/14/2012 12:26 PM, Seth Forshee wrote:
> MacBook Pro models with BCM4331 wireless have been found to have the ext
> PA lines disabled after resuming from S3 without external power attach.
> This causes them to be unable to transmit. Add a workaround to ensure
> that the ext PA lines are enabled on BCM4331. Also extend all handling
> of ext PA line muxing to BCM43431 as is done in the Broadcom SDK.
> 
> BugLink: http://bugs.launchpad.net/bugs/925577
> Cc: Arend van Spriel <arend@broadcom.com>
> Cc: Hauke Mehrtens <hauke@hauke-m.de>
> Cc: stable@vger.kernel.org
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> (backported from commit 69aaedd3cfd23b2c732e3cf1227370a35f5c89d4)
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> ---
>  drivers/bcma/driver_chipcommon_pmu.c |    4 +++-
>  drivers/bcma/sprom.c                 |    4 ++--
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/bcma/driver_chipcommon_pmu.c b/drivers/bcma/driver_chipcommon_pmu.c
> index 800163c..04a6d03 100644
> --- a/drivers/bcma/driver_chipcommon_pmu.c
> +++ b/drivers/bcma/driver_chipcommon_pmu.c
> @@ -138,7 +138,9 @@ void bcma_pmu_workarounds(struct bcma_drv_cc *cc)
>  		bcma_chipco_chipctl_maskset(cc, 0, ~0, 0x7);
>  		break;
>  	case 0x4331:
> -		/* BCM4331 workaround is SPROM-related, we put it in sprom.c */
> +	case 43431:
> +		/* Ext PA lines must be enabled for tx on BCM4331 */
> +		bcma_chipco_bcm4331_ext_pa_lines_ctl(cc, true);
>  		break;
>  	case 43224:
>  		if (bus->chipinfo.rev == 0) {
> diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c
> index d729239..ccec719 100644
> --- a/drivers/bcma/sprom.c
> +++ b/drivers/bcma/sprom.c
> @@ -161,7 +161,7 @@ int bcma_sprom_get(struct bcma_bus *bus)
>  	if (!sprom)
>  		return -ENOMEM;
>  
> -	if (bus->chipinfo.id == 0x4331)
> +	if (bus->chipinfo.id == 0x4331 || bus->chipinfo.id == 43431)
>  		bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false);
>  
>  	/* Most cards have SPROM moved by additional offset 0x30 (48 dwords).
> @@ -171,7 +171,7 @@ int bcma_sprom_get(struct bcma_bus *bus)
>  		BCMA_CC_SPROM_PCIE6;
>  	bcma_sprom_read(bus, offset, sprom);
>  
> -	if (bus->chipinfo.id == 0x4331)
> +	if (bus->chipinfo.id == 0x4331 || bus->chipinfo.id == 43431)
>  		bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true);
>  
>  	err = bcma_sprom_valid(sprom);
Stefan Bader - June 15, 2012, 8:17 a.m.
Applied to Precise master-next

Patch

diff --git a/drivers/bcma/driver_chipcommon_pmu.c b/drivers/bcma/driver_chipcommon_pmu.c
index 800163c..04a6d03 100644
--- a/drivers/bcma/driver_chipcommon_pmu.c
+++ b/drivers/bcma/driver_chipcommon_pmu.c
@@ -138,7 +138,9 @@  void bcma_pmu_workarounds(struct bcma_drv_cc *cc)
 		bcma_chipco_chipctl_maskset(cc, 0, ~0, 0x7);
 		break;
 	case 0x4331:
-		/* BCM4331 workaround is SPROM-related, we put it in sprom.c */
+	case 43431:
+		/* Ext PA lines must be enabled for tx on BCM4331 */
+		bcma_chipco_bcm4331_ext_pa_lines_ctl(cc, true);
 		break;
 	case 43224:
 		if (bus->chipinfo.rev == 0) {
diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c
index d729239..ccec719 100644
--- a/drivers/bcma/sprom.c
+++ b/drivers/bcma/sprom.c
@@ -161,7 +161,7 @@  int bcma_sprom_get(struct bcma_bus *bus)
 	if (!sprom)
 		return -ENOMEM;
 
-	if (bus->chipinfo.id == 0x4331)
+	if (bus->chipinfo.id == 0x4331 || bus->chipinfo.id == 43431)
 		bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false);
 
 	/* Most cards have SPROM moved by additional offset 0x30 (48 dwords).
@@ -171,7 +171,7 @@  int bcma_sprom_get(struct bcma_bus *bus)
 		BCMA_CC_SPROM_PCIE6;
 	bcma_sprom_read(bus, offset, sprom);
 
-	if (bus->chipinfo.id == 0x4331)
+	if (bus->chipinfo.id == 0x4331 || bus->chipinfo.id == 43431)
 		bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true);
 
 	err = bcma_sprom_valid(sprom);