aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c37
1 files changed, 7 insertions, 30 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 65071e40959b..a42f1c7ac18f 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -31,7 +31,6 @@
31#include <linux/etherdevice.h> 31#include <linux/etherdevice.h>
32#include <linux/ethtool.h> 32#include <linux/ethtool.h>
33#include <linux/pci.h> 33#include <linux/pci.h>
34#include <linux/aer.h>
35#include <linux/ip.h> 34#include <linux/ip.h>
36#include <net/ip.h> 35#include <net/ip.h>
37#include <linux/tcp.h> 36#include <linux/tcp.h>
@@ -2432,26 +2431,15 @@ static void sky2_hw_intr(struct sky2_hw *hw)
2432 2431
2433 if (status & Y2_IS_PCI_EXP) { 2432 if (status & Y2_IS_PCI_EXP) {
2434 /* PCI-Express uncorrectable Error occurred */ 2433 /* PCI-Express uncorrectable Error occurred */
2435 int aer = pci_find_aer_capability(hw->pdev);
2436 u32 err; 2434 u32 err;
2437 2435
2438 if (aer) { 2436 err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS);
2439 pci_read_config_dword(pdev, aer + PCI_ERR_UNCOR_STATUS, 2437 sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS,
2440 &err); 2438 0xfffffffful);
2441 pci_cleanup_aer_uncorrect_error_status(pdev);
2442 } else {
2443 /* Either AER not configured, or not working
2444 * because of bad MMCONFIG, so just do recover
2445 * manually.
2446 */
2447 err = sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS);
2448 sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS,
2449 0xfffffffful);
2450 }
2451
2452 if (net_ratelimit()) 2439 if (net_ratelimit())
2453 dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err); 2440 dev_err(&pdev->dev, "PCI Express error (0x%x)\n", err);
2454 2441
2442 sky2_read32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS);
2455 } 2443 }
2456 2444
2457 if (status & Y2_HWE_L1_MASK) 2445 if (status & Y2_HWE_L1_MASK)
@@ -2806,24 +2794,13 @@ static void sky2_reset(struct sky2_hw *hw)
2806 2794
2807 cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); 2795 cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
2808 if (cap) { 2796 if (cap) {
2809 if (pci_find_aer_capability(pdev)) { 2797 sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS,
2810 /* Check for advanced error reporting */ 2798 0xfffffffful);
2811 pci_cleanup_aer_uncorrect_error_status(pdev);
2812 pci_cleanup_aer_correct_error_status(pdev);
2813 } else {
2814 dev_warn(&pdev->dev,
2815 "PCI Express Advanced Error Reporting"
2816 " not configured or MMCONFIG problem?\n");
2817
2818 sky2_write32(hw, Y2_CFG_AER + PCI_ERR_UNCOR_STATUS,
2819 0xfffffffful);
2820 }
2821 2799
2822 /* If error bit is stuck on ignore it */ 2800 /* If error bit is stuck on ignore it */
2823 if (sky2_read32(hw, B0_HWE_ISRC) & Y2_IS_PCI_EXP) 2801 if (sky2_read32(hw, B0_HWE_ISRC) & Y2_IS_PCI_EXP)
2824 dev_info(&pdev->dev, "ignoring stuck error report bit\n"); 2802 dev_info(&pdev->dev, "ignoring stuck error report bit\n");
2825 2803 else
2826 else if (pci_enable_pcie_error_reporting(pdev))
2827 hwe_mask |= Y2_IS_PCI_EXP; 2804 hwe_mask |= Y2_IS_PCI_EXP;
2828 } 2805 }
2829 2806