linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ssb: Fix all-ones boardflags
@ 2008-04-19 15:49 Michael Buesch
  0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2008-04-19 15:49 UTC (permalink / raw)
  To: John Linville
  Cc: Stefanik Gábor, Larry.Finger, bcm43xx-dev, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]

From: Larry Finger <Larry.Finger@lwfinger.net>

In the SSB SPROM a field set to all ones means the value
is not defined in the SPROM.
In case of the boardflags, we need to set them to zero
to avoid confusing drivers. Drivers will only check the
flags by ANDing.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>

---

John,

This is 2.6.26 material.


diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
index 904b1a8..57c4ccf 100644
--- a/drivers/ssb/pci.c
+++ b/drivers/ssb/pci.c
@@ -484,6 +484,11 @@ static int sprom_extract(struct ssb_bus *bus,
struct ssb_sprom *out,
 			goto unsupported;
 	}

+	if (out->boardflags_lo == 0xFFFF)
+		out->boardflags_lo = 0;  /* per specs */
+	if (out->boardflags_hi == 0xFFFF)
+		out->boardflags_hi = 0;  /* per specs */
+
 	return 0;
 unsupported:
 	ssb_printk(KERN_WARNING PFX "Unsupported SPROM revision %d "

-- 
Greetings Michael.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ssb-fix-unset-boardflags.patch --]
[-- Type: text/x-patch; name="ssb-fix-unset-boardflags.patch", Size: 498 bytes --]

diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
index 904b1a8..57c4ccf 100644
--- a/drivers/ssb/pci.c
+++ b/drivers/ssb/pci.c
@@ -484,6 +484,11 @@ static int sprom_extract(struct ssb_bus *bus, struct ssb_sprom *out,
 			goto unsupported;
 	}
 
+	if (out->boardflags_lo == 0xFFFF)
+		out->boardflags_lo = 0;  /* per specs */
+	if (out->boardflags_hi == 0xFFFF)
+		out->boardflags_hi = 0;  /* per specs */
+
 	return 0;
 unsupported:
 	ssb_printk(KERN_WARNING PFX "Unsupported SPROM revision %d "

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-19 15:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-19 15:49 [PATCH] ssb: Fix all-ones boardflags Michael Buesch

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