tech-userlevel archive

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

Re: [PATCH] pcictl: simplify its usage



On Thu, Jun 04, 2009 at 01:02:53PM -0400, der Mouse wrote:
> > Yes.  I'm not sure you need a new /dev/pci.  /dev/pci* can already
> > handle requests for all PCI busses [...]
> 
> But you need /dev/pci in order to have something to open when you don't
> have a bus number available.  (There is nothing that compels busses to
> be numbered starting 0, and, if pci0 is explicitly configured but not
> found, it won't exist.  Or are /dev/pci* openable even if the
> corresponding bus was not actually configured?)

No, you're right. But that would be a very strange kernel config file;
PCI busses are numbered starting from 0, increasing each time autoconf
finds a new bus. Of course you could iterate over the /dev/pci* until you
find one that works.
OK, we could have a /dev/pci that can always be openned. My point was that
the existing API is fine, it justs needs to be extended to get a
PCI_IOC_BUSINFO-like that works for an arbitrary bus number.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index