[PATCH v3 3/9] PCI: Remove PCIe suffix in pci_bus_speed_strings[]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove "PCIe" suffix of PCIe speed strings in
pci_bus_speed_strings[] array. For example, if we use the
array to decode link speed in __pcie_print_link_status,
it'll lead to redundancy like:
- nvme 0000:01:00.0: 16.000 Gb/s available PCIe bandwidth,
  limited by 5 GT/s x4 link at 0000:00:01.1 (capable of
  31.504 Gb/s with 8 GT/s x4 link)
+ nvme 0000:01:00.0: 16.000 Gb/s available PCIe bandwidth,
  limited by 5 GT/s PCIe x4 link at 0000:00:01.1 (capable
  of 31.504 Gb/s with 8 GT/s PCIe x4 link)

The patch introduces changes in sysfs when display
bus speed of certain slot from cur_bus_speed/max_bus_speed
in /sys/bus/pci/slots/*. It may looks like:
-/sys/bus/pci/slots/0/cur_bus_speed: 8 GT/s PCIe
+/sys/bus/pci/slots/0/cur_bus_speed: 8 GT/s
The following patch will compensate and display slot
bus speed with "PCIe" suffix as before.

[1] https://lore.kernel.org/linux-pci/20200114224909.GA19633@xxxxxxxxxx
[2] https://lore.kernel.org/linux-pci/20200205183531.GA229621@xxxxxxxxxx
Signed-off-by: Yicong Yang <yangyicong@xxxxxxxxxxxxx>
---
 drivers/pci/probe.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 4e997e7..6ce47d8 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -700,11 +700,11 @@ const char *pci_bus_speed_strings[] = {
 	"66 MHz PCI-X 533",	/* 0x11 */
 	"100 MHz PCI-X 533",	/* 0x12 */
 	"133 MHz PCI-X 533",	/* 0x13 */
-	"2.5 GT/s PCIe",	/* 0x14 */
-	"5.0 GT/s PCIe",	/* 0x15 */
-	"8.0 GT/s PCIe",	/* 0x16 */
-	"16.0 GT/s PCIe",	/* 0x17 */
-	"32.0 GT/s PCIe",	/* 0x18 */
+	"2.5 GT/s",	/* 0x14 */
+	"5.0 GT/s",	/* 0x15 */
+	"8.0 GT/s",	/* 0x16 */
+	"16.0 GT/s",	/* 0x17 */
+	"32.0 GT/s",	/* 0x18 */
 };
 const int pci_bus_speed_strings_size = ARRAY_SIZE(pci_bus_speed_strings);
 
-- 
2.8.1




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux