diff mbox

bcma: don't fail for bad SPROM CRC

Message ID 1328534801-3477-1-git-send-email-rydberg@euromail.se
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Henrik Rydberg Feb. 6, 2012, 1:26 p.m. UTC
The brcmsmac driver is now checking the bcma SPROM CRCs, leaving some
chipsets unrecognized that were functional prior to the switch. In
particular, the current code bails out on recent Macbooks. This patch
simply ignores the outcome of the CRC check, with the argument that an
unrecognized SPROM should be treated similarly to a non-existing one.

Cc: Arend van Spriel <arend@broadcom.com>
Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Cc: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
Hi John,

It seems this patch may have gotten lost, at least I have not seen it
on any of the net/wireless parties. Arend, are you ok with the final
wording?

Thanks,
Henrik

 drivers/bcma/main.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

Comments

Arend van Spriel Feb. 6, 2012, 1:34 p.m. UTC | #1
On 02/06/2012 02:26 PM, Henrik Rydberg wrote:
> The brcmsmac driver is now checking the bcma SPROM CRCs, leaving some
> chipsets unrecognized that were functional prior to the switch. In
> particular, the current code bails out on recent Macbooks. This patch
> simply ignores the outcome of the CRC check, with the argument that an
> unrecognized SPROM should be treated similarly to a non-existing one.

Suggestion:

The brcmsmac driver is now registered as a bcma device driver. Some
chipsets fail on SPROM CRC check in the bcma bus driver. This leaves the
chipset unrecognized and the bcma bus is not registered so that brcmsmac
is not probed. In particular, the current code .......

Gr. AvS




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafał Miłecki Feb. 6, 2012, 5:08 p.m. UTC | #2
2012/2/6 Henrik Rydberg <rydberg@euromail.se>:
> The brcmsmac driver is now checking the bcma SPROM CRCs, leaving some
> chipsets unrecognized that were functional prior to the switch. In
> particular, the current code bails out on recent Macbooks. This patch
> simply ignores the outcome of the CRC check, with the argument that an
> unrecognized SPROM should be treated similarly to a non-existing one.

Have you maybe tried to look at the real solution?
Henrik Rydberg Feb. 6, 2012, 5:35 p.m. UTC | #3
On Mon, Feb 06, 2012 at 06:08:51PM +0100, Rafał Miłecki wrote:
> 2012/2/6 Henrik Rydberg <rydberg@euromail.se>:
> > The brcmsmac driver is now checking the bcma SPROM CRCs, leaving some
> > chipsets unrecognized that were functional prior to the switch. In
> > particular, the current code bails out on recent Macbooks. This patch
> > simply ignores the outcome of the CRC check, with the argument that an
> > unrecognized SPROM should be treated similarly to a non-existing one.
> 
> Have you maybe tried to look at the real solution?

No, this is a pure regression fix.

Henrik
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arend van Spriel Feb. 6, 2012, 7:28 p.m. UTC | #4
On 02/06/2012 06:08 PM, Rafał Miłecki wrote:
> 2012/2/6 Henrik Rydberg <rydberg@euromail.se>:
>> The brcmsmac driver is now checking the bcma SPROM CRCs, leaving some
>> chipsets unrecognized that were functional prior to the switch. In
>> particular, the current code bails out on recent Macbooks. This patch
>> simply ignores the outcome of the CRC check, with the argument that an
>> unrecognized SPROM should be treated similarly to a non-existing one.
> 
> Have you maybe tried to look at the real solution?
> 

It could be a new SPROM revision, but brcmsmac still does SPROM access
on its own accord and would fail the probe sequence. So it is probably
something else.

SPROM configuration can differ between chipsets and have the following
variations:

1) external SPROM: when following conditions are true
	chipcommon.capabilities & 0x40000000
	chipcommon.sromcontrol & 0x00000001
2) on-chip OTP: when following conditions are true
	for 4313: chipcommon.chipstatus & 2
	for 43224/43225: true

The real solution would be to take the variations into account. I
started tinkering on it, but not completed yet.

Gr. AvS

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index febbc0a..ec31f7d 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -169,10 +169,8 @@  int bcma_bus_register(struct bcma_bus *bus)
 	err = bcma_sprom_get(bus);
 	if (err == -ENOENT) {
 		pr_err("No SPROM available\n");
-	} else if (err) {
+	} else if (err)
 		pr_err("Failed to get SPROM: %d\n", err);
-		return -ENOENT;
-	}
 
 	/* Register found cores */
 	bcma_register_cores(bus);