aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2017-02-24 12:12:30 +0000
committerAlexander Motin <mav@FreeBSD.org>2017-02-24 12:12:30 +0000
commitd7c2cc352e9160cac44d84ee1f7712f8d3c832e3 (patch)
tree1c5f57159b83ecd3a24dfe92cf3eede29000b190 /sys/cam
parent5c0b756a9a7ed845072f6718788e375902fc710a (diff)
downloadsrc-d7c2cc352e9160cac44d84ee1f7712f8d3c832e3.tar.gz
src-d7c2cc352e9160cac44d84ee1f7712f8d3c832e3.zip
Explicitly abort ATIO if CTIO sending status has failed.
This helps SIM to free related resources in questionable cases. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=314204
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 c70a3c0e441e..1385a73f695b 100644
--- a/sys/cam/ctl/scsi_ctl.c
+++ b/sys/cam/ctl/scsi_ctl.c
@@ -1282,6 +1282,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,