netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NET-NEXT PATCH 01/14] e1000e: disable correctable errors for quad ports while going to D3
@ 2008-11-21 18:59 Jeff Kirsher
  2008-11-21 18:59 ` [NET-NEXT PATCH 02/14] e1000e: commit speed/duplex changes for m88 PHY Jeff Kirsher
                   ` (13 more replies)
  0 siblings, 14 replies; 32+ messages in thread
From: Jeff Kirsher @ 2008-11-21 18:59 UTC (permalink / raw)
  To: davem; +Cc: netdev, jeff, Alexander Duyck, Bruce Allan, Jeff Kirsher

From: Alexander Duyck <alexander.h.duyck@intel.com>

There has been an issue seen with the pci-e quad port adapters that will
cause them to generate a pci-e correctable error on some system while
transitioning to D3.

Since no action is needed on this correctable error the simplest solution
is to mask off the reporting of correctable errors.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/e1000e/netdev.c |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index cc0502b..ebbb9f0 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -4462,7 +4462,27 @@ static int e1000_suspend(struct pci_dev *pdev, pm_message_t state)
 
 	pci_disable_device(pdev);
 
-	pci_set_power_state(pdev, pci_choose_state(pdev, state));
+	/*
+	 * The pci-e switch on some quad port adapters will report a
+	 * correctable error when the MAC transitions from D0 to D3.  To
+	 * prevent this we need to mask off the correctable errors on the
+	 * downstream port of the pci-e switch.
+	 */
+	if (adapter->flags & FLAG_IS_QUAD_PORT) {
+		struct pci_dev *us_dev = pdev->bus->self;
+		int pos = pci_find_capability(us_dev, PCI_CAP_ID_EXP);
+		u16 devctl;
+
+		pci_read_config_word(us_dev, pos + PCI_EXP_DEVCTL, &devctl);
+		pci_write_config_word(us_dev, pos + PCI_EXP_DEVCTL,
+		                      (devctl & ~PCI_EXP_DEVCTL_CERE));
+
+		pci_set_power_state(pdev, pci_choose_state(pdev, state));
+
+		pci_write_config_word(us_dev, pos + PCI_EXP_DEVCTL, devctl);
+	} else {
+		pci_set_power_state(pdev, pci_choose_state(pdev, state));
+	}
 
 	return 0;
 }


^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2008-11-22  1:02 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21 18:59 [NET-NEXT PATCH 01/14] e1000e: disable correctable errors for quad ports while going to D3 Jeff Kirsher
2008-11-21 18:59 ` [NET-NEXT PATCH 02/14] e1000e: commit speed/duplex changes for m88 PHY Jeff Kirsher
2008-11-22  0:50   ` David Miller
2008-11-21 18:59 ` [NET-NEXT PATCH 03/14] e1000e: 82571 check for link fix on 82571 serdes Jeff Kirsher
2008-11-22  0:50   ` David Miller
2008-11-21 18:59 ` [NET-NEXT PATCH 04/14] e1000e: update comments listing supported parts for each MAC family Jeff Kirsher
2008-11-22  0:51   ` David Miller
2008-11-21 19:00 ` [NET-NEXT PATCH 05/14] e1000e: check return of pci_save_state Jeff Kirsher
2008-11-22  0:51   ` David Miller
2008-11-21 19:00 ` [NET-NEXT PATCH 06/14] e1000e: remove unnecessary header file inclusions Jeff Kirsher
2008-11-22  0:53   ` David Miller
2008-11-21 19:00 ` [NET-NEXT PATCH 07/14] e1000e: ESB2 config after link up Jeff Kirsher
2008-11-22  0:53   ` David Miller
2008-11-21 19:01 ` [NET-NEXT PATCH 08/14] e1000e: link up/down messages must follow a specific format Jeff Kirsher
2008-11-21 19:04   ` Dan Williams
2008-11-21 19:23     ` Jeff Kirsher
2008-11-21 20:16       ` Stephen Hemminger
2008-11-21 21:19         ` Jeff Kirsher
2008-11-22  0:55   ` David Miller
2008-11-21 19:01 ` [NET-NEXT PATCH 09/14] e1000e: fix possible buffer overflow Jeff Kirsher
2008-11-22  0:57   ` David Miller
2008-11-21 19:01 ` [NET-NEXT PATCH 10/14] e1000e: sync change flow control variables with ixgbe Jeff Kirsher
2008-11-22  0:57   ` David Miller
2008-11-21 19:02 ` [NET-NEXT PATCH 11/14] e1000e: cosmetic newline in debug message Jeff Kirsher
2008-11-22  1:00   ` David Miller
2008-11-21 19:02 ` [NET-NEXT PATCH 12/14] e1000e: store EEPROM version number to prevent unnecessary NVM reads Jeff Kirsher
2008-11-22  1:00   ` David Miller
2008-11-21 19:02 ` [NET-NEXT PATCH 13/14] e1000e: fix incorrect link status when switch module pulled Jeff Kirsher
2008-11-22  1:01   ` David Miller
2008-11-21 19:02 ` [NET-NEXT PATCH 14/14] e1000e: check return code from NVM accesses and fix bank detection Jeff Kirsher
2008-11-22  1:02   ` David Miller
2008-11-22  0:49 ` [NET-NEXT PATCH 01/14] e1000e: disable correctable errors for quad ports while going to D3 David Miller

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).