summaryrefslogtreecommitdiffstats
path: root/sys/dev/asr/asr.c
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2006-01-14 15:59:54 +0000
committerscottl <scottl@FreeBSD.org>2006-01-14 15:59:54 +0000
commit13ebfcda1cbf3786bd81c4c6a6f38110631b895e (patch)
tree50903949cbeb1c9515199ecac34254d0a2646baf /sys/dev/asr/asr.c
parent55c9e2ca5f80679e6f4dce9be5132fc11017b7e0 (diff)
downloadFreeBSD-src-13ebfcda1cbf3786bd81c4c6a6f38110631b895e.zip
FreeBSD-src-13ebfcda1cbf3786bd81c4c6a6f38110631b895e.tar.gz
Replace bogus code with real code.
Diffstat (limited to 'sys/dev/asr/asr.c')
-rw-r--r--sys/dev/asr/asr.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index 55503e7..5349d4e 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -2333,16 +2333,10 @@ asr_attach(device_t dev)
pci_write_config(dev, PCIR_COMMAND,
pci_read_config(dev, PCIR_COMMAND, sizeof(char)) |
PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN, sizeof(char));
- /* Knowledge is power, responsibility is direct */
- {
- struct pci_devinfo {
- STAILQ_ENTRY(pci_devinfo) pci_links;
- struct resource_list resources;
- pcicfgregs cfg;
- } * dinfo = device_get_ivars(dev);
- sc->ha_pciBusNum = dinfo->cfg.bus;
- sc->ha_pciDeviceNum = (dinfo->cfg.slot << 3) | dinfo->cfg.func;
- }
+
+ sc->ha_pciBusNum = pci_get_bus(dev);
+ sc->ha_pciDeviceNum = (pci_get_slot(dev) << 3) | pci_get_function(dev);
+
/* Check if the device is there? */
if ((ASR_resetIOP(sc) == 0) ||
((status = (PI2O_EXEC_STATUS_GET_REPLY)malloc(
OpenPOWER on IntegriCloud