All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Michael Buesch <mb@bu3sch.de>
Cc: linux-wireless@vger.kernel.org,
	Larry Finger <Larry.Finger@lwfinger.net>,
	stable@kernel.org
Subject: Re: [PATCH v3] ssb: do not read SPROM if it does not exist
Date: Fri, 19 Mar 2010 18:10:48 -0400	[thread overview]
Message-ID: <20100319221048.GG9552@tuxdriver.com> (raw)
In-Reply-To: <201003192212.55680.mb@bu3sch.de>

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@tuxdriver.com			might be all we have.  Be ready.

  reply	other threads:[~2010-03-19 22:11 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 17:46 RFC: A workaround for BCM43XX devices with no on-board SPROM Larry Finger
2010-03-18 19:31 ` Michael Buesch
2010-03-18 20:20   ` John W. Linville
2010-03-18 20:31     ` Johannes Berg
2010-03-18 21:38   ` Larry Finger
2010-03-19  7:36     ` Michael Buesch
2010-03-18 20:51 ` Nicolas de Pesloüan
2010-03-18 20:53 ` Johannes Berg
2010-03-18 21:10   ` Larry Finger
2010-03-18 21:20     ` Johannes Berg
2010-03-18 21:47       ` Larry Finger
2010-03-19 18:40     ` Kalle Valo
2010-03-19 19:08 ` [PATCH] ssb: do not read SPROM if it does not exist John W. Linville
2010-03-19 19:41   ` Michael Buesch
2010-03-19 19:46     ` Michael Buesch
2010-03-19 20:21     ` John W. Linville
2010-03-19 20:30       ` Michael Buesch
2010-03-19 20:31         ` John W. Linville
2010-03-19 20:33   ` [PATCH v2] " John W. Linville
2010-03-19 20:41     ` [PATCH v3] " John W. Linville
2010-03-19 21:12       ` Michael Buesch
2010-03-19 22:10         ` John W. Linville [this message]
2010-03-19 22:10         ` [PATCH v4] " John W. Linville
  -- strict thread matches above, loose matches on Subject: below --
2010-03-31 19:39 [PATCH V3] " John W. Linville
2010-03-31 19:42 ` Rafał Miłecki
2010-04-01 14:23 ` Michael Buesch
2010-04-01 14:28 ` Michael Buesch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100319221048.GG9552@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.