Merge tag ‘pci-v5.1-fixes-3’ of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci [Linux 5.1]

Merge tag ‘pci-v5.1-fixes-3’ of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci [Linux 5.1]

This Linux kernel change "Merge tag ‘pci-v5.1-fixes-3’ of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci" is included in the Linux 5.1 release. This change is authored by Linus Torvalds <torvalds [at] linux-foundation.org> on Thu May 2 08:29:24 2019 -0700. The commit for this change in Linux stable tree is b7a5b22 (patch). Other info about this change: Merge: e2a4b10 2078e1e

Merge tag 'pci-v5.1-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:
 "I apologize for sending these so late in the cycle. We went back and
  forth about how to deal with the unexpected logging of intentional
  link state changes and finally decided to just config them off by
  default.

  PCI fixes:

   - Stop ignoring "pci=disable_acs_redir" parameter (Logan Gunthorpe)

   - Use shared MSI/MSI-X vector for Link Bandwidth Management (Alex
     Williamson)

   - Add Kconfig option for Link Bandwidth notification messages (Keith
     Busch)"

* tag 'pci-v5.1-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI/LINK: Add Kconfig option (default off)
  PCI/portdrv: Use shared MSI/MSI-X vector for Bandwidth Management
  PCI: Fix issue with "pci=disable_acs_redir" parameter being ignored

There is no are 0 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/pci/pcie/Kconfig   | 8 ++++++++
 drivers/pci/pcie/Makefile  | 2 +-
 drivers/pci/pcie/portdrv.h | 4 ++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
index 5cbdbca..362eb8c 100644
--- a/drivers/pci/pcie/Kconfig
+++ b/drivers/pci/pcie/Kconfig
@@ -142,3 +142,11 @@ config PCIE_PTM

      This is only useful if you have devices that support PTM, but it
      is safe to enable even if you don't.
+
+config PCIE_BW
+   bool "PCI Express Bandwidth Change Notification"
+   depends on PCIEPORTBUS
+   help
+     This enables PCI Express Bandwidth Change Notification.  If
+     you know link width or rate changes occur only to correct
+     unreliable links, you may answer Y.
diff --git a/drivers/pci/pcie/Makefile b/drivers/pci/pcie/Makefile
index f1d7bc1..efb9d2e 100644
--- a/drivers/pci/pcie/Makefile
+++ b/drivers/pci/pcie/Makefile
@@ -3,7 +3,6 @@
 # Makefile for PCI Express features and port driver

 pcieportdrv-y          := portdrv_core.o portdrv_pci.o err.o
-pcieportdrv-y          += bw_notification.o

 obj-$(CONFIG_PCIEPORTBUS)  += pcieportdrv.o

@@ -13,3 +12,4 @@ obj-$(CONFIG_PCIEAER_INJECT)  += aer_inject.o
 obj-$(CONFIG_PCIE_PME)     += pme.o
 obj-$(CONFIG_PCIE_DPC)     += dpc.o
 obj-$(CONFIG_PCIE_PTM)     += ptm.o
+obj-$(CONFIG_PCIE_BW)      += bw_notification.o
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h
index 1d50dc5..944827a 100644
--- a/drivers/pci/pcie/portdrv.h
+++ b/drivers/pci/pcie/portdrv.h
@@ -49,7 +49,11 @@
 static inline int pcie_dpc_init(void) { return 0; }
 #endif

+#ifdef CONFIG_PCIE_BW
 int pcie_bandwidth_notification_init(void);
+#else
+static inline int pcie_bandwidth_notification_init(void) { return 0; }
+#endif

 /* Port Type */
 #define PCIE_ANY_PORT          (~0)

Leave a Reply

Your email address will not be published. Required fields are marked *