From: John W. Linville <linville@tuxdriver.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Michael Buesch <mb@bu3sch.de>,
b43-dev@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: [RFC/RFT] ssb: Avoid system hang when SPROM read fails
Date: Mon, 26 Apr 2010 13:15:05 -0400 [thread overview]
Message-ID: <20100426171505.GC2387@tuxdriver.com> (raw)
In-Reply-To: <4bd4c284.WBohOsmgdwRzw5JC%Larry.Finger@lwfinger.net>
On Sun, Apr 25, 2010 at 05:30:28PM -0500, Larry Finger wrote:
> In kernel Bugzilla #15825, the OP reports a case of intermittent reading
> of the SPROM. If such reads fail, the box hangs. Thanks to careful testing
> by bugzillakernelorg at lez.ath.cx has shown that the first read of the
> SPROM returns 0xFFFF with the hang happening on the next read.
>
> The source of the read failure is still under investigation; however,
> this patch does avoid the system hang.
>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>
> John,
>
> Does this patch avoid the system hang on your box?
>
> Larry
> ---
>
> ===================================================================
> --- wireless-testing.orig/drivers/ssb/pci.c
> +++ wireless-testing/drivers/ssb/pci.c
> @@ -253,6 +253,11 @@ static int sprom_do_read(struct ssb_bus
> {
> int i;
>
> + /* Check if SPROM can be read */
> + if (ioread16(bus->mmio + SSB_SPROM_BASE) == 0xFFFF) {
> + ssb_printk(KERN_ERR PFX "Unable to read SPROM\n");
> + return -ENODEV;
> + }
> for (i = 0; i < bus->sprom_size; i++)
> sprom[i] = ioread16(bus->mmio + SSB_SPROM_BASE + (i * 2));
>
Well, the "good" news is that I hit the "Unable to read SPROM" case.
The bad news is that the box still hangs after the -ENODEV. I have
not yet tracked-down the exact location of the current hang.
John
P.S. Sorry about the 'radio silence' -- I've been distracted with
some other things. Also, the box in question originally belonged
to someone else who had configured it in a way that was less than
friendly to kernel development. I finally reinstalled it...
--
John W. Linville Someday the world will need a hero, and you
linville at tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2010-04-26 17:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-25 22:30 [RFC/RFT] ssb: Avoid system hang when SPROM read fails Larry Finger
2010-04-26 17:15 ` John W. Linville [this message]
2010-04-26 18:04 ` Larry Finger
2010-04-26 18:32 ` John W. Linville
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=20100426171505.GC2387@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=Larry.Finger@lwfinger.net \
--cc=b43-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).