Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/thorpej_scsipi]: src/sys/dev/ic - If the ISP's internal queues are full, ...
details: https://anonhg.NetBSD.org/src/rev/f66737957d94
branches: thorpej_scsipi
changeset: 477311:f66737957d94
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Feb 04 23:06:09 2000 +0000
description:
- If the ISP's internal queues are full, don't synthesize a QFULL status,
but rather report it as a host adapter resource shortage.
- If the I_T_L's command queues are full, report that the target is busy
(with QFULL status).
diffstat:
sys/dev/ic/isp.c | 35 +++++++++++++++++++----------------
sys/dev/ic/isp_netbsd.h | 3 ++-
2 files changed, 21 insertions(+), 17 deletions(-)
diffs (88 lines):
diff -r 0e43f7325b1e -r f66737957d94 sys/dev/ic/isp.c
--- a/sys/dev/ic/isp.c Fri Feb 04 23:01:54 2000 +0000
+++ b/sys/dev/ic/isp.c Fri Feb 04 23:06:09 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp.c,v 1.39 1999/10/17 01:38:27 mjacob Exp $ */
+/* $NetBSD: isp.c,v 1.39.2.1 2000/02/04 23:06:09 thorpej Exp $ */
/*
* Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration
* All rights reserved.
@@ -2238,7 +2238,7 @@
IDPRINTF(2, ("%s: internal queues full\n",
isp->isp_name));
/*
- * We'll synthesize a QUEUE FULL message below.
+ * This is handled below...
*/
}
if (sp->req_header.rqs_flags & RQSFLAG_BADHEADER) {
@@ -2303,8 +2303,18 @@
sp->req_state_flags |= RQSF_GOT_SENSE;
}
}
- if (XS_NOERR(xs) && XS_STS(xs) == SCSI_BUSY) {
- XS_SETERR(xs, HBA_TGTBSY);
+
+ if (XS_NOERR(xs)) {
+ switch (XS_STS(xs)) {
+ case SCSI_BUSY:
+ case SCSI_QFULL:
+ /*
+ * If the target returns QUEUE FULL,
+ * it's busy (because it's queue is
+ * full!).
+ */
+ XS_SETERR(xs, HBA_TGTBSY);
+ }
}
if (sp->req_header.rqs_entry_type == RQSTYPE_RESPONSE) {
@@ -2318,10 +2328,10 @@
} else if (sp->req_header.rqs_entry_type == RQSTYPE_REQUEST) {
if (sp->req_header.rqs_flags & RQSFLAG_FULL) {
/*
- * Force Queue Full status.
+ * The RISC's internal queues are full,
+ * so note this is a resource shortage.
*/
- XS_STS(xs) = SCSI_QFULL;
- XS_SETERR(xs, HBA_NOERROR);
+ XS_SETERR(xs, HBA_RESSHORT);
} else if (XS_NOERR(xs)) {
XS_SETERR(xs, HBA_BOTCH);
}
@@ -2788,15 +2798,8 @@
IDPRINTF(3, ("%s: internal queues full for target %d lun %d "
"status 0x%x\n", isp->isp_name, XS_TGT(xs), XS_LUN(xs),
XS_STS(xs)));
- /*
- * If QFULL or some other status byte is set, then this
- * isn't an error, per se.
- */
- if (XS_STS(xs) != 0) {
- XS_SETERR(xs, HBA_NOERROR);
- return;
- }
- break;
+ XS_SETERR(xs, HBA_RESSHORT);
+ return;
case RQCS_PHASE_SKIPPED:
PRINTF("%s: SCSI phase skipped (e.g., COMMAND COMPLETE w/o "
diff -r 0e43f7325b1e -r f66737957d94 sys/dev/ic/isp_netbsd.h
--- a/sys/dev/ic/isp_netbsd.h Fri Feb 04 23:01:54 2000 +0000
+++ b/sys/dev/ic/isp_netbsd.h Fri Feb 04 23:06:09 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_netbsd.h,v 1.18.2.4 1999/11/01 22:54:17 thorpej Exp $ */
+/* $NetBSD: isp_netbsd.h,v 1.18.2.5 2000/02/04 23:06:10 thorpej Exp $ */
/* release_6_5_99 */
/*
* NetBSD Specific definitions for the Qlogic ISP Host Adapter
@@ -137,6 +137,7 @@
#define XS_SNSKEY(xs) ((xs)->sense.scsi_sense.flags)
#define HBA_NOERROR XS_NOERROR
+#define HBA_RESSHORT XS_RESOURCE_SHORTAGE
#define HBA_BOTCH XS_DRIVER_STUFFUP
#define HBA_CMDTIMEOUT XS_TIMEOUT
#define HBA_SELTIMEOUT XS_SELTIMEOUT
Home |
Main Index |
Thread Index |
Old Index