]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] mvsas: bug fix with setting task management frame type
authorAndy Yan <ayan@marvell.com>
Mon, 11 May 2009 12:01:55 +0000 (20:01 +0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 23 May 2009 20:44:07 +0000 (15:44 -0500)
Correct frame type setting according to parameter.

Signed-off-by: Ying Chu <jasonchu@marvell.com>
Signed-off-by: Andy Yan <ayan@marvell.com>
Signed-off-by: Ke Wei <kewei@marvell.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/mvsas/mv_sas.c

index d79ac179eaff63f84ad22094e0630ea9b7f31f1b..f709319c2b6dcd65fd3ba61fc71affef5995551b 100644 (file)
@@ -761,9 +761,11 @@ static int mvs_task_prep_ssp(struct mvs_info *mvi,
                flags |= MCH_FBURST;
                fburst = (1 << 7);
        }
-       hdr->flags = cpu_to_le32(flags |
-                                (tei->n_elem << MCH_PRD_LEN_SHIFT) |
-                                (MCH_SSP_FR_CMD << MCH_SSP_FR_TYPE_SHIFT));
+       if (is_tmf)
+               flags |= (MCH_SSP_FR_TASK << MCH_SSP_FR_TYPE_SHIFT);
+       else
+               flags |= (MCH_SSP_FR_CMD << MCH_SSP_FR_TYPE_SHIFT);
+       hdr->flags = cpu_to_le32(flags | (tei->n_elem << MCH_PRD_LEN_SHIFT));
        hdr->tags = cpu_to_le32(tag);
        hdr->data_len = cpu_to_le32(task->total_xfer_len);