Re: [PATCH 1/2] pci: Block config access during BIST

From: Brian King
Date: Sat Nov 20 2004 - 21:03:43 EST


Benjamin Herrenschmidt wrote:
It still doesn't address Greg's issue about making this apply to the
pci_bus_* functions as well, but I'm not sure of a good way to do that
due to the reasons given earlier.


Looks good to me, I don't sure we actually have to deal with pci_bus_*
functions, do we ? When are they called ?

For what we are trying to solve, which is blocking userspace config
accesses, I don't think we do. Greg - are you ok with this?

+void pci_block_config_access(struct pci_dev *dev)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&pci_lock, flags);
+ dev->block_cfg_access = 1;
+ spin_unlock_irqrestore(&pci_lock, flags);
+}


Shouldn't we save the config space here ?

I thought about that when coding this up and thought it would
be better to simply have the function do what it advertises and no
more. Seems strange that a function called pci_block_config_access
would go and do a bunch of pci config accesses, but we can
certainly add it if you like.

-Brian

--
Brian King
eServer Storage I/O
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/