diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-07-04 22:17:24 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-07-04 22:17:24 +0000 |
commit | 46d45a4320892c10cfb753a35e05bd28ac062982 (patch) | |
tree | 17166130af564bb9af1b6b35e42e99cc97c90e82 /sys | |
parent | 217b7f95f2eee154380e2cba01fb08f00514dac0 (diff) |
Use the SDEV_2NDBUS flag like isp(4) instead of the current
scsi_link::scsibus hack to determine which channel the link is
associated with.
"looks sane" dlg@, but haven't found any testers yet; committing so
further SCSI refactorings can go in. dlg@ or I will back out or fix
if anything breaks.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/aic7xxx_openbsd.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/aic7xxx_openbsd.h | 4 | ||||
-rw-r--r-- | sys/dev/pci/ahc_pci.c | 10 |
3 files changed, 6 insertions, 11 deletions
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c index ebca6a2989d..fb51825ccbb 100644 --- a/sys/dev/ic/aic7xxx_openbsd.c +++ b/sys/dev/ic/aic7xxx_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic7xxx_openbsd.c,v 1.48 2010/06/28 18:31:02 krw Exp $ */ +/* $OpenBSD: aic7xxx_openbsd.c,v 1.49 2011/07/04 22:17:23 matthew Exp $ */ /* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */ /* @@ -94,6 +94,7 @@ ahc_attach(struct ahc_softc *ahc) /* Configure the second scsi bus */ ahc->sc_channel_b = ahc->sc_channel; ahc->sc_channel_b.adapter_target = ahc->our_id_b; + ahc->sc_channel_b.flags |= SDEV_2NDBUS; } #ifndef DEBUG diff --git a/sys/dev/ic/aic7xxx_openbsd.h b/sys/dev/ic/aic7xxx_openbsd.h index 4c68e918460..1da78a530d7 100644 --- a/sys/dev/ic/aic7xxx_openbsd.h +++ b/sys/dev/ic/aic7xxx_openbsd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: aic7xxx_openbsd.h,v 1.19 2007/09/15 10:10:37 martin Exp $ */ +/* $OpenBSD: aic7xxx_openbsd.h,v 1.20 2011/07/04 22:17:23 matthew Exp $ */ /* $NetBSD: aic7xxx_osm.h,v 1.7 2003/11/02 11:07:44 wiz Exp $ */ /* @@ -88,7 +88,7 @@ /****************************** Platform Macros *******************************/ #define SCSI_IS_SCSIBUS_B(ahc, sc_link) \ - ((sc_link)->scsibus == (ahc)->sc_channel_b.scsibus) + (((sc_link)->flags & SDEV_2NDBUS) != 0) #define SCSI_SCSI_ID(ahc, sc_link) \ (SCSI_IS_SCSIBUS_B(ahc, sc_link) ? ahc->our_id_b : ahc->our_id) #define SCSI_CHANNEL(ahc, sc_link) \ diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c index f50819a7ffc..3f884066ac5 100644 --- a/sys/dev/pci/ahc_pci.c +++ b/sys/dev/pci/ahc_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahc_pci.c,v 1.53 2008/05/13 02:24:08 brad Exp $ */ +/* $OpenBSD: ahc_pci.c,v 1.54 2011/07/04 22:17:23 matthew Exp $ */ /* $NetBSD: ahc_pci.c,v 1.43 2003/08/18 09:16:22 taca Exp $ */ /* @@ -42,7 +42,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: ahc_pci.c,v 1.53 2008/05/13 02:24:08 brad Exp $ + * $Id: ahc_pci.c,v 1.54 2011/07/04 22:17:23 matthew Exp $ * * //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#57 $ * @@ -737,12 +737,6 @@ ahc_pci_attach(parent, self, aux) for (i = 0; i < AHC_NUM_TARGETS; i++) TAILQ_INIT(&ahc->untagged_queues[i]); - /* - * SCSI_IS_SCSIBUS_B() must returns false until sc_channel_b - * has been properly initialized. XXX Breaks if >254 scsi buses. - */ - ahc->sc_channel_b.scsibus = 0xff; - ahc->dev_softc = pa; ahc_set_name(ahc, ahc->sc_dev.dv_xname); |