Blame SOURCES/0001-Stop-reading-VPD-data-once-VPD-R-section-has-been-re.patch

8ebaa5
From cf9db86987ccbc1a0eefd77e7b2f8b1c761be1a9 Mon Sep 17 00:00:00 2001
8ebaa5
From: Jordan Hargrave <Jordan_Hargrave@dell.com>
8ebaa5
Date: Wed, 16 Oct 2013 15:12:06 -0500
8ebaa5
Subject: [PATCH] Stop reading VPD data once VPD-R section has been read
8ebaa5
 Mellanox cards were taking too long to read entire VPD
8ebaa5
8ebaa5
---
8ebaa5
 src/pci.c | 5 +++--
8ebaa5
 1 file changed, 3 insertions(+), 2 deletions(-)
8ebaa5
8ebaa5
diff --git a/src/pci.c b/src/pci.c
8ebaa5
index 7aa32fc..a2b9faa 100644
8ebaa5
--- a/src/pci.c
8ebaa5
+++ b/src/pci.c
8ebaa5
@@ -30,6 +30,7 @@ extern int is_valid_smbios;
8ebaa5
 /* Borrowed from kernel vpd code */
8ebaa5
 #define PCI_VPD_LRDT 			0x80
8ebaa5
 #define PCI_VPD_SRDT_END 		0x78
8ebaa5
+#define PCI_VPDR_TAG                    0x90
8ebaa5
 
8ebaa5
 #define PCI_VPD_SRDT_LEN_MASK		0x7
8ebaa5
 #define PCI_VPD_LRDT_TAG_SIZE		3
8ebaa5
@@ -71,7 +72,7 @@ static int pci_vpd_size(struct pci_device *pdev, int fd)
8ebaa5
 			tag = buf[0] & ~PCI_VPD_SRDT_LEN_MASK;
8ebaa5
 			off += PCI_VPD_SRDT_TAG_SIZE + pci_vpd_srdt_size(buf);
8ebaa5
 		}
8ebaa5
-		if (tag == 0 || tag == 0xFF || tag == PCI_VPD_SRDT_END)
8ebaa5
+		if (tag == 0 || tag == 0xFF || tag == PCI_VPD_SRDT_END || tag == PCI_VPDR_TAG)
8ebaa5
 			break;
8ebaa5
 	}
8ebaa5
 	return off;
8ebaa5
@@ -125,7 +126,7 @@ static int parse_vpd(struct libbiosdevname_state *state, struct pci_device *pdev
8ebaa5
 	int i, j, k, isz, jsz, port, func, pfi;
8ebaa5
 	struct pci_device *vf;
8ebaa5
 
8ebaa5
-	i = pci_vpd_find_tag(vpd, 0, len, 0x90);
8ebaa5
+	i = pci_vpd_find_tag(vpd, 0, len, PCI_VPDR_TAG);
8ebaa5
 	if (i < 0)
8ebaa5
 		return 1;
8ebaa5
 	isz = pci_vpd_lrdt_size(&vpd[i]);
8ebaa5
-- 
8ebaa5
1.8.5.3
8ebaa5