* [PATCH] bcma: fix regression in pmu workaround reg masks
@ 2012-07-26 9:15 Hauke Mehrtens
2012-07-26 10:06 ` David Miller
2012-07-26 21:07 ` Linus Torvalds
0 siblings, 2 replies; 3+ messages in thread
From: Hauke Mehrtens @ 2012-07-26 9:15 UTC (permalink / raw)
To: torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
Cc: linville-2XuSBdqkA4R54TAoqtyWWQ, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
brcm80211-dev-list-dY08KVG/lbpWk0Htik3J/w,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
seth.forshee-Z7WLFzj8eWMS+FvcfC7Uqw,
pieterpg-dY08KVG/lbpWk0Htik3J/w, brudley-dY08KVG/lbpWk0Htik3J/w,
Hauke Mehrtens, Arend van Spriel, Rafał Miłecki
This fixes a regression introduced in:
commit b9562545ef0b13c0440ccd8d6dd4111fb77cb17a
Author: Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
Date: Sat Jun 30 01:44:41 2012 +0200
bcma: complete workaround for BCMA43224 and BCM4313
The regression broke reading of the sprom from the chip and seamed to
cause a change of the pci id on a BCMA43224 device so that it is
rejected by brcmsmac. If this problem occurred, after applying this
patch, a cold boot is needed to make the device work again.
In the original patch the workaround set the intended bits in the chip
common core chip control registers, but the patch also unset all the
other bits in that register, because of a wrong mask. The original
patch was based on code from brcmsmac and there was an additional
inversing of the mask in the code setting these regs which was missing
here. Now the regs are set like brcmsmac did it before.
Signed-off-by: Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
Reported-by: Linus Torvalds <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Tested-by: Seth Forshee <seth.forshee-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Cc: Arend van Spriel <arend-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/bcma/driver_chipcommon_pmu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/bcma/driver_chipcommon_pmu.c b/drivers/bcma/driver_chipcommon_pmu.c
index 4432617..c9a4f46 100644
--- a/drivers/bcma/driver_chipcommon_pmu.c
+++ b/drivers/bcma/driver_chipcommon_pmu.c
@@ -110,7 +110,7 @@ void bcma_pmu_workarounds(struct bcma_drv_cc *cc)
/* enable 12 mA drive strenth for 4313 and set chipControl
register bit 1 */
bcma_chipco_chipctl_maskset(cc, 0,
- BCMA_CCTRL_4313_12MA_LED_DRIVE,
+ ~BCMA_CCTRL_4313_12MA_LED_DRIVE,
BCMA_CCTRL_4313_12MA_LED_DRIVE);
break;
case BCMA_CHIP_ID_BCM4331:
@@ -124,14 +124,14 @@ void bcma_pmu_workarounds(struct bcma_drv_cc *cc)
register bit 15 */
if (bus->chipinfo.rev == 0) {
bcma_cc_maskset32(cc, BCMA_CC_CHIPCTL,
- BCMA_CCTRL_43224_GPIO_TOGGLE,
+ ~BCMA_CCTRL_43224_GPIO_TOGGLE,
BCMA_CCTRL_43224_GPIO_TOGGLE);
bcma_chipco_chipctl_maskset(cc, 0,
- BCMA_CCTRL_43224A0_12MA_LED_DRIVE,
+ ~BCMA_CCTRL_43224A0_12MA_LED_DRIVE,
BCMA_CCTRL_43224A0_12MA_LED_DRIVE);
} else {
bcma_chipco_chipctl_maskset(cc, 0,
- BCMA_CCTRL_43224B0_12MA_LED_DRIVE,
+ ~BCMA_CCTRL_43224B0_12MA_LED_DRIVE,
BCMA_CCTRL_43224B0_12MA_LED_DRIVE);
}
break;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] bcma: fix regression in pmu workaround reg masks
2012-07-26 9:15 [PATCH] bcma: fix regression in pmu workaround reg masks Hauke Mehrtens
@ 2012-07-26 10:06 ` David Miller
2012-07-26 21:07 ` Linus Torvalds
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2012-07-26 10:06 UTC (permalink / raw)
To: hauke
Cc: torvalds, linville, brcm80211-dev-list, linux-wireless, netdev,
linux-kernel, seth.forshee, pieterpg, brudley, arend, zajec5
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Thu, 26 Jul 2012 11:15:51 +0200
> This fixes a regression introduced in:
> commit b9562545ef0b13c0440ccd8d6dd4111fb77cb17a
> Author: Hauke Mehrtens <hauke@hauke-m.de>
> Date: Sat Jun 30 01:44:41 2012 +0200
>
> bcma: complete workaround for BCMA43224 and BCM4313
>
> The regression broke reading of the sprom from the chip and seamed to
> cause a change of the pci id on a BCMA43224 device so that it is
> rejected by brcmsmac. If this problem occurred, after applying this
> patch, a cold boot is needed to make the device work again.
>
> In the original patch the workaround set the intended bits in the chip
> common core chip control registers, but the patch also unset all the
> other bits in that register, because of a wrong mask. The original
> patch was based on code from brcmsmac and there was an additional
> inversing of the mask in the code setting these regs which was missing
> here. Now the regs are set like brcmsmac did it before.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Tested-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bcma: fix regression in pmu workaround reg masks
2012-07-26 9:15 [PATCH] bcma: fix regression in pmu workaround reg masks Hauke Mehrtens
2012-07-26 10:06 ` David Miller
@ 2012-07-26 21:07 ` Linus Torvalds
1 sibling, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 2012-07-26 21:07 UTC (permalink / raw)
To: Hauke Mehrtens
Cc: linville, davem, brcm80211-dev-list, linux-wireless, netdev,
linux-kernel, seth.forshee, pieterpg, brudley, Arend van Spriel,
Rafał Miłecki
Oops. For some reason I didn't see this email this morning, and grew
impatient and committed the patch without the sign-off and with a
different changelog.
My bad. Too much email.
Anyway, this is commit 1f03bf06e4e3 in my tree.
Linus
On Thu, Jul 26, 2012 at 2:15 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> This fixes a regression introduced in:
> commit b9562545ef0b13c0440ccd8d6dd4111fb77cb17a
...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-26 21:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-26 9:15 [PATCH] bcma: fix regression in pmu workaround reg masks Hauke Mehrtens
2012-07-26 10:06 ` David Miller
2012-07-26 21:07 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox