]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ssb: Fix all-ones boardflags
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 24 Apr 2008 18:00:45 +0000 (20:00 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 May 2008 21:44:35 +0000 (14:44 -0700)
commit 4503183aa32e6886400d82282292934fa64a81b0 upstream

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: Gabor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ssb/pci.c

index b434df75047f3a2e2527d6715fdd195664475303..274a448421df4e69e6b7339d6eed4c33fd990adb 100644 (file)
@@ -482,6 +482,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 "