render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
6d3351
From e971b5b913bc215ffb82419ae3db24a17ea094e8 Mon Sep 17 00:00:00 2001
6d3351
Message-Id: <e971b5b913bc215ffb82419ae3db24a17ea094e8@dist-git>
6d3351
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
6d3351
 <marmarek@invisiblethingslab.com>
6d3351
Date: Wed, 24 May 2017 12:56:09 -0400
6d3351
Subject: [PATCH] pci: fix link maximum speed detection
6d3351
MIME-Version: 1.0
6d3351
Content-Type: text/plain; charset=UTF-8
6d3351
Content-Transfer-Encoding: 8bit
6d3351
6d3351
Commit 8e09663 "pci: recognize/report GEN4 (PCIe 4.0) card 16GT/s Link
6d3351
speed" introduced another speed into enum, but mistakenly also altered
6d3351
field width, so one bit of link width was included there.
6d3351
6d3351
Resolves: https://bugzilla.redhat.com/1455017
6d3351
6d3351
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
6d3351
(cherry picked from commit 1128769f9ee50bb250333a5a5d276afbe74711ea)
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
---
6d3351
 src/util/virpci.c | 2 +-
6d3351
 1 file changed, 1 insertion(+), 1 deletion(-)
6d3351
6d3351
diff --git a/src/util/virpci.c b/src/util/virpci.c
6d3351
index c89b94b5f..a2db65d7d 100644
6d3351
--- a/src/util/virpci.c
6d3351
+++ b/src/util/virpci.c
6d3351
@@ -147,7 +147,7 @@ struct _virPCIDeviceList {
6d3351
 #define PCI_EXP_DEVCAP          0x4     /* Device capabilities */
6d3351
 #define PCI_EXP_DEVCAP_FLR     (1<<28)  /* Function Level Reset */
6d3351
 #define PCI_EXP_LNKCAP          0xc     /* Link Capabilities */
6d3351
-#define PCI_EXP_LNKCAP_SPEED    0x0001f /* Maximum Link Speed */
6d3351
+#define PCI_EXP_LNKCAP_SPEED    0x0000f /* Maximum Link Speed */
6d3351
 #define PCI_EXP_LNKCAP_WIDTH    0x003f0 /* Maximum Link Width */
6d3351
 #define PCI_EXP_LNKSTA          0x12    /* Link Status */
6d3351
 #define PCI_EXP_LNKSTA_SPEED    0x000f  /* Negotiated Link Speed */
6d3351
-- 
6d3351
2.13.0
6d3351