Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34041
b: refs/heads/master
c: f357b4c
h: refs/heads/master
i:
  34039: f3194cf
v: v3
  • Loading branch information
Michael Ellerman authored and Stephen Rothwell committed Jul 13, 2006
1 parent 43663fa commit 4ce1b2d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 06a36db1d712242a00cb30aaebdd088b4be28082
refs/heads/master: f357b4cc5826ae55a5f3893424502cb15c6b6eba
20 changes: 12 additions & 8 deletions trunk/arch/powerpc/platforms/iseries/vpdinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,16 @@ static void __init iSeries_Parse_Vpd(u8 *VpdData, int VpdDataLen,
}
}

static void __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent,
static int __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent,
u8 *frame, char card[4])
{
int status = 0;
int BusVpdLen = 0;
u8 *BusVpdPtr = kmalloc(BUS_VPDSIZE, GFP_KERNEL);

if (BusVpdPtr == NULL) {
printk("PCI: Bus VPD Buffer allocation failure.\n");
return;
return 0;
}
BusVpdLen = HvCallPci_getBusVpd(bus, iseries_hv_addr(BusVpdPtr),
BUS_VPDSIZE);
Expand All @@ -228,8 +229,10 @@ static void __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent,
goto out_free;
}
iSeries_Parse_Vpd(BusVpdPtr, BusVpdLen, agent, frame, card);
status = 1;
out_free:
kfree(BusVpdPtr);
return status;
}

/*
Expand All @@ -246,7 +249,7 @@ void __init iSeries_Device_Information(struct pci_dev *PciDev, int count)
struct device_node *DevNode = PciDev->sysdata;
struct pci_dn *pdn;
u16 bus;
u8 frame;
u8 frame = 0;
char card[4];
HvSubBusNumber subbus;
HvAgentId agent;
Expand All @@ -262,10 +265,11 @@ void __init iSeries_Device_Information(struct pci_dev *PciDev, int count)
subbus = pdn->bussubno;
agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus),
ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus));
iSeries_Get_Location_Code(bus, agent, &frame, card);

printk("%d. PCI: Bus%3d, Device%3d, Vendor %04X Frame%3d, Card %4s ",
count, bus, PCI_SLOT(PciDev->devfn), PciDev->vendor,
frame, card);
printk("0x%04X\n", (int)(PciDev->class >> 8));
if (iSeries_Get_Location_Code(bus, agent, &frame, card)) {
printk("%d. PCI: Bus%3d, Device%3d, Vendor %04X Frame%3d, "
"Card %4s 0x%04X\n", count, bus,
PCI_SLOT(PciDev->devfn), PciDev->vendor, frame,
card, (int)(PciDev->class >> 8));
}
}

0 comments on commit 4ce1b2d

Please sign in to comment.