[lkml]   [2004]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/2] pci: Block config access during BIST
Greg KH wrote:
> On Fri, Nov 19, 2004 at 02:23:22PM -0600, wrote:
>>-static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val)
>>- return pci_bus_read_config_byte (dev->bus, dev->devfn, where, val);
> Well, as much as I despise this patch, you should at least get it
> correct :)
> You need to block the pci_bus_* functions too, otherwise the parts of
> the kernel that use them will stomp all over your device, right?

I thought about that when writing up this patch, but decided against it.
I figured it was overkill and was going to make the patch more complicated
than it needed to be to solve the main problem I have seen, which is
userspace code, usually hotplug/coldplug scripts, reading config space
when an adapter is running BIST.

If you think there are usages of the pci_bus_* functions in the
kernel after the adapter device driver gets loaded, from callers other
than adapter device drivers and userspace APIs, I would have to agree
with you. I was hoping to keep this patch as simple as possible.

Having to protect the pci_bus_* functions requires a lookup in these
functions to find the pci_dev to get the saved_config_space, which
I was hoping to avoid.

Ben - do you have any concerns with this limitation for the use you have
for this set of APIs?

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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:08    [W:0.130 / U:1.172 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site