Use PCI accessor functions.
authorJoerg Sonnenberger <joerg@dragonflybsd.org>
Tue, 14 Jun 2005 12:38:37 +0000 (12:38 +0000)
committerJoerg Sonnenberger <joerg@dragonflybsd.org>
Tue, 14 Jun 2005 12:38:37 +0000 (12:38 +0000)
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
sys/dev/netif/tl/if_tl.c

index fd2e220..cda2c19 100644 (file)
@@ -30,7 +30,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/pci/if_tl.c,v 1.51.2.5 2001/12/16 15:46:08 luigi Exp $
- * $DragonFly: src/sys/dev/netif/tl/if_tl.c,v 1.27 2005/06/14 12:38:04 joerg Exp $
+ * $DragonFly: src/sys/dev/netif/tl/if_tl.c,v 1.28 2005/06/14 12:38:37 joerg Exp $
  */
 
 /*
@@ -1125,9 +1125,9 @@ static int tl_attach(dev)
        /*
         * Map control/status registers.
         */
-       command = pci_read_config(dev, PCIR_COMMAND, 4);
-       command |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
-       pci_write_config(dev, PCIR_COMMAND, command, 4);
+       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 TL_USEIOSPACE