aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/txp
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2003-04-16 03:16:57 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2003-04-16 03:16:57 +0000
commit533294b956a64b5420f2395a9a3bb047608b67fe (patch)
tree43770c3696a3adbe67787f9d9f8ff9d3bb30a425 /sys/dev/txp
parentc047e5b1a9d3c13f345a17a28dbb2569ad68d123 (diff)
downloadsrc-533294b956a64b5420f2395a9a3bb047608b67fe.tar.gz
src-533294b956a64b5420f2395a9a3bb047608b67fe.zip
- 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.
Notes
Notes: svn path=/head/; revision=113545
Diffstat (limited to 'sys/dev/txp')
-rw-r--r--sys/dev/txp/if_txp.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c
index fb859270020e..542f6927fc2d 100644
--- a/sys/dev/txp/if_txp.c
+++ b/sys/dev/txp/if_txp.c
@@ -212,7 +212,6 @@ txp_attach(dev)
{
struct txp_softc *sc;
struct ifnet *ifp;
- u_int32_t command;
u_int16_t p1;
u_int32_t p2;
int unit, error = 0, rid;
@@ -251,23 +250,6 @@ txp_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 TXP_USEIOSPACE
- if (!(command & PCIM_CMD_PORTEN)) {
- device_printf(dev, "failed to enable I/O ports!\n");
- error = ENXIO;
- goto fail;
- }
-#else
- if (!(command & PCIM_CMD_MEMEN)) {
- device_printf(dev, "failed to enable memory mapping!\n");
- error = ENXIO;
- goto fail;
- }
-#endif
rid = TXP_RID;
sc->sc_res = bus_alloc_resource(dev, TXP_RES, &rid,