diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-04-09 22:33:59 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-04-09 22:33:59 +0000 |
commit | db9f4d1bcfa1e764b374db740b1eaa83193d9b4e (patch) | |
tree | cf392ad18ebd836e1a21a3df3ce5ad8525bca693 /sys/dev/sbus | |
parent | a4d02fedf8b420b3732db373b43fc0a9da0fabc9 (diff) |
because SUNW,fas boards don't have a corresponding 'dma' device, searching
for the corresponding 'dma' for a non-fas 'esp' needs to have an offset
(really a count of the number of 'fas's)
Diffstat (limited to 'sys/dev/sbus')
-rw-r--r-- | sys/dev/sbus/esp_sbus.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/sbus/esp_sbus.c b/sys/dev/sbus/esp_sbus.c index 0a8e4f1aaa8..6574163ba51 100644 --- a/sys/dev/sbus/esp_sbus.c +++ b/sys/dev/sbus/esp_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esp_sbus.c,v 1.7 2002/03/14 03:16:07 millert Exp $ */ +/* $OpenBSD: esp_sbus.c,v 1.8 2002/04/09 22:33:58 jason Exp $ */ /* $NetBSD: esp_sbus.c,v 1.14 2001/04/25 17:53:37 bouyer Exp $ */ /*- @@ -77,6 +77,8 @@ struct scsi_device esp_dev = { /* #define ESP_SBUS_DEBUG */ +static int esp_unit_offset; + struct esp_softc { struct ncr53c9x_softc sc_ncr53c9x; /* glue to MI code */ struct sbusdev sc_sd; /* sbus device */ @@ -191,6 +193,10 @@ espattach_sbus(parent, self, aux) #endif if (strcmp("SUNW,fas", sa->sa_name) == 0) { + /* + * offset searches for other esp/dma devices. + */ + esp_unit_offset++; /* * fas has 2 register spaces: dma(lsi64854) and SCSI core (ncr53c9x) @@ -303,7 +309,7 @@ espattach_sbus(parent, self, aux) * find the matching esp driver. */ esc->sc_dma = (struct lsi64854_softc *) - getdevunit("dma", sc->sc_dev.dv_unit); + getdevunit("dma", sc->sc_dev.dv_unit - esp_unit_offset); /* * and a back pointer to us, for DMA |