From 2b288133ab6306b1761e0a2ef943b944ead6ad69 Mon Sep 17 00:00:00 2001 From: Andy Yan Date: Mon, 11 May 2009 20:01:55 +0800 Subject: [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 --- drivers/scsi/mvsas/mv_sas.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); -- cgit v1.2.1