diff options
| author | Matthew N. Dodd <mdodd@FreeBSD.org> | 2002-06-07 01:55:42 +0000 |
|---|---|---|
| committer | Matthew N. Dodd <mdodd@FreeBSD.org> | 2002-06-07 01:55:42 +0000 |
| commit | 33b04e2fcbaeaede7c0cdca697ded804cbf30e1c (patch) | |
| tree | 9d76e163bb0058a08e70dc6744a67099c8ff08b6 /sys/dev/hfa | |
| parent | e8e649cc5dd773fdde330d58c17c9f03e2f28286 (diff) | |
Notes
Diffstat (limited to 'sys/dev/hfa')
| -rw-r--r-- | sys/dev/hfa/hfa_freebsd.c | 1 | ||||
| -rw-r--r-- | sys/dev/hfa/hfa_pci.c | 23 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/hfa/hfa_freebsd.c b/sys/dev/hfa/hfa_freebsd.c index 271c5b480fde..377dbbbde85e 100644 --- a/sys/dev/hfa/hfa_freebsd.c +++ b/sys/dev/hfa/hfa_freebsd.c @@ -176,6 +176,7 @@ hfa_attach (device_t dev) fup->fu_openvcc = fore_openvcc; fup->fu_closevcc = fore_closevcc; fup->fu_output = fore_output; + callout_handle_init(&fup->fu_thandle); /* diff --git a/sys/dev/hfa/hfa_pci.c b/sys/dev/hfa/hfa_pci.c index 6a12f0f4e1a8..c5c9bd43fda8 100644 --- a/sys/dev/hfa/hfa_pci.c +++ b/sys/dev/hfa/hfa_pci.c @@ -128,25 +128,15 @@ hfa_pci_attach (dev) fup = &sc->fup; error = 0; - switch (pci_get_device(dev)) { - case FORE_PCA200EPC_ID: - fup->fu_config.ac_device = DEV_FORE_PCA200E; - break; - default: - fup->fu_config.ac_device = DEV_UNKNOWN; - break; - } - pci_enable_busmaster(dev); + pci_enable_io(dev, SYS_RES_MEMORY); + command = pci_read_config(dev, PCIR_COMMAND, 2); if ((command & PCIM_CMD_BUSMASTEREN) == 0) { device_printf(dev, "Unable to enable PCI busmastering.\n"); error = ENXIO; goto fail; } - - pci_enable_io(dev, SYS_RES_MEMORY); - command = pci_read_config(dev, PCIR_COMMAND, 2); if ((command & PCIM_CMD_MEMEN) == 0) { device_printf(dev, "Unable to enable PCI memory resources.\n"); error = ENXIO; @@ -192,6 +182,15 @@ hfa_pci_attach (dev) fup->fu_config.ac_bustype = BUS_PCI; fup->fu_config.ac_busslot = (pci_get_bus(dev) << 8)| pci_get_slot(dev); + switch (pci_get_device(dev)) { + case FORE_PCA200EPC_ID: + fup->fu_config.ac_device = DEV_FORE_PCA200E; + break; + default: + fup->fu_config.ac_device = DEV_UNKNOWN; + break; + } + error = hfa_attach(dev); if (error) { device_printf(dev, "hfa_attach() failed.\n"); |
