if the hardware is too busy or its queues are too full, return XS_BUSY,
authordlg <dlg@openbsd.org>
Fri, 17 Jan 2014 23:23:58 +0000 (23:23 +0000)
committerdlg <dlg@openbsd.org>
Fri, 17 Jan 2014 23:23:58 +0000 (23:23 +0000)
not XS_NO_CCB.

discussed with krw@ who agrees

sys/dev/ic/aic79xx_openbsd.c
sys/dev/ic/aic7xxx_openbsd.c

index 760fae2..0197819 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: aic79xx_openbsd.c,v 1.40 2013/05/30 16:15:02 deraadt Exp $    */
+/*     $OpenBSD: aic79xx_openbsd.c,v 1.41 2014/01/17 23:23:58 dlg Exp $        */
 
 /*
  * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -185,8 +185,6 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
        case CAM_REQ_CMP:
                switch (xs->status) {
                case SCSI_TASKSET_FULL:
-                       xs->error = XS_NO_CCB;
-                       break;
                case SCSI_BUSY:
                        xs->error = XS_BUSY;
                        break;
@@ -204,6 +202,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
                }
                break;
        case CAM_BUSY:
+       case CAM_REQUEUE_REQ:
                xs->error = XS_BUSY;
                break;
        case CAM_CMD_TIMEOUT:
@@ -213,9 +212,6 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
        case CAM_SCSI_BUS_RESET:
                xs->error = XS_RESET;
                break;
-       case CAM_REQUEUE_REQ:
-               xs->error = XS_NO_CCB;
-               break;
        case CAM_SEL_TIMEOUT:
                xs->error = XS_SELTIMEOUT;
                break;
@@ -548,7 +544,7 @@ ahd_setup_data(struct ahd_softc *ahd, struct scsi_xfer *xs,
 #endif
                        ahd_lock(ahd, &s);
                        ahd_free_scb(ahd, scb);
-                       xs->error = XS_NO_CCB;
+                       xs->error = XS_DRIVER_STUFFUP;
                        scsi_done(xs);
                        ahd_unlock(ahd, &s);
                        return;
index 4c34513..bf81bc0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: aic7xxx_openbsd.c,v 1.51 2011/07/17 22:46:48 matthew Exp $    */
+/*     $OpenBSD: aic7xxx_openbsd.c,v 1.52 2014/01/17 23:25:07 dlg Exp $        */
 /*     $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $     */
 
 /*
@@ -199,8 +199,6 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
        case CAM_REQ_CMP:
                switch (xs->status) {
                case SCSI_TASKSET_FULL:
-                       xs->error = XS_NO_CCB;
-                       break;
                case SCSI_BUSY:
                        xs->error = XS_BUSY;
                        break;
@@ -217,6 +215,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
                        break;
                }
                break;
+       case CAM_REQUEUE_REQ:
        case CAM_BUSY:
                xs->error = XS_BUSY;
                break;
@@ -227,9 +226,6 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
        case CAM_SCSI_BUS_RESET:
                xs->error = XS_RESET;
                break;
-       case CAM_REQUEUE_REQ:
-               xs->error = XS_NO_CCB;
-               break;
        case CAM_SEL_TIMEOUT:
                xs->error = XS_SELTIMEOUT;
                break;