From: Stephen Hemminger <shemminger@vyatta.com>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: netdev@vger.kernel.org
Subject: Re: Kernel crash with sky2
Date: Mon, 17 May 2010 12:22:36 -0700 [thread overview]
Message-ID: <20100517122236.7f33101f@nehalam> (raw)
In-Reply-To: <20100517185228.GG9007@amd.com>
On Mon, 17 May 2010 20:52:28 +0200
Joerg Roedel <joerg.roedel@amd.com> wrote:
> Hi Stephen,
>
> I experience the following crash with 2.6.34 in the sky2 code on my
> laptop when I plug off the lan-cable and then plug-off the power cable
> and switching to battery. It does not happen with acpi=off.
So you have a busted BIOS that powers off the device.
> I havn't tested earlier kernels but I can do that if necessary. I did
> some initial research and found that the driver assumes that port[1] is
> available when the status bits for it are set on the device. Please let
> me know if you need any additional information or want me to test
> anything.
The driver assumes that it won't get garbage in NAPI.
> The crash message is:
>
> [ 107.010134] sky2 0000:02:00.0: PCI hardware error (0xffff)
> [ 107.015614] sky2 0000:02:00.0: PCI Express error (0xffffffff)
> [ 107.021355] sky2 0000:02:00.0: eth0: ram data read parity error
> [ 107.027249] sky2 0000:02:00.0: eth0: ram data write parity error
> [ 107.033253] sky2 0000:02:00.0: eth0: MAC parity error
> [ 107.038283] sky2 0000:02:00.0: eth0: RX parity error
> [ 107.043259] sky2 0000:02:00.0: eth0: TCP segmentation error
> [ 107.048823] BUG: unable to handle kernel NULL pointer dereference at 0000000000000438
> [ 107.053238] IP: [<ffffffffa0001713>] sky2_hw_error+0x153/0x310 [sky2]
> [ 107.053238] PGD 139600067 PUD 139643067 PMD 0
> [ 107.053238] Oops: 0000 [#1] SMP
> [ 107.053238] last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
> [ 107.053238] CPU 1
> [ 107.053238] Modules linked in: snd_hda_codec_atihdmi snd_hda_codec_idt snd_hda_intel rfcomm snd_pcm_oss snd_hda_2
> [ 107.053238]
Something in power management has turned off your device.
The fact that the sky2 driver has decided to die is unintended casulty.
This will stop the crash, but not fix the problem with PM.
As soon as it sees the device off, it will go offline until you reboot.
--- a/drivers/net/sky2.c 2010-05-17 12:09:22.721738360 -0700
+++ b/drivers/net/sky2.c 2010-05-17 12:19:52.845893670 -0700
@@ -2904,6 +2904,16 @@ static int sky2_poll(struct napi_struct
int work_done = 0;
u16 idx;
+ if (unlikely(status == ~0)) {
+ int i;
+ dev_err(&hw->pdev->dev,
+ "device no longer available (powered off?)\n");
+
+ for (i = 0; i < hw->ports; i++)
+ netif_device_detach(hw->dev[i]);
+ goto complete;
+ }
+
if (unlikely(status & Y2_IS_ERROR))
sky2_err_intr(hw, status);
@@ -2922,7 +2932,7 @@ static int sky2_poll(struct napi_struct
if (work_done >= work_limit)
goto done;
}
-
+complete:
napi_complete(napi);
sky2_read32(hw, B0_Y2_SP_LISR);
done:
--
next prev parent reply other threads:[~2010-05-17 19:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 18:52 Kernel crash with sky2 Joerg Roedel
2010-05-17 19:22 ` Stephen Hemminger [this message]
2010-05-18 11:01 ` Roedel, Joerg
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=20100517122236.7f33101f@nehalam \
--to=shemminger@vyatta.com \
--cc=joerg.roedel@amd.com \
--cc=netdev@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox