diff options
Diffstat (limited to 'sys/dev/mfi/mfi_pci.c')
-rw-r--r-- | sys/dev/mfi/mfi_pci.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/dev/mfi/mfi_pci.c b/sys/dev/mfi/mfi_pci.c index 5f757da9632c7..657289343ac6d 100644 --- a/sys/dev/mfi/mfi_pci.c +++ b/sys/dev/mfi/mfi_pci.c @@ -187,7 +187,6 @@ mfi_pci_attach(device_t dev) { struct mfi_softc *sc; struct mfi_ident *m; - uint32_t command; int count, error; sc = device_get_softc(dev); @@ -196,19 +195,8 @@ mfi_pci_attach(device_t dev) m = mfi_find_ident(dev); sc->mfi_flags = m->flags; - /* Verify that the adapter can be set up in PCI space */ - command = pci_read_config(dev, PCIR_COMMAND, 2); - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, 2); - command = pci_read_config(dev, PCIR_COMMAND, 2); - if ((command & PCIM_CMD_BUSMASTEREN) == 0) { - device_printf(dev, "Can't enable PCI busmaster\n"); - return (ENXIO); - } - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "PCI memory window not available\n"); - return (ENXIO); - } + /* Ensure busmastering is enabled */ + pci_enable_busmaster(dev); /* Allocate PCI registers */ if ((sc->mfi_flags & MFI_FLAGS_1064R) || |