summaryrefslogtreecommitdiffstats
path: root/sys/dev/rp
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2013-08-12 23:30:01 +0000
committerscottl <scottl@FreeBSD.org>2013-08-12 23:30:01 +0000
commit28bd1409da1e9911c4152b06c5c7b89235e2b17a (patch)
tree34ad11c71aadd28f5ff680b63e3f0fd70956bed5 /sys/dev/rp
parentc8a53736fe9139a202d17ed7f95389d33326cb61 (diff)
downloadFreeBSD-src-28bd1409da1e9911c4152b06c5c7b89235e2b17a.zip
FreeBSD-src-28bd1409da1e9911c4152b06c5c7b89235e2b17a.tar.gz
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit. This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot. Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day
Diffstat (limited to 'sys/dev/rp')
-rw-r--r--sys/dev/rp/rp_pci.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/sys/dev/rp/rp_pci.c b/sys/dev/rp/rp_pci.c
index cbd5516..e7b9832 100644
--- a/sys/dev/rp/rp_pci.c
+++ b/sys/dev/rp/rp_pci.c
@@ -151,7 +151,6 @@ rp_pciattach(device_t dev)
CONTROLLER_t *ctlp;
int unit;
int retval;
- u_int32_t stcmd;
ctlp = device_get_softc(dev);
bzero(ctlp, sizeof(*ctlp));
@@ -161,13 +160,6 @@ rp_pciattach(device_t dev)
ctlp->aiop2off = rp_pci_aiop2off;
ctlp->ctlmask = rp_pci_ctlmask;
- /* Wake up the device. */
- stcmd = pci_read_config(dev, PCIR_COMMAND, 4);
- if ((stcmd & PCIM_CMD_PORTEN) == 0) {
- stcmd |= (PCIM_CMD_PORTEN);
- pci_write_config(dev, PCIR_COMMAND, 4, stcmd);
- }
-
/* The IO ports of AIOPs for a PCI controller are continuous. */
ctlp->io_num = 1;
ctlp->io_rid = malloc(sizeof(*(ctlp->io_rid)) * ctlp->io_num, M_DEVBUF, M_NOWAIT | M_ZERO);
OpenPOWER on IntegriCloud