ssb: Fix all-ones boardflags
authorLarry Finger <[email protected]>
Sat, 19 Apr 2008 15:52:12 +0000 (17:52 +0200)
committerJohn W. Linville <[email protected]>
Thu, 24 Apr 2008 01:25:35 +0000 (21:25 -0400)
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: Gabor Stefanik <[email protected]>
Signed-off-by: Michael Buesch <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
drivers/ssb/pci.c

index 904b1a8d088590bfc51d6d10935d35ce553b1a1c..57c4ccfab1ee79f28790c3fe7b8a48c1d0baa78e 100644 (file)
@@ -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 "