Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Oct 2015 09:24:09 +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: r288762 - stable/10/sys/cam/ctl
Message-ID:  <201510050924.t959O9wn042977@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Oct  5 09:24:08 2015
New Revision: 288762
URL: https://svnweb.freebsd.org/changeset/base/288762

Log:
  MFC r287860: Frontends don't need to set errors themselves.

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

Modified: stable/10/sys/cam/ctl/ctl_frontend_ioctl.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_frontend_ioctl.c	Mon Oct  5 09:23:20 2015	(r288761)
+++ stable/10/sys/cam/ctl/ctl_frontend_ioctl.c	Mon Oct  5 09:24:08 2015	(r288762)
@@ -157,11 +157,8 @@ ctl_ioctl_do_datamove(struct ctl_scsiio 
 		ext_sglist = (struct ctl_sg_entry *)malloc(ext_sglen, M_CTL,
 							   M_WAITOK);
 		ext_sglist_malloced = 1;
-		if (copyin(ctsio->ext_data_ptr, ext_sglist,
-				   ext_sglen) != 0) {
-			ctl_set_internal_failure(ctsio,
-						 /*sks_valid*/ 0,
-						 /*retry_count*/ 0);
+		if (copyin(ctsio->ext_data_ptr, ext_sglist, ext_sglen) != 0) {
+			ctsio->io_hdr.port_status = 31343;
 			goto bailout;
 		}
 		ext_sg_entries = ctsio->ext_sg_entries;
@@ -229,9 +226,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio 
 			CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p "
 					 "to %p\n", kern_ptr, ext_ptr));
 			if (copyout(kern_ptr, ext_ptr, len_to_copy) != 0) {
-				ctl_set_internal_failure(ctsio,
-							 /*sks_valid*/ 0,
-							 /*retry_count*/ 0);
+				ctsio->io_hdr.port_status = 31344;
 				goto bailout;
 			}
 		} else {
@@ -240,9 +235,7 @@ ctl_ioctl_do_datamove(struct ctl_scsiio 
 			CTL_DEBUG_PRINT(("ctl_ioctl_do_datamove: from %p "
 					 "to %p\n", ext_ptr, kern_ptr));
 			if (copyin(ext_ptr, kern_ptr, len_to_copy)!= 0){
-				ctl_set_internal_failure(ctsio,
-							 /*sks_valid*/ 0,
-							 /*retry_count*/0);
+				ctsio->io_hdr.port_status = 31345;
 				goto bailout;
 			}
 		}



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