summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_vr.c
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2003-04-16 03:16:57 +0000
committermdodd <mdodd@FreeBSD.org>2003-04-16 03:16:57 +0000
commit74c95b7f29ae970fc99cad21e8ea772eb2557bd1 (patch)
tree43770c3696a3adbe67787f9d9f8ff9d3bb30a425 /sys/pci/if_vr.c
parentac7452631f13ef6bbb59e825e8e3ebb14d8e9a46 (diff)
downloadFreeBSD-src-74c95b7f29ae970fc99cad21e8ea772eb2557bd1.zip
FreeBSD-src-74c95b7f29ae970fc99cad21e8ea772eb2557bd1.tar.gz
- Don't call pci_enable_io() in drivers (unless needed for resume).
- Don't test memory/port status and emit an error message; the PCI bus code will do this now.
Diffstat (limited to 'sys/pci/if_vr.c')
-rw-r--r--sys/pci/if_vr.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c
index f5dc39d..793ae64 100644
--- a/sys/pci/if_vr.c
+++ b/sys/pci/if_vr.c
@@ -735,7 +735,6 @@ vr_attach(dev)
{
int i;
u_char eaddr[ETHER_ADDR_LEN];
- u_int32_t command;
struct vr_softc *sc;
struct ifnet *ifp;
int unit, error = 0, rid;
@@ -773,25 +772,8 @@ vr_attach(dev)
* Map control/status registers.
*/
pci_enable_busmaster(dev);
- pci_enable_io(dev, SYS_RES_IOPORT);
- pci_enable_io(dev, SYS_RES_MEMORY);
- command = pci_read_config(dev, PCIR_COMMAND, 4);
sc->vr_revid = pci_read_config(dev, VR_PCI_REVID, 4) & 0x000000FF;
-#ifdef VR_USEIOSPACE
- if (!(command & PCIM_CMD_PORTEN)) {
- printf("vr%d: failed to enable I/O ports!\n", unit);
- error = ENXIO;
- goto fail;
- }
-#else
- if (!(command & PCIM_CMD_MEMEN)) {
- printf("vr%d: failed to enable memory mapping!\n", unit);
- error = ENXIO;
- goto fail;
- }
-#endif
-
rid = VR_RID;
sc->vr_res = bus_alloc_resource(dev, VR_RES, &rid,
0, ~0, 1, RF_ACTIVE);
OpenPOWER on IntegriCloud