summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ctl/scsi_ctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c
index 2078be3..2fc036d 100644
--- a/sys/cam/ctl/scsi_ctl.c
+++ b/sys/cam/ctl/scsi_ctl.c
@@ -1288,6 +1288,14 @@ ctlfedone(struct cam_periph *periph, union ccb *done_ccb)
* datamove done routine.
*/
if ((io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) {
+ /* Abort ATIO if CTIO sending status has failed. */
+ if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) !=
+ CAM_REQ_CMP) {
+ done_ccb->ccb_h.func_code = XPT_ABORT;
+ done_ccb->cab.abort_ccb = (union ccb *)atio;
+ xpt_action(done_ccb);
+ }
+
softc->ccbs_freed++;
xpt_release_ccb(done_ccb);
ctlfe_requeue_ccb(periph, (union ccb *)atio,
OpenPOWER on IntegriCloud