Grant Grundler wrote: > On Mon, Sep 05, 2005 at 01:31:20PM -0500, Brian King wrote: >>+void pci_block_user_cfg_access(struct pci_dev *dev) >>+{ >>+ pci_save_state(dev); >>+ dev->block_ucfg_access = 1; >>+ mb(); >>+ while (spin_is_locked(&pci_lock)) >>+ cpu_relax(); >>+} >>+EXPORT_SYMBOL_GPL(pci_block_user_cfg_access); >>+ >>+/** >>+ * pci_unblock_user_cfg_access - Unblock userspace PCI config reads/writes >>+ * @dev: pci device struct >>+ * >>+ * This function allows userspace PCI config accesses to resume. >>+ **/ >>+void pci_unblock_user_cfg_access(struct pci_dev *dev) >>+{ >>+ dev->block_ucfg_access = 0; >>+} > > > Shouldn't pci_unblock_user_cfg_access() have a similar construct > as pci_block_user_cfg_access()? > > I'm thinking we don't want to pull the rug out from under someone > who is accessing the saved state, right? > Or does something else guarantee that? > > It wasn't obvious from this diff alone. Sounds reasonable enough. Updated patch attached. -- Brian King eServer Storage I/O IBM Linux Technology Center