diff options
author | mdodd <mdodd@FreeBSD.org> | 2002-06-07 01:55:42 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2002-06-07 01:55:42 +0000 |
commit | d148b5fbbdbc1f7658828164ab1793803d3105bb (patch) | |
tree | 9d76e163bb0058a08e70dc6744a67099c8ff08b6 /sys/dev/hfa | |
parent | ecd7ab07f9b036f07250624d60b7ad0d969886cf (diff) | |
download | FreeBSD-src-d148b5fbbdbc1f7658828164ab1793803d3105bb.zip FreeBSD-src-d148b5fbbdbc1f7658828164ab1793803d3105bb.tar.gz |
Move some code around.
Minor whitespace changes.
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 271c5b4..377dbbb 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 6a12f0f..c5c9bd4 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"); |