diff options
| author | Scott Long <scottl@FreeBSD.org> | 2013-08-15 12:19:16 +0000 |
|---|---|---|
| committer | Scott Long <scottl@FreeBSD.org> | 2013-08-15 12:19:16 +0000 |
| commit | 63e0f0f0c230505454bb02922661c407e1b437aa (patch) | |
| tree | 4edbd10be2d29716de18718beafb26fc359d8154 /sys/dev/amr | |
| parent | 8a1372723b8d764f60a870377b2ac93d00e23aaa (diff) | |
Notes
Diffstat (limited to 'sys/dev/amr')
| -rw-r--r-- | sys/dev/amr/amr_pci.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c index 8f0b2f15f8cf..273f32e67cb0 100644 --- a/sys/dev/amr/amr_pci.c +++ b/sys/dev/amr/amr_pci.c @@ -184,7 +184,6 @@ amr_pci_attach(device_t dev) struct amr_softc *sc; struct amr_ident *id; int rid, rtype, error; - u_int32_t command; debug_called(1); @@ -204,24 +203,8 @@ amr_pci_attach(device_t dev) if ((id = amr_find_ident(dev)) == NULL) return (ENXIO); - command = pci_read_config(dev, PCIR_COMMAND, 1); if (id->flags & AMR_ID_QUARTZ) { - /* - * Make sure we are going to be able to talk to this board. - */ - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "memory window not available\n"); - return (ENXIO); - } sc->amr_type |= AMR_TYPE_QUARTZ; - } else { - /* - * Make sure we are going to be able to talk to this board. - */ - if ((command & PCIM_CMD_PORTEN) == 0) { - device_printf(dev, "I/O window not available\n"); - return (ENXIO); - } } if ((amr_force_sg32 == 0) && (id->flags & AMR_ID_DO_SG64) && @@ -231,11 +214,7 @@ amr_pci_attach(device_t dev) } /* force the busmaster enable bit on */ - if (!(command & PCIM_CMD_BUSMASTEREN)) { - device_printf(dev, "busmaster bit not set, enabling\n"); - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, 2); - } + pci_enable_busmaster(dev); /* * Allocate the PCI register window. |
