On 2000-12-11 01:04 -0800, Mike Smith <[EMAIL PROTECTED]> wrote:
> All of these can be abstracted as PCI methods, so they won't require lots
> of cut-n-paste in each driver:
>
> pci_enable_busmaster(dev);
> pci_enable_io(dev, SYS_RES_IOPORT | SYS_RES_MEMORY);
> pci_set_powerstate(dev, PCI_POWERSTATE_D0);
>
> Consider the above a request for review on the matter.
Shouldn't that be:
pci_enable_io(dev, SYS_RES_IOPORT | SYS_RES_MEMORY);
pci_set_powerstate(dev, PCI_POWERSTATE_D0);
device_specific_init(dev);
pci_enable_busmaster(dev);
As soon as the bus-master enable bit has been set, the device may start
writing to arbitrary memory locations (in the unlikely but still possible
case, that it has been disabled in the middle of a transfer).
Cases where such behaviour caused memory corruption and warm-boot failure
have been discussed in the PCI-SIG mail list.
Regards, STefan
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message