On Mon, 2008-11-17 at 21:50 +0100, Martin Mares wrote: [...] > > static int > > -sysfs_setup(struct pci_dev *d, int rw) > > +sysfs_setup(struct pci_dev *d, int flags) > > { > > struct pci_access *a = d->access; > > > > - if (a->cached_dev != d || a->fd_flags < rw) > > + if (a->cached_dev != d || > > + (flags ^ a->fd_flags) & FD_VPD || > > + (flags & FD_RW) && !(a->fd_flags & FD_RW)) > > Sharing a->fd for both file descriptors is ugly and it causes the sysfs file > with configuration space to be reopened during a single run of lspci. Could > you please add another member to struct pci_dev? I assume you mean struct pci_access? I was concerned about breaking the ABI, but if struct pci_access is required to be allocated by libpci this would be safe. Ben. -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. -- 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