From: Andy Yan Date: Mon, 11 May 2009 12:01:55 +0000 (+0800) Subject: [SCSI] mvsas: bug fix with setting task management frame type X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2b288133ab6306b1761e0a2ef943b944ead6ad69;p=linux-beck.git [SCSI] mvsas: bug fix with setting task management frame type Correct frame type setting according to parameter. Signed-off-by: Ying Chu Signed-off-by: Andy Yan Signed-off-by: Ke Wei Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index d79ac179eaff..f709319c2b6d 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c @@ -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);