diff options
author | NeilBrown <neilb@suse.de> | 2010-08-10 04:02:33 +0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-08-10 04:02:33 +0400 |
commit | fd8aa2c1811bf60ccb2d5de0579c6f62aec1772d (patch) | |
tree | 311567d03758afc3a93b4273fe172836e89bb01d /drivers/ssb/pci.c | |
parent | 6e17b0276452912cb13445e5ea552b599984675f (diff) | |
parent | 2144381da478cc4aa3a29ee29b0c5e6ddaaced14 (diff) | |
download | linux-fd8aa2c1811bf60ccb2d5de0579c6f62aec1772d.tar.xz |
Merge git://git.infradead.org/users/dwmw2/libraid-2.6 into for-linus
Diffstat (limited to 'drivers/ssb/pci.c')
-rw-r--r-- | drivers/ssb/pci.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 6dcda86be6eb..6e88d2b603b4 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c @@ -626,11 +626,22 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus, return -ENODEV; } if (bus->chipco.dev) { /* can be unavailible! */ - bus->sprom_offset = (bus->chipco.dev->id.revision < 31) ? - SSB_SPROM_BASE1 : SSB_SPROM_BASE31; + /* + * get SPROM offset: SSB_SPROM_BASE1 except for + * chipcommon rev >= 31 or chip ID is 0x4312 and + * chipcommon status & 3 == 2 + */ + if (bus->chipco.dev->id.revision >= 31) + bus->sprom_offset = SSB_SPROM_BASE31; + else if (bus->chip_id == 0x4312 && + (bus->chipco.status & 0x03) == 2) + bus->sprom_offset = SSB_SPROM_BASE31; + else + bus->sprom_offset = SSB_SPROM_BASE1; } else { bus->sprom_offset = SSB_SPROM_BASE1; } + ssb_dprintk(KERN_INFO PFX "SPROM offset is 0x%x\n", bus->sprom_offset); buf = kcalloc(SSB_SPROMSIZE_WORDS_R123, sizeof(u16), GFP_KERNEL); if (!buf) |