On Tue, May 26, 2009 at 02:53:58PM +0800, Brock.Zheng wrote:
> Hi,
> In that file, since v1.44, lock is add in pci_conf_read() and
> pci_conf_write()
> to protect the r/w action in SMP condition.
>
> But I think the protection is not strong enough! You should disable IRQ
> totally!
> In my project, it is not smp, and when booting, if the local network load is
> HIGH,
> the NIC card(RTL8111B) will not be recognized. This is because the front end
> of
> the NIC driver call pci_conf_read() to get the device's type. If
> pci_conf_read() is
> interrupted by some irq, the result maybe wrong.
>
> Would you please refer to Linux kernel code? Linux use irq_save/irq_restore
> to
> protect the pci_config_{read,write} funtion.
from the file you reference:
struct mutex pci_conf_lock = MUTEX_INITIALIZER(IPL_HIGH);
What do you think the IPL_HIGH does? (hint: it blocks everything other
than inter-processor interrupts)
Which version of OpenBSD are you using?
-0-
--
There are four kinds of homicide: felonious, excusable, justifiable,
and praiseworthy ...
-- Ambrose Bierce, "The Devil's Dictionary"