changeset 10903:65dc46bd2696

6886284 ST driver hangs on persistent reserve out - register
author bo zhou - Sun Microsystems - Beijing China <Bo.Zhou@Sun.COM>
date Thu, 29 Oct 2009 10:27:54 +0800
parents f2a954d6028e
children 3924624ae267
files usr/src/uts/common/io/scsi/targets/st.c
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/scsi/targets/st.c	Wed Oct 28 15:30:45 2009 -0700
+++ b/usr/src/uts/common/io/scsi/targets/st.c	Thu Oct 29 10:27:54 2009 +0800
@@ -16881,6 +16881,20 @@
 		}
 
 		/*
+		 * If we have already set a scsi II reserve and get a
+		 * conflict on a scsi III type reserve fail without
+		 * any attempt to recover.
+		 */
+		if ((un->un_rsvd_status & ST_RESERVE | ST_PRESERVE_RESERVE) &&
+		    (errinfo->ei_failed_pkt.pkt_cdbp[0] ==
+		    SCMD_PERSISTENT_RESERVE_OUT) ||
+		    (errinfo->ei_failed_pkt.pkt_cdbp[0] ==
+		    SCMD_PERSISTENT_RESERVE_IN)) {
+			st_recov_ret(un, errinfo, COMMAND_DONE_EACCES);
+			return;
+		}
+
+		/*
 		 * If scsi II lost reserve try and get it back.
 		 */
 		if ((((un->un_rsvd_status &