On Thu, May 29, 2008 at 12:57:09PM -0600, Matthew Wilcox wrote: > I was thinking "That seems pretty dodgy". But it seems to be what the > driver does now in address_read_file(): > > if (bus->self) > retval = sprintf(buf, pci_name(bus->self)); > else > retval = sprintf(buf, "%04x:%02x:00.0", > pci_domain_nr(bus), bus->number); No, I'm wrong. This is dodgy. Basically, we need to know, given a slot, what PCI devfn a device will have that's plugged into it. There's a hint this might be possible to get from the OF node. Only available on ppc32, we see: reg = of_get_property(node, "reg", NULL); if (!reg) return -ENODEV; *bus = (reg[0] >> 16) & 0xff; *devfn = ((reg[0] >> 8) & 0xff); But this is for the OF node that's for the pci_dev, not for the OF node that's for the slot. Is there a property on the slot's OF node that would tell us the devfn (ok, not the 'fn' part, but YKWIM)? -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html