[SCSI] be2iscsi: Fix for proper setting of FW
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Fri, 25 Mar 2011 21:24:01 +0000 (14:24 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 15 Apr 2011 21:46:17 +0000 (16:46 -0500)
There was a bug in setting up type and dmsg for FW

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/be2iscsi/be_main.c

index 91b354daf94be504e9e8ad7d45fc4e6aadc277ac..d83413658a9dc841da09acec092ac78c1a58132f 100644 (file)
@@ -4020,12 +4020,17 @@ static int beiscsi_mtask(struct iscsi_task *task)
                hwi_write_buffer(pwrb, task);
                break;
        case ISCSI_OP_NOOP_OUT:
-               AMAP_SET_BITS(struct amap_iscsi_wrb, type, pwrb,
-                             INI_RD_CMD);
-               if (task->hdr->ttt == ISCSI_RESERVED_TAG)
+               if (task->hdr->ttt != ISCSI_RESERVED_TAG) {
+                       AMAP_SET_BITS(struct amap_iscsi_wrb, type, pwrb,
+                                     TGT_DM_CMD);
+                       AMAP_SET_BITS(struct amap_iscsi_wrb, cmdsn_itt,
+                                     pwrb, 0);
                        AMAP_SET_BITS(struct amap_iscsi_wrb, dmsg, pwrb, 0);
-               else
+               } else {
+                       AMAP_SET_BITS(struct amap_iscsi_wrb, type, pwrb,
+                                     INI_RD_CMD);
                        AMAP_SET_BITS(struct amap_iscsi_wrb, dmsg, pwrb, 1);
+               }
                hwi_write_buffer(pwrb, task);
                break;
        case ISCSI_OP_TEXT: