summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2004-02-08 00:38:10 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2004-02-08 00:38:10 +0000
commit084d66ae20c79dbfe63450037db1f4d3911e7a84 (patch)
treeeed1c268418eeb48a6cb171bf98f522198b94bd4 /sys/dev/ic
parente453de5fd83d8ab1f08f1e2b2ab3c8f9168e8ebb (diff)
Pull in a few recent changes from FreeBSD, plus a couple of local
tweaks. ok deraadt@.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/aic7xxx.c27
-rw-r--r--sys/dev/ic/aic7xxx.h6
2 files changed, 21 insertions, 12 deletions
diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c
index bb823d5f31d..91c2776035b 100644
--- a/sys/dev/ic/aic7xxx.c
+++ b/sys/dev/ic/aic7xxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx.c,v 1.53 2004/01/17 14:40:55 krw Exp $ */
+/* $OpenBSD: aic7xxx.c,v 1.54 2004/02/08 00:38:08 krw Exp $ */
/* $NetBSD: aic7xxx.c,v 1.108 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -40,7 +40,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: aic7xxx.c,v 1.53 2004/01/17 14:40:55 krw Exp $
+ * $Id: aic7xxx.c,v 1.54 2004/02/08 00:38:08 krw Exp $
*
* //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $
*
@@ -4932,8 +4932,14 @@ ahc_pause_and_flushwork(struct ahc_softc *ahc)
intstat = 0;
paused = FALSE;
do {
- if (paused)
+ if (paused) {
ahc_unpause(ahc);
+ /*
+ * Give the sequencer some time to service
+ * any active selections.
+ */
+ ahc_delay(200);
+ }
ahc_intr(ahc);
ahc_pause(ahc);
paused = TRUE;
@@ -5188,10 +5194,15 @@ int
ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, int target,
char channel, int lun, u_int tag, role_t role)
{
- int targ = SCB_GET_TARGET(ahc, scb);
- char chan = SCB_GET_CHANNEL(ahc, scb);
- int slun = SCB_GET_LUN(scb);
- int match;
+ char chan;
+ int targ, slun, match;
+
+ if (scb == NULL)
+ return 0;
+
+ targ = SCB_GET_TARGET(ahc, scb);
+ chan = SCB_GET_CHANNEL(ahc, scb);
+ slun = SCB_GET_LUN(scb);
match = ((chan == channel) || (channel == ALL_CHANNELS));
if (match != 0)
@@ -5199,7 +5210,6 @@ ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, int target,
if (match != 0)
match = ((lun == slun) || (lun == CAM_LUN_WILDCARD));
if (match != 0) {
-#if 0
#if AHC_TARGET_MODE
int group;
@@ -5216,7 +5226,6 @@ ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, int target,
#else /* !AHC_TARGET_MODE */
match = ((tag == scb->hscb->tag) || (tag == SCB_LIST_NULL));
#endif /* AHC_TARGET_MODE */
-#endif
}
return match;
diff --git a/sys/dev/ic/aic7xxx.h b/sys/dev/ic/aic7xxx.h
index 5527c1f4d3a..98a131df82e 100644
--- a/sys/dev/ic/aic7xxx.h
+++ b/sys/dev/ic/aic7xxx.h
@@ -1,5 +1,5 @@
/*
- * $OpenBSD: aic7xxx.h,v 1.9 2003/12/24 22:45:45 krw Exp $
+ * $OpenBSD: aic7xxx.h,v 1.10 2004/02/08 00:38:08 krw Exp $
* Core definitions and data structures shareable across OS platforms.
*
* Copyright (c) 1994-2001 Justin T. Gibbs.
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aic7xxx.h,v 1.9 2003/12/24 22:45:45 krw Exp $
+ * $Id: aic7xxx.h,v 1.10 2004/02/08 00:38:08 krw Exp $
*
* $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.h,v 1.40 2001/07/18 21:39:47 gibbs Exp $
*/
@@ -230,7 +230,7 @@ typedef enum {
*/
AHC_AIC7850_FE = AHC_SPIOCAP|AHC_AUTOPAUSE|AHC_TARGETMODE|AHC_ULTRA,
AHC_AIC7860_FE = AHC_AIC7850_FE,
- AHC_AIC7870_FE = AHC_TARGETMODE,
+ AHC_AIC7870_FE = AHC_TARGETMODE|AHC_AUTOPAUSE,
AHC_AIC7880_FE = AHC_AIC7870_FE|AHC_ULTRA,
/*
* Although we have space for both the initiator and