summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-04 22:17:24 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-07-04 22:17:24 +0000
commit46d45a4320892c10cfb753a35e05bd28ac062982 (patch)
tree17166130af564bb9af1b6b35e42e99cc97c90e82 /sys/dev/ic
parent217b7f95f2eee154380e2cba01fb08f00514dac0 (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/dev/ic')
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c3
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.h4
2 files changed, 4 insertions, 3 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) \