aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>2001-06-21 16:18:27 +0000
committerMatt Jacob <mjacob@FreeBSD.org>2001-06-21 16:18:27 +0000
commit0e300eff0a542ab490102e12abc96169b8444f54 (patch)
treed404340d58c14bdd9ecf303604c2f9d5aaa855b6
parentb720900890a3766e73f6353750955a6d2fd93652 (diff)
Notes
-rw-r--r--sys/dev/aic7xxx/ahc_pci.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c
index 9968570c36b5..01772a07dc01 100644
--- a/sys/dev/aic7xxx/ahc_pci.c
+++ b/sys/dev/aic7xxx/ahc_pci.c
@@ -182,12 +182,13 @@ ahc_pci_map_registers(struct ahc_softc *ahc)
regs_id = AHC_PCI_IOADDR;
regs = bus_alloc_resource(ahc->dev_softc, regs_type,
&regs_id, 0, ~0, 1, RF_ACTIVE);
- ahc->tag = rman_get_bustag(regs);
- ahc->bsh = rman_get_bushandle(regs);
- command &= ~PCIM_CMD_MEMEN;
- ahc_pci_write_config(ahc->dev_softc,
- PCIR_COMMAND,
- command, /*bytes*/1);
+ if (regs) {
+ ahc->tag = rman_get_bustag(regs);
+ ahc->bsh = rman_get_bushandle(regs);
+ command &= ~PCIM_CMD_MEMEN;
+ ahc_pci_write_config(ahc->dev_softc, PCIR_COMMAND,
+ command, /*bytes*/1);
+ }
}
ahc->platform_data->regs_res_type = regs_type;
ahc->platform_data->regs_res_id = regs_id;