changeset 12661:55116f31ff63

6948339 OpenStorage iSCSI luns cannot be brought online from Windows client when using iSCSI offload card
author Priya Krishnan <Priya.Krishnan@Sun.COM>
date Mon, 21 Jun 2010 14:34:21 -0400
parents 32abd267e35d
children b0fe99c06d14
files usr/src/uts/common/io/comstar/port/iscsit/iscsit.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c	Mon Jun 21 11:12:09 2010 -0700
+++ b/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c	Mon Jun 21 14:34:21 2010 -0400
@@ -1096,12 +1096,15 @@
 	 */
 	ASSERT(MUTEX_HELD(&itask->it_ict->ict_sess->ist_sn_mutex));
 	/*
-	 * Lun is only required if the opcode == ISCSI_OP_SCSI_DATA_RSP
-	 * and the 'A' bit is to be set
+	 * On incoming data, the target transfer tag and Lun is only
+	 * provided by the target if the A bit is set, Since the target
+	 * does not currently support Error Recovery Level 1, the A
+	 * bit is never set.
 	 */
 	dh->opcode = opcode;
 	dh->itt = itask->it_itt;
-	dh->ttt = itask->it_ttt;
+	dh->ttt = ((opcode & ISCSI_OPCODE_MASK) == ISCSI_OP_SCSI_DATA_RSP) ?
+	    ISCSI_RSVD_TASK_TAG : itask->it_ttt;
 
 	dh->expcmdsn = htonl(itask->it_ict->ict_sess->ist_expcmdsn);
 	dh->maxcmdsn = htonl(itask->it_ict->ict_sess->ist_maxcmdsn);