Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2017 06:29:42 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r314745 - stable/10/sys/cam/ctl
Message-ID:  <201703060629.v266TgeA095815@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Mar  6 06:29:42 2017
New Revision: 314745
URL: https://svnweb.freebsd.org/changeset/base/314745

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

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

Modified: stable/10/sys/cam/ctl/scsi_ctl.c
==============================================================================
--- stable/10/sys/cam/ctl/scsi_ctl.c	Mon Mar  6 06:29:10 2017	(r314744)
+++ stable/10/sys/cam/ctl/scsi_ctl.c	Mon Mar  6 06:29:42 2017	(r314745)
@@ -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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703060629.v266TgeA095815>