aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2019-03-18 17:10:53 +1100
committerStewart Smith <stewart@linux.ibm.com>2019-03-28 15:24:12 +1100
commit14372fc9fb60601b9103bf08066c3391e3269676 (patch)
treec39439e8e0aed136cfe94a546b07f1605879418e
parent0ec1e37004da9d5bd03f178170abbc41e17914a2 (diff)
downloadskiboot-14372fc9fb60601b9103bf08066c3391e3269676.zip
skiboot-14372fc9fb60601b9103bf08066c3391e3269676.tar.gz
skiboot-14372fc9fb60601b9103bf08066c3391e3269676.tar.bz2
core/pci: Increase the max slot string size
The maximum string length for the slot label / device location code in the PCI summary is currently 32 characters. This results in some IBM location codes being truncated due to their length, e.g. PHB#0001:02:11.0 [SWDN] SLOT=C11 x8 PHB#0001:13:00.0 [EP ] *snip* LOC_CODE=U78D3.ND1.WZS004A-P1-C PHB#0001:13:00.1 [EP ] *snip* LOC_CODE=U78D3.ND1.WZS004A-P1-C PHB#0001:13:00.2 [EP ] *snip* LOC_CODE=U78D3.ND1.WZS004A-P1-C PHB#0001:13:00.3 [EP ] *snip* LOC_CODE=U78D3.ND1.WZS004A-P1-C Which obscure the actual location of the card, and it looks bad. This patch increases the maximum length of the label string to 80 characters since that's the maximum length for a location code. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r--core/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pci.c b/core/pci.c
index 454b501..7dbe6aa 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -1471,7 +1471,7 @@ static void pci_print_summary_line(struct phb *phb, struct pci_device *pd,
{
const char *label, *dtype, *s;
u32 vdid;
-#define MAX_SLOTSTR 32
+#define MAX_SLOTSTR 80
char slotstr[MAX_SLOTSTR + 1] = { 0, };
pci_cfg_read32(phb, pd->bdfn, 0, &vdid);