From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: PATCH: EDAC - change default, also handle pulled hardware
Date: Mon, 09 Jan 2006 17:11:29 +0000 [thread overview]
Message-ID: <1136826689.6659.46.camel@localhost.localdomain> (raw)
If a card reports 0xFFFF check if the devid is also all 0xFFFFFFFF and
if so assume the card was pulled rather than showing parity errors. This
avoids us spewing errors when a card is yanked and hotplug hasn't caught
up with it.
Also default PCI scan to off as it has a performance impact and is
relevant to a minority of users only. Users can enable it when they need
it.
Alan
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.15-mm2/drivers/edac/edac_mc.c linux-2.6.15-mm2/drivers/edac/edac_mc.c
--- linux.vanilla-2.6.15-mm2/drivers/edac/edac_mc.c 2006-01-09 14:33:44.000000000 +0000
+++ linux-2.6.15-mm2/drivers/edac/edac_mc.c 2006-01-09 14:54:10.000000000 +0000
@@ -53,7 +53,7 @@
static int panic_on_ue = 1;
static int poll_msec = 1000;
-static int check_pci_parity = 1; /* default YES check PCI parity */
+static int check_pci_parity = 0; /* default NO check PCI parity */
static int panic_on_pci_parity = 0; /* default no panic on PCI Parity */
static atomic_t pci_parity_count = ATOMIC_INIT(0);
@@ -1755,6 +1755,17 @@
where = secondary ? PCI_SEC_STATUS : PCI_STATUS;
pci_read_config_word(dev, where, &status);
+
+ /* If we get back 0xFFFF then we must suspect that the card has been pulled but
+ the Linux PCI layer has not yet finished cleaning up. We don't want to report
+ on such devices */
+
+ if (status == 0xFFFF) {
+ u32 sanity;
+ pci_read_config_dword(dev, 0, &sanity);
+ if (sanity == 0xFFFFFFFF)
+ return 0;
+ }
status &= PCI_STATUS_DETECTED_PARITY | PCI_STATUS_SIG_SYSTEM_ERROR |
PCI_STATUS_PARITY;
reply other threads:[~2006-01-09 17:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1136826689.6659.46.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@osdl.org \
--cc=linux-kernel@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 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.