netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcma: don't fail for bad SPROM CRC
@ 2012-02-06 13:26 Henrik Rydberg
  2012-02-06 13:34 ` Arend van Spriel
  2012-02-06 17:08 ` Rafał Miłecki
  0 siblings, 2 replies; 6+ messages in thread
From: Henrik Rydberg @ 2012-02-06 13:26 UTC (permalink / raw)
  To: John W. Linville
  Cc: netdev, Henrik Rydberg, Arend van Spriel, Franky (Zhenhui) Lin,
	Rafał Miłecki

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

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);
-- 
1.7.9

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

* Re: [PATCH] bcma: don't fail for bad SPROM CRC
  2012-02-06 13:26 [PATCH] bcma: don't fail for bad SPROM CRC Henrik Rydberg
@ 2012-02-06 13:34 ` Arend van Spriel
  2012-02-06 13:48   ` Henrik Rydberg
  2012-02-06 17:08 ` Rafał Miłecki
  1 sibling, 1 reply; 6+ messages in thread
From: Arend van Spriel @ 2012-02-06 13:34 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: John W. Linville, netdev, Franky (Zhenhui) Lin, Rafał Miłecki

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

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

* Re: [PATCH] bcma: don't fail for bad SPROM CRC
  2012-02-06 13:34 ` Arend van Spriel
@ 2012-02-06 13:48   ` Henrik Rydberg
  0 siblings, 0 replies; 6+ messages in thread
From: Henrik Rydberg @ 2012-02-06 13:48 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: John W. Linville, netdev, Franky (Zhenhui) Lin, Rafał Miłecki

On Mon, Feb 06, 2012 at 02:34:08PM +0100, Arend van Spriel wrote:
> 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 .......

All fine with me. To avoid confusion, here is the patch again, with
the above inserted.

Thanks,
Henrik

---

From 57a4fbd1767b3c2e7c32d288b713e1b06e597bd6 Mon Sep 17 00:00:00 2001
From: Henrik Rydberg <rydberg@euromail.se>
Date: Tue, 31 Jan 2012 14:22:15 -0500
Subject: [PATCH] bcma: don't fail for bad SPROM CRC
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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 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>
---
 drivers/bcma/main.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

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);
-- 
1.7.9

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

* Re: [PATCH] bcma: don't fail for bad SPROM CRC
  2012-02-06 13:26 [PATCH] bcma: don't fail for bad SPROM CRC Henrik Rydberg
  2012-02-06 13:34 ` Arend van Spriel
@ 2012-02-06 17:08 ` Rafał Miłecki
  2012-02-06 17:35   ` Henrik Rydberg
  2012-02-06 19:28   ` Arend van Spriel
  1 sibling, 2 replies; 6+ messages in thread
From: Rafał Miłecki @ 2012-02-06 17:08 UTC (permalink / raw)
  To: Henrik Rydberg
  Cc: John W. Linville, netdev, Arend van Spriel, Franky (Zhenhui) Lin

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?

-- 
Rafał

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

* Re: [PATCH] bcma: don't fail for bad SPROM CRC
  2012-02-06 17:08 ` Rafał Miłecki
@ 2012-02-06 17:35   ` Henrik Rydberg
  2012-02-06 19:28   ` Arend van Spriel
  1 sibling, 0 replies; 6+ messages in thread
From: Henrik Rydberg @ 2012-02-06 17:35 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: John W. Linville, netdev, Arend van Spriel, Franky (Zhenhui) Lin

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

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

* Re: [PATCH] bcma: don't fail for bad SPROM CRC
  2012-02-06 17:08 ` Rafał Miłecki
  2012-02-06 17:35   ` Henrik Rydberg
@ 2012-02-06 19:28   ` Arend van Spriel
  1 sibling, 0 replies; 6+ messages in thread
From: Arend van Spriel @ 2012-02-06 19:28 UTC (permalink / raw)
  To: Rafał Miłecki
  Cc: Henrik Rydberg, John W. Linville, netdev, Franky (Zhenhui) Lin

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

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

end of thread, other threads:[~2012-02-06 19:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 13:26 [PATCH] bcma: don't fail for bad SPROM CRC Henrik Rydberg
2012-02-06 13:34 ` Arend van Spriel
2012-02-06 13:48   ` Henrik Rydberg
2012-02-06 17:08 ` Rafał Miłecki
2012-02-06 17:35   ` Henrik Rydberg
2012-02-06 19:28   ` Arend van Spriel

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