ssb: Fix all-ones boardflags
PATCH 1/1 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.
Signed-off-by Larry Finger <[email protected]>
Signed-off-by Gábor Stefanik <[email protected]>
Signed-off-by Michael Buesch <[email protected]>
---
John,
This is 2.6.26 material.
drivers/ssb/pci.c +0 -0
@@ -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 "
Signature · 1 line
Greetings Michael.
drivers/ssb/pci.c +5 -0
@@ -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 "