diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-10-21 07:36:16 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-10-21 07:36:16 +0000 |
commit | dd98b50bc85201486c023d89677287827298d979 (patch) | |
tree | 083ba52fdf2c1f1d176f353ba7a5d4a7e7717d39 /sys/dev/ic/mpi.c | |
parent | dd60917a693a797ca646ccf5e4a2b6e1693b96e1 (diff) |
rework the bus scanning code by splitting it out into separate functions
for walking the bus and targets, and probing the luns. this removes the
need to use magic numbers to wildcard each of these, which in turn makes
the code a lot easier to read. as a bonus we get some more space to work in
(80 chars isnt that much somtimes).
note that this code wont probe high luns if lun 0 doesnt exist.
ok krw@
Diffstat (limited to 'sys/dev/ic/mpi.c')
-rw-r--r-- | sys/dev/ic/mpi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index e661e72b25c..47a064bec01 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.75 2006/09/22 00:43:18 dlg Exp $ */ +/* $OpenBSD: mpi.c,v 1.76 2006/10/21 07:36:15 dlg Exp $ */ /* * Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org> @@ -197,12 +197,10 @@ mpi_attach(struct mpi_softc *sc) goto free_replies; } -#ifdef notyet if (mpi_eventnotify(sc) != 0) { printf("%s: unable to get portfacts\n", DEVNAME(sc)); goto free_replies; } -#endif if (mpi_portenable(sc) != 0) { printf("%s: unable to enable port\n", DEVNAME(sc)); @@ -2025,8 +2023,7 @@ mpi_evt_sas(void *xsc, void *arg) case MPI_EVT_SASCH_REASON_ADDED: case MPI_EVT_SASCH_REASON_NO_PERSIST_ADDED: /* XXX what an awful interface */ - scsi_probe_busses(sc->sc_scsibus->sc_dev.dv_unit, - ch->target, -1); + scsi_probe_target(sc->sc_scsibus, ch->target); break; case MPI_EVT_SASCH_REASON_NOT_RESPONDING: |