On Fri, Mar 19, 2010 at 10:12:55PM +0100, Michael Buesch wrote: > On Friday 19 March 2010 21:41:49 John W. Linville wrote: > > diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c > > index 0d6c028..6d51895 100644 > > --- a/drivers/ssb/scan.c > > +++ b/drivers/ssb/scan.c > > @@ -306,6 +306,10 @@ int ssb_bus_scan(struct ssb_bus *bus, > > } > > tmp = scan_read32(bus, 0, SSB_CHIPCO_CAP); > > bus->chipco.capabilities = tmp; > > + if (bus->chipco.dev->id.revision >= 11) { > > + tmp = scan_read32(bus, 0, SSB_CHIPCO_CHIPSTAT); > > + bus->chipco.status = tmp; > > + } > > Hm, Ok. There's another issue here. We're that early in the scan that > id.xxxx is not assigned, yet. I think chipco.dev might even be NULL here, so > it'd crash. > This gets a little bit ugly. The revisions are read later in the scan function. > And as you can see there the actual read is pretty ugly, too. > > What if we do not read the status _that_ early? We're really very very > early here. If you move the read into the chipcommon driver init, it will be much > easier. Yeah, that makes sense. Patch to follow... John -- John W. Linville Someday the world will need a hero, and you linville@xxxxxxxxxxxxx might be all we have. Be ready. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html