From: Larry Finger Date: Thu, 24 Apr 2008 18:00:45 +0000 (+0200) Subject: ssb: Fix all-ones boardflags X-Git-Tag: v2.6.25.1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad99c57f6a6bd8e820a05deec8bd7a3d6ce744fd;p=thirdparty%2Fkernel%2Fstable.git ssb: Fix all-ones boardflags 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 Signed-off-by: Gabor Stefanik Signed-off-by: Michael Buesch Signed-off-by: John W. Linville Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index b434df75047f3..274a448421df4 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c @@ -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 "