Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Dec 2000 22:51:27 +0100
From:      Stefan Esser <se@freebsd.org>
To:        Mike Smith <msmith@FreeBSD.ORG>
Cc:        dg@root.com, Mark Huizer <freebsd@dohd.org>, freebsd-current@FreeBSD.ORG, Stefan Esser <se@freebsd.org>
Subject:   Re: PCI power states (was Re: fxp driver not reset after Windows reboot? )
Message-ID:  <20001211225127.B73017@StefanEsser.FreeBSD.org>
In-Reply-To: <200012110904.eBB94Ox03098@mass.osd.bsdi.com>; from msmith@FreeBSD.ORG on Mon, Dec 11, 2000 at 01:04:23AM -0800
References:  <200012102045.MAA12646@implode.root.com> <200012110904.eBB94Ox03098@mass.osd.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2000-12-11 01:04 -0800, Mike Smith <msmith@FreeBSD.ORG> 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001211225127.B73017>