Message ID | 200908210848.39377.elendil@planet.nl |
---|---|
State | Awaiting Upstream, archived |
Delegated to: | David Miller |
Headers | show |
From: Frans Pop <elendil@planet.nl> Date: Fri, 21 Aug 2009 08:48:38 +0200 > From: Frans Pop <elendil@planet.nl> > Subject: net: Don't report an error if devices don't support AER > > The only error returned by pci_{en,dis}able_pcie_error_reporting() is > -EIO which simply means that Advanced Error Reporting is not supported. > There is no need to report that, so remove the error check from e1001e, > igb and ixgbe. > > Signed-off-by: Frans Pop <elendil@planet.nl> Intel folks, just let me know what you want me to do with this, if anything. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Aug 20, 2009 at 23:52, David Miller<davem@davemloft.net> wrote: > From: Frans Pop <elendil@planet.nl> > Date: Fri, 21 Aug 2009 08:48:38 +0200 > >> From: Frans Pop <elendil@planet.nl> >> Subject: net: Don't report an error if devices don't support AER >> >> The only error returned by pci_{en,dis}able_pcie_error_reporting() is >> -EIO which simply means that Advanced Error Reporting is not supported. >> There is no need to report that, so remove the error check from e1001e, >> igb and ixgbe. >> >> Signed-off-by: Frans Pop <elendil@planet.nl> > > Intel folks, just let me know what you want me to do with this, > if anything. > > Thanks. > -- I will add it to my queue of patches. I would like to have Emil touch test this patch at least before pushing the patch to Dave.
On Fri, 2009-08-21 at 08:48 +0200, Frans Pop wrote: [...] > @@ -5301,9 +5296,6 @@ static void __devexit e1000_remove(struct pci_dev *pdev) > > /* AER disable */ > err = pci_disable_pcie_error_reporting(pdev); > - if (err) > - dev_err(&pdev->dev, > - "pci_disable_pcie_error_reporting failed 0x%x\n", err); > > pci_disable_device(pdev); > } While you're at it, why don't you also remove the "err =" here, which allows you to drop the variable from that function completely? This applies to all three *_remove() functions. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Aug 20, 2009 at 23:48, Frans Pop<elendil@planet.nl> wrote: > On Friday 21 August 2009, Danny Feng wrote: >> You may also need to silence pci_disable_pcie_error_reporting, >> otherwise rmmod/shutdown, you will get >> >> e1000e 0000:00:19.0: pci_disable_pcie_error_reporting failed > > Yes, thanks. Exactly the same thing there. Updated patch below. > > > From: Frans Pop <elendil@planet.nl> > Subject: net: Don't report an error if devices don't support AER > > The only error returned by pci_{en,dis}able_pcie_error_reporting() is > -EIO which simply means that Advanced Error Reporting is not supported. > There is no need to report that, so remove the error check from e1001e, > igb and ixgbe. > > Signed-off-by: Frans Pop <elendil@planet.nl> > > diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c > index fa92a68..d67798f 100644 > --- a/drivers/net/e1000e/netdev.c > +++ b/drivers/net/e1000e/netdev.c > @@ -4983,12 +4983,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, > goto err_pci_reg; > > /* AER (Advanced Error Reporting) hooks */ > - err = pci_enable_pcie_error_reporting(pdev); > - if (err) { > - dev_err(&pdev->dev, "pci_enable_pcie_error_reporting failed " > - "0x%x\n", err); > - /* non-fatal, continue */ > - } > + pci_enable_pcie_error_reporting(pdev); > > pci_set_master(pdev); > /* PCI config space info */ > @@ -5301,9 +5296,6 @@ static void __devexit e1000_remove(struct pci_dev *pdev) > > /* AER disable */ > err = pci_disable_pcie_error_reporting(pdev); > - if (err) > - dev_err(&pdev->dev, > - "pci_disable_pcie_error_reporting failed 0x%x\n", err); > > pci_disable_device(pdev); > } > diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c > index adb09d3..1533d6f 100644 > --- a/drivers/net/igb/igb_main.c > +++ b/drivers/net/igb/igb_main.c > @@ -1232,12 +1232,7 @@ static int __devinit igb_probe(struct pci_dev *pdev, > if (err) > goto err_pci_reg; > > - err = pci_enable_pcie_error_reporting(pdev); > - if (err) { > - dev_err(&pdev->dev, "pci_enable_pcie_error_reporting failed " > - "0x%x\n", err); > - /* non-fatal, continue */ > - } > + pci_enable_pcie_error_reporting(pdev); > > pci_set_master(pdev); > pci_save_state(pdev); > @@ -1668,9 +1663,6 @@ static void __devexit igb_remove(struct pci_dev *pdev) > free_netdev(netdev); > > err = pci_disable_pcie_error_reporting(pdev); > - if (err) > - dev_err(&pdev->dev, > - "pci_disable_pcie_error_reporting failed 0x%x\n", err); > > pci_disable_device(pdev); > } > diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c > index 77b0381..777556d 100644 > --- a/drivers/net/ixgbe/ixgbe_main.c > +++ b/drivers/net/ixgbe/ixgbe_main.c > @@ -5430,12 +5430,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, > goto err_pci_reg; > } > > - err = pci_enable_pcie_error_reporting(pdev); > - if (err) { > - dev_err(&pdev->dev, "pci_enable_pcie_error_reporting failed " > - "0x%x\n", err); > - /* non-fatal, continue */ > - } > + pci_enable_pcie_error_reporting(pdev); > > pci_set_master(pdev); > pci_save_state(pdev); > @@ -5795,9 +5790,6 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) > free_netdev(netdev); > > err = pci_disable_pcie_error_reporting(pdev); > - if (err) > - dev_err(&pdev->dev, > - "pci_disable_pcie_error_reporting failed 0x%x\n", err); > > pci_disable_device(pdev); > } Patch looks fine Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index fa92a68..d67798f 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c @@ -4983,12 +4983,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, goto err_pci_reg; /* AER (Advanced Error Reporting) hooks */ - err = pci_enable_pcie_error_reporting(pdev); - if (err) { - dev_err(&pdev->dev, "pci_enable_pcie_error_reporting failed " - "0x%x\n", err); - /* non-fatal, continue */ - } + pci_enable_pcie_error_reporting(pdev); pci_set_master(pdev); /* PCI config space info */ @@ -5301,9 +5296,6 @@ static void __devexit e1000_remove(struct pci_dev *pdev) /* AER disable */ err = pci_disable_pcie_error_reporting(pdev); - if (err) - dev_err(&pdev->dev, - "pci_disable_pcie_error_reporting failed 0x%x\n", err); pci_disable_device(pdev); } diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index adb09d3..1533d6f 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -1232,12 +1232,7 @@ static int __devinit igb_probe(struct pci_dev *pdev, if (err) goto err_pci_reg; - err = pci_enable_pcie_error_reporting(pdev); - if (err) { - dev_err(&pdev->dev, "pci_enable_pcie_error_reporting failed " - "0x%x\n", err); - /* non-fatal, continue */ - } + pci_enable_pcie_error_reporting(pdev); pci_set_master(pdev); pci_save_state(pdev); @@ -1668,9 +1663,6 @@ static void __devexit igb_remove(struct pci_dev *pdev) free_netdev(netdev); err = pci_disable_pcie_error_reporting(pdev); - if (err) - dev_err(&pdev->dev, - "pci_disable_pcie_error_reporting failed 0x%x\n", err); pci_disable_device(pdev); } diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 77b0381..777556d 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -5430,12 +5430,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, goto err_pci_reg; } - err = pci_enable_pcie_error_reporting(pdev); - if (err) { - dev_err(&pdev->dev, "pci_enable_pcie_error_reporting failed " - "0x%x\n", err); - /* non-fatal, continue */ - } + pci_enable_pcie_error_reporting(pdev); pci_set_master(pdev); pci_save_state(pdev); @@ -5795,9 +5790,6 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev) free_netdev(netdev); err = pci_disable_pcie_error_reporting(pdev); - if (err) - dev_err(&pdev->dev, - "pci_disable_pcie_error_reporting failed 0x%x\n", err); pci_disable_device(pdev); }