[libvirt] [PATCH] pci: fix link maximum speed detection

Marek Marczykowski-Górecki posted 1 patch 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1494940759-11913-1-git-send-email-marmarek@invisiblethingslab.com
src/util/virpci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] pci: fix link maximum speed detection
Posted by Marek Marczykowski-Górecki 6 years, 11 months ago
Commit 8e09663 "pci: recognize/report GEN4 (PCIe 4.0) card 16GT/s Link
speed" introduced another speed into enum, but mistakenly also altered
field width, so one bit of link width was included there.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
---
 src/util/virpci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virpci.c b/src/util/virpci.c
index 83c7e74..2c1b758 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -147,7 +147,7 @@ struct _virPCIDeviceList {
 #define PCI_EXP_DEVCAP          0x4     /* Device capabilities */
 #define PCI_EXP_DEVCAP_FLR     (1<<28)  /* Function Level Reset */
 #define PCI_EXP_LNKCAP          0xc     /* Link Capabilities */
-#define PCI_EXP_LNKCAP_SPEED    0x0001f /* Maximum Link Speed */
+#define PCI_EXP_LNKCAP_SPEED    0x0000f /* Maximum Link Speed */
 #define PCI_EXP_LNKCAP_WIDTH    0x003f0 /* Maximum Link Width */
 #define PCI_EXP_LNKSTA          0x12    /* Link Status */
 #define PCI_EXP_LNKSTA_SPEED    0x000f  /* Negotiated Link Speed */
-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] pci: fix link maximum speed detection
Posted by Michal Privoznik 6 years, 11 months ago
On 05/16/2017 03:19 PM, Marek Marczykowski-Górecki wrote:
> Commit 8e09663 "pci: recognize/report GEN4 (PCIe 4.0) card 16GT/s Link
> speed" introduced another speed into enum, but mistakenly also altered
> field width, so one bit of link width was included there.
> 
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> ---
>  src/util/virpci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/util/virpci.c b/src/util/virpci.c
> index 83c7e74..2c1b758 100644
> --- a/src/util/virpci.c
> +++ b/src/util/virpci.c
> @@ -147,7 +147,7 @@ struct _virPCIDeviceList {
>  #define PCI_EXP_DEVCAP          0x4     /* Device capabilities */
>  #define PCI_EXP_DEVCAP_FLR     (1<<28)  /* Function Level Reset */
>  #define PCI_EXP_LNKCAP          0xc     /* Link Capabilities */
> -#define PCI_EXP_LNKCAP_SPEED    0x0001f /* Maximum Link Speed */
> +#define PCI_EXP_LNKCAP_SPEED    0x0000f /* Maximum Link Speed */
>  #define PCI_EXP_LNKCAP_WIDTH    0x003f0 /* Maximum Link Width */
>  #define PCI_EXP_LNKSTA          0x12    /* Link Status */
>  #define PCI_EXP_LNKSTA_SPEED    0x000f  /* Negotiated Link Speed */
> 

ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list