diff options
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_hwi.c')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_hwi.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c index 357a63d192e2..ec893594a127 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c +++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c | |||
@@ -1711,18 +1711,33 @@ void bnx2fc_init_task(struct bnx2fc_cmd *io_req, | |||
1711 | task_type = FCOE_TASK_TYPE_READ; | 1711 | task_type = FCOE_TASK_TYPE_READ; |
1712 | 1712 | ||
1713 | /* Tx only */ | 1713 | /* Tx only */ |
1714 | bd_count = bd_tbl->bd_valid; | ||
1714 | if (task_type == FCOE_TASK_TYPE_WRITE) { | 1715 | if (task_type == FCOE_TASK_TYPE_WRITE) { |
1715 | task->txwr_only.sgl_ctx.sgl.mul_sgl.cur_sge_addr.lo = | 1716 | if ((dev_type == TYPE_DISK) && (bd_count == 1)) { |
1716 | (u32)bd_tbl->bd_tbl_dma; | 1717 | struct fcoe_bd_ctx *fcoe_bd_tbl = bd_tbl->bd_tbl; |
1717 | task->txwr_only.sgl_ctx.sgl.mul_sgl.cur_sge_addr.hi = | 1718 | |
1718 | (u32)((u64)bd_tbl->bd_tbl_dma >> 32); | 1719 | task->txwr_only.sgl_ctx.cached_sge.cur_buf_addr.lo = |
1719 | task->txwr_only.sgl_ctx.sgl.mul_sgl.sgl_size = | 1720 | fcoe_bd_tbl->buf_addr_lo; |
1720 | bd_tbl->bd_valid; | 1721 | task->txwr_only.sgl_ctx.cached_sge.cur_buf_addr.hi = |
1722 | fcoe_bd_tbl->buf_addr_hi; | ||
1723 | task->txwr_only.sgl_ctx.cached_sge.cur_buf_rem = | ||
1724 | fcoe_bd_tbl->buf_len; | ||
1725 | |||
1726 | task->txwr_rxrd.const_ctx.init_flags |= 1 << | ||
1727 | FCOE_TCE_TX_WR_RX_RD_CONST_CACHED_SGE_SHIFT; | ||
1728 | } else { | ||
1729 | task->txwr_only.sgl_ctx.sgl.mul_sgl.cur_sge_addr.lo = | ||
1730 | (u32)bd_tbl->bd_tbl_dma; | ||
1731 | task->txwr_only.sgl_ctx.sgl.mul_sgl.cur_sge_addr.hi = | ||
1732 | (u32)((u64)bd_tbl->bd_tbl_dma >> 32); | ||
1733 | task->txwr_only.sgl_ctx.sgl.mul_sgl.sgl_size = | ||
1734 | bd_tbl->bd_valid; | ||
1735 | } | ||
1721 | } | 1736 | } |
1722 | 1737 | ||
1723 | /*Tx Write Rx Read */ | 1738 | /*Tx Write Rx Read */ |
1724 | /* Init state to NORMAL */ | 1739 | /* Init state to NORMAL */ |
1725 | task->txwr_rxrd.const_ctx.init_flags = task_type << | 1740 | task->txwr_rxrd.const_ctx.init_flags |= task_type << |
1726 | FCOE_TCE_TX_WR_RX_RD_CONST_TASK_TYPE_SHIFT; | 1741 | FCOE_TCE_TX_WR_RX_RD_CONST_TASK_TYPE_SHIFT; |
1727 | if (dev_type == TYPE_TAPE) | 1742 | if (dev_type == TYPE_TAPE) |
1728 | task->txwr_rxrd.const_ctx.init_flags |= | 1743 | task->txwr_rxrd.const_ctx.init_flags |= |