tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] pcictl: simplify its usage



Manuel Bouyer wrote:
> On Thu, Jun 04, 2009 at 10:28:18PM +0200, Christoph Egger wrote:
>>> But what we have right now does work !
>>> You just need to use the autoconf index instead of the bus number.
>>>
>>> Also, minor(dev) is not the PCI bus domain but the autoconf index.
>> Can I assume, that the 'i' iterator matches the autoconf index?
>> If yes, then I can compare 'i' with minor(dev).
> 
> Yes, and device_lookup() and device_lookup_private() does it for you.
> But with this we're back to the old code. You have to use different
> /dev/pciN for the different busses. I don't see this as a problem;
> I think all what you need is the list of PCI busses (list of autoconf indexes)
> which you could get by a specific ioctl (either a "get the list" ioctl,
> or a "get the next bus" ioctl).

At work, there's a 4-way Opteron machine having two primary PCI roots.
You find the second one via ACPI. The pciN starts with 128 on that
machine. Should we have 255 /dev/pciN device files then?

Christoph




Home | Main Index | Thread Index | Old Index