svn commit: r314744 - stable/11/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Mon Mar 6 06:29:11 UTC 2017


Author: mav
Date: Mon Mar  6 06:29:10 2017
New Revision: 314744
URL: https://svnweb.freebsd.org/changeset/base/314744

Log:
  MFC r314204: Explicitly abort ATIO if CTIO sending status has failed.
  
  This helps SIM to free related resources in questionable cases.

Modified:
  stable/11/sys/cam/ctl/scsi_ctl.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ctl/scsi_ctl.c
==============================================================================
--- stable/11/sys/cam/ctl/scsi_ctl.c	Mon Mar  6 06:28:30 2017	(r314743)
+++ stable/11/sys/cam/ctl/scsi_ctl.c	Mon Mar  6 06:29:10 2017	(r314744)
@@ -1288,6 +1288,14 @@ ctlfedone(struct cam_periph *periph, uni
 		 * 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,


More information about the svn-src-all mailing list