From: Dave Peterson <dsp@llnl.gov>
To: alan@lxorguk.ukuu.org.uk, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, bluesmoke-devel@lists.sourceforge.net
Subject: [PATCH 5/15] EDAC: e752x cleanup
Date: Thu, 2 Mar 2006 17:47:57 -0800 [thread overview]
Message-ID: <200603021747.57069.dsp@llnl.gov> (raw)
- Add ctl_dev field to "struct e752x_dev_info". Then we can eliminate
ugly switch statement from e752x_probe1().
- Remove code from e752x_probe1() that clears initial PCI bus parity
errors. The core EDAC module already does this.
Signed-Off-By: David S. Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>
---
Index: linux-2.6.16-rc5-edac/drivers/edac/e752x_edac.c
===================================================================
--- linux-2.6.16-rc5-edac.orig/drivers/edac/e752x_edac.c 2006-02-27 16:58:41.000000000 -0800
+++ linux-2.6.16-rc5-edac/drivers/edac/e752x_edac.c 2006-02-27 17:03:40.000000000 -0800
@@ -181,6 +181,7 @@ struct e752x_pvt {
struct e752x_dev_info {
u16 err_dev;
+ u16 ctl_dev;
const char *ctl_name;
};
@@ -207,12 +208,15 @@ struct e752x_error_info {
static const struct e752x_dev_info e752x_devs[] = {
[E7520] = {
.err_dev = PCI_DEVICE_ID_INTEL_7520_1_ERR,
+ .ctl_dev = PCI_DEVICE_ID_INTEL_7520_0,
.ctl_name = "E7520"},
[E7525] = {
.err_dev = PCI_DEVICE_ID_INTEL_7525_1_ERR,
+ .ctl_dev = PCI_DEVICE_ID_INTEL_7525_0,
.ctl_name = "E7525"},
[E7320] = {
.err_dev = PCI_DEVICE_ID_INTEL_7320_1_ERR,
+ .ctl_dev = PCI_DEVICE_ID_INTEL_7320_0,
.ctl_name = "E7320"},
};
@@ -742,7 +746,7 @@ static int e752x_probe1(struct pci_dev *
{
int rc = -ENODEV;
int index;
- u16 pci_data, stat;
+ u16 pci_data;
u32 stat32;
u16 stat16;
u8 stat8;
@@ -755,7 +759,6 @@ static int e752x_probe1(struct pci_dev *
int drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */
u32 dra;
unsigned long last_cumul_size;
- struct pci_dev *pres_dev;
struct pci_dev *dev = NULL;
debugf0("%s(): mci\n", __func__);
@@ -920,33 +923,9 @@ static int e752x_probe1(struct pci_dev *
goto fail;
}
- /* Walk through the PCI table and clear errors */
- switch (dev_idx) {
- case E7520:
- dev = pci_get_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_7520_0, NULL);
- break;
- case E7525:
- dev = pci_get_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_7525_0, NULL);
- break;
- case E7320:
- dev = pci_get_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_7320_0, NULL);
- break;
- }
-
-
+ dev = pci_get_device(PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].ctl_dev,
+ NULL);
pvt->dev_d0f0 = dev;
- for (pres_dev = dev;
- ((struct pci_dev *) pres_dev->global_list.next != dev);
- pres_dev = (struct pci_dev *) pres_dev->global_list.next) {
- pci_read_config_dword(pres_dev, PCI_COMMAND, &stat32);
- stat = (u16) (stat32 >> 16);
- /* clear any error bits */
- if (stat32 & ((1 << 6) + (1 << 8)))
- pci_write_config_word(pres_dev, PCI_STATUS, stat);
- }
/* find the error reporting device and clear errors */
dev = pvt->dev_d0f1 = pci_dev_get(pvt->bridge_ck);
/* Turn off error disable & SMI in case the BIOS turned it on */
reply other threads:[~2006-03-03 1:49 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=200603021747.57069.dsp@llnl.gov \
--to=dsp@llnl.gov \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bluesmoke-devel@lists.sourceforge.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome