From 74c95b7f29ae970fc99cad21e8ea772eb2557bd1 Mon Sep 17 00:00:00 2001 From: mdodd Date: Wed, 16 Apr 2003 03:16:57 +0000 Subject: - 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. --- sys/dev/lge/if_lge.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'sys/dev/lge/if_lge.c') diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c index 18a22af..703f46d 100644 --- a/sys/dev/lge/if_lge.c +++ b/sys/dev/lge/if_lge.c @@ -492,7 +492,6 @@ lge_attach(dev) { int s; u_char eaddr[ETHER_ADDR_LEN]; - u_int32_t command; struct lge_softc *sc; struct ifnet *ifp; int unit, error = 0, rid; @@ -530,23 +529,6 @@ lge_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); - -#ifdef LGE_USEIOSPACE - if (!(command & PCIM_CMD_PORTEN)) { - printf("lge%d: failed to enable I/O ports!\n", unit); - error = ENXIO;; - goto fail; - } -#else - if (!(command & PCIM_CMD_MEMEN)) { - printf("lge%d: failed to enable memory mapping!\n", unit); - error = ENXIO;; - goto fail; - } -#endif rid = LGE_RID; sc->lge_res = bus_alloc_resource(dev, LGE_RES, &rid, -- cgit v1.1