aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/asr
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2006-01-14 15:59:54 +0000
committerScott Long <scottl@FreeBSD.org>2006-01-14 15:59:54 +0000
commit19e9e8235dd104aaf60a37c48dd42978573eec28 (patch)
tree50903949cbeb1c9515199ecac34254d0a2646baf /sys/dev/asr
parent8f6ee34112ed5c79e7787663f0703f7f20b6bd15 (diff)
Notes
Diffstat (limited to 'sys/dev/asr')
-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 55503e72119e..5349d4e1a01f 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(