Use the correct register names, not the FreeBSD 2.2 compatability ones.

This commit is contained in:
Peter Wemm 2000-05-28 15:47:00 +00:00
parent ca2e05343b
commit 9e5c01ffe6
3 changed files with 7 additions and 7 deletions

View file

@ -75,8 +75,8 @@
#include <dev/advansys/advansys.h>
#define PCI_BASEADR0 PCI_MAP_REG_START /* I/O Address */
#define PCI_BASEADR1 PCI_MAP_REG_START + 4 /* Mem I/O Address */
#define PCI_BASEADR0 PCIR_MAPS /* I/O Address */
#define PCI_BASEADR1 PCIR_MAPS + 4 /* Mem I/O Address */
#define PCI_DEVICE_ID_ADVANSYS_1200A 0x110010CD
#define PCI_DEVICE_ID_ADVANSYS_1200B 0x120010CD
@ -143,7 +143,7 @@ adv_pci_attach(device_t dev)
/*
* Determine the chip version.
*/
id = pci_read_config(dev, PCI_ID_REG, /*bytes*/4);
id = pci_read_config(dev, PCIR_DEVVENDOR, /*bytes*/4);
command = pci_read_config(dev, PCIR_COMMAND, /*bytes*/1);
/*

View file

@ -57,8 +57,8 @@
#include <dev/advansys/adwlib.h>
#include <dev/advansys/adwmcode.h>
#define ADW_PCI_IOBASE PCI_MAP_REG_START /* I/O Address */
#define ADW_PCI_MEMBASE PCI_MAP_REG_START + 4 /* Mem I/O Address */
#define ADW_PCI_IOBASE PCIR_MAPS /* I/O Address */
#define ADW_PCI_MEMBASE PCIR_MAPS + 4 /* Mem I/O Address */
#define PCI_ID_ADVANSYS_3550 0x230010CD00000000ull
#define PCI_ID_ADVANSYS_38C0800_REV1 0x250010CD00000000ull
@ -218,7 +218,7 @@ adw_pci_attach(device_t dev)
&regs_id, 0, ~0, 1, RF_ACTIVE);
}
#endif
if (regs == NULL && (command & PCI_COMMAND_IO_ENABLE) != 0) {
if (regs == NULL && (command & PCIM_CMD_PORTEN) != 0) {
regs_type = SYS_RES_IOPORT;
regs_id = ADW_PCI_IOBASE;
regs = bus_alloc_resource(dev, regs_type,

View file

@ -666,7 +666,7 @@ ahc_pci_attach(device_t dev)
&regs_id, 0, ~0, 1, RF_ACTIVE);
}
#endif
if (regs == NULL && (command & PCI_COMMAND_IO_ENABLE) != 0) {
if (regs == NULL && (command & PCIM_CMD_PORTEN) != 0) {
regs_type = SYS_RES_IOPORT;
regs_id = AHC_PCI_IOADDR;
regs = bus_alloc_resource(dev, regs_type,