Skip to contentSkip to conversation

ssb: Fix all-ones boardflags

PATCH New Michael Buesch 1 participant 1 message Apr 24, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 ssb: Fix all-ones boardflags

From: Larry Finger <[email protected]>

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.

This patch is in wireless-testing.git, commit d30cdf8a251e88e58bc566f5acaa9eb97ac102e9

drivers/ssb/pci.c +5 -0
Index: linux-2.6.25/drivers/ssb/pci.c
===================================================================
@@ -482,6 +482,11 @@ static int sprom_extract(struct ssb_bus 
 			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 "