diff options
author | gibbs <gibbs@FreeBSD.org> | 1998-10-29 17:41:34 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1998-10-29 17:41:34 +0000 |
commit | 25b0d92fe5e4f82fd1dca90c1fbe8f890e166dd8 (patch) | |
tree | 639d3c411c3f5e28e29cd0950193c14379228814 /sys/dev/advansys | |
parent | 0ae4c4c0e76b542154b4a1733998a5c783459256 (diff) | |
download | FreeBSD-src-25b0d92fe5e4f82fd1dca90c1fbe8f890e166dd8.zip FreeBSD-src-25b0d92fe5e4f82fd1dca90c1fbe8f890e166dd8.tar.gz |
Correct the reporting of the queue full condition so that the XPT layer
can properly throttle tags.
Add diagnostic printfs for firmware result codes that we encounter but
don't know anything about.
Diffstat (limited to 'sys/dev/advansys')
-rw-r--r-- | sys/dev/advansys/advansys.c | 13 | ||||
-rw-r--r-- | sys/dev/advansys/advlib.c | 6 |
2 files changed, 13 insertions, 6 deletions
diff --git a/sys/dev/advansys/advansys.c b/sys/dev/advansys/advansys.c index ac47f8d..40b76e9 100644 --- a/sys/dev/advansys/advansys.c +++ b/sys/dev/advansys/advansys.c @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: advansys.c,v 1.3 1998/10/07 03:32:56 gibbs Exp $ + * $Id: advansys.c,v 1.4 1998/10/15 23:47:14 gibbs Exp $ */ /* * Ported from: @@ -1048,7 +1048,9 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat, ccb->ccb_h.status = CAM_SEL_TIMEOUT; break; default: - /* QHSTA error occurred */ + xpt_print_path(ccb->ccb_h.path); + printf("adv_done - queue done without error, " + "unknown host status %x\n", host_stat); /* XXX Can I get more explicit information here? */ ccb->ccb_h.status = CAM_REQ_CMP_ERR; break; @@ -1084,6 +1086,9 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat, ccb->ccb_h.status = CAM_SEL_TIMEOUT; break; default: + xpt_print_path(ccb->ccb_h.path); + printf("adv_done - queue done with error, " + "unknown host status %x\n", host_stat); /* XXX Can I get more explicit information here? */ ccb->ccb_h.status = CAM_REQ_CMP_ERR; break; @@ -1097,7 +1102,9 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat, break; default: - printf("adv_done: Unknown done status 0x%x\n", done_stat); + xpt_print_path(ccb->ccb_h.path); + printf("adv_done - queue done with unknown status %x:%x\n", + done_stat, host_stat); ccb->ccb_h.status = CAM_REQ_CMP_ERR; break; } diff --git a/sys/dev/advansys/advlib.c b/sys/dev/advansys/advlib.c index 617266a..0a261fb 100644 --- a/sys/dev/advansys/advlib.c +++ b/sys/dev/advansys/advlib.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: advlib.c,v 1.7 1998/10/07 03:32:57 gibbs Exp $ + * $Id: advlib.c,v 1.8 1998/10/09 21:40:50 gibbs Exp $ */ /* * Ported from: @@ -1031,7 +1031,8 @@ adv_isr_chip_halted(struct adv_softc *adv) ccb = (union ccb *) adv_read_lram_32(adv, halt_q_addr + ADV_SCSIQ_D_CCBPTR); xpt_freeze_devq(ccb->ccb_h.path, /*count*/1); - ccb->ccb_h.status |= CAM_DEV_QFRZN; + ccb->ccb_h.status |= CAM_DEV_QFRZN|CAM_SCSI_STATUS_ERROR; + ccb->csio.scsi_status = SCSI_STATUS_QUEUE_FULL; adv_abort_ccb(adv, tid_no, ADV_TIX_TO_LUN(target_ix), /*ccb*/NULL, CAM_REQUEUE_REQ, /*queued_only*/TRUE); @@ -1970,7 +1971,6 @@ adv_abort_ccb(struct adv_softc *adv, int target, int lun, union ccb *ccb, struct adv_ccb_info *cinfo; scsiq->q_status |= QS_ABORTED; - scsiq->d3.done_stat = QD_ABORTED_BY_HOST; adv_write_lram_8(adv, q_addr + ADV_SCSIQ_B_STATUS, scsiq->q_status); aborted_ccb = (union ccb *)scsiq->d2.ccb_ptr; |