pastebin - collaborative debugging tool
rovema.kpaste.net RSS


igb_avb: 0002-Disable-pci_-_pcie_error_reporting-for-Linux-kernels.patch
Posted by Anonymous on Thu 14th Dec 2023 15:31
raw | new post

  1. From 60aa3f8321e3bbbb102d6e40f4b623444350d7d7 Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Tue, 12 Dec 2023 15:12:56 +0100
  4. Subject: [PATCH] Disable |pci_*_pcie_error_reporting()| for Linux kernels >=
  5.  6.6.0
  6.  
  7. |pci_enable_pcie_error_reporting()| enables the device to send ERR_*
  8. Messages.  Since commit #f26e58bf6f54 ("PCI/AER: Enable error
  9. reporting when AER is native"), the PCI core does this for all
  10. devices during enumeration, so this is no longer needed in igb_avb.
  11.  
  12. So disable the redundant |pci_enable_pcie_error_reporting()| and
  13. |pci_disable_pcie_error_reporting()| calls for Linux kernels >= 6.6.0
  14.  
  15. Note that this doesn't control interrupt generation by the Root Port;
  16. that is controlled by the AER Root Error Command register, which is
  17. managed by the AER service driver.
  18.  
  19. Signed-off-by: Marvin Wenzel <marvin.wenzel@rovema.de>
  20. ---
  21.  kmod/igb_main.c | 5 +++++
  22.  1 file changed, 5 insertions(+)
  23.  
  24. diff --git a/kmod/igb_main.c b/kmod/igb_main.c
  25. index 5d4c6db..0d51176 100755
  26. --- a/kmod/igb_main.c
  27. +++ b/kmod/igb_main.c
  28. @@ -2743,7 +2743,10 @@ static int igb_probe(struct pci_dev *pdev,
  29.         if (err)
  30.                 goto err_pci_reg;
  31.  
  32. +
  33. +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0) )
  34.         pci_enable_pcie_error_reporting(pdev);
  35. +#endif
  36.  
  37.         pci_set_master(pdev);
  38.  
  39. @@ -3307,7 +3310,9 @@ static void igb_remove(struct pci_dev *pdev)
  40.         mutex_destroy(&adapter->lock);
  41.         free_netdev(netdev);
  42.  
  43. +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0) )
  44.         pci_disable_pcie_error_reporting(pdev);
  45. +#endif
  46.  
  47.         pci_disable_device(pdev);
  48.  }
  49. --
  50. 2.30.2

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at