Thanks for looking at this, Greg. Greg KH wrote: > On Fri, Jan 28, 2005 at 08:35:46AM -0600, Brian King wrote: >>+PCI_USER_READ_CONFIG(byte, u8) >>+PCI_USER_READ_CONFIG(word, u16) >>+PCI_USER_READ_CONFIG(dword, u32) >>+PCI_USER_WRITE_CONFIG(byte, u8) >>+PCI_USER_WRITE_CONFIG(word, u16) >>+PCI_USER_WRITE_CONFIG(dword, u32) > > > Global but not exported? If so, they are local to the pci core, right? > And if so, please put them in the drivers/pci/pci.h file and not the > include/linux/pci.h file. Ok. They are now local to pci core. >>+/** >>+ * pci_block_user_cfg_access - Block userspace PCI config reads/writes >>+ * @dev: pci device struct >>+ * >>+ * This function blocks any userspace PCI config accesses from occurring. >>+ * When blocked, any writes will return -EBUSY and reads will return the >>+ * data saved using pci_save_state for the first 64 bytes of config >>+ * space and return -EBUSY for all other config reads. >>+ * >>+ * Return value: >>+ * nothing > > > We know the return value is not needed by the way the function is > defined, these two lines are unneeded. Deleted. >>+void pci_block_user_cfg_access(struct pci_dev *dev) >>+{ >>+ unsigned long flags; >>+ >>+ pci_save_state(dev); >>+ spin_lock_irqsave(&pci_lock, flags); >>+ dev->block_ucfg_access = 1; >>+ spin_unlock_irqrestore(&pci_lock, flags); >>+} >>+EXPORT_SYMBOL(pci_block_user_cfg_access); > > > EXPORT_SYMBOL_GPL() please? Ok. >>+/** >>+ * pci_unblock_user_cfg_access - Unblock userspace PCI config reads/writes >>+ * @dev: pci device struct >>+ * >>+ * This function allows userspace PCI config accesses to resume. >>+ * >>+ * Return value: >>+ * nothing > > > Same here as above. Done. >>+void pci_unblock_user_cfg_access(struct pci_dev *dev) >>+{ >>+ unsigned long flags; >>+ >>+ spin_lock_irqsave(&pci_lock, flags); >>+ dev->block_ucfg_access = 0; >>+ spin_unlock_irqrestore(&pci_lock, flags); >>+} >>+EXPORT_SYMBOL(pci_unblock_user_cfg_access); > > > Same as above. Done. >>@@ -896,6 +904,8 @@ extern void pci_disable_msix(struct pci_ >> extern void msi_remove_pci_irq_vectors(struct pci_dev *dev); >> #endif >> >>+extern void pci_block_user_cfg_access(struct pci_dev *dev); >>+extern void pci_unblock_user_cfg_access(struct pci_dev *dev); >> #endif /* CONFIG_PCI */ > > > Don't need empty functions for these if CONFIG_PCI is not enabled? Who > would be calling these functions, drivers? If so, please create the > empty functions. Yes, device drivers would be one of the potential users of these functions. Added the empty functions. > Also, please CC the linux-pci mailing list for pci specific patches like > this. Done. Here is an updated patch... -- Brian King eServer Storage I/O IBM Linux Technology Center