mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
bnx2fc: Set ELS transfer length correctly for middle path commands.
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Chad Dupuis <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Tomas Henzl <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
de909d8740
commit
1fffa19991
2 changed files with 7 additions and 2 deletions
|
|
@ -707,6 +707,7 @@ static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op,
|
|||
els_req->cb_func = cb_func;
|
||||
cb_arg->io_req = els_req;
|
||||
els_req->cb_arg = cb_arg;
|
||||
els_req->data_xfer_len = data_len;
|
||||
|
||||
mp_req = (struct bnx2fc_mp_req *)&(els_req->mp_req);
|
||||
rc = bnx2fc_init_mp_req(els_req);
|
||||
|
|
|
|||
|
|
@ -623,8 +623,12 @@ int bnx2fc_init_mp_req(struct bnx2fc_cmd *io_req)
|
|||
mp_req = (struct bnx2fc_mp_req *)&(io_req->mp_req);
|
||||
memset(mp_req, 0, sizeof(struct bnx2fc_mp_req));
|
||||
|
||||
mp_req->req_len = sizeof(struct fcp_cmnd);
|
||||
io_req->data_xfer_len = mp_req->req_len;
|
||||
if (io_req->cmd_type != BNX2FC_ELS) {
|
||||
mp_req->req_len = sizeof(struct fcp_cmnd);
|
||||
io_req->data_xfer_len = mp_req->req_len;
|
||||
} else
|
||||
mp_req->req_len = io_req->data_xfer_len;
|
||||
|
||||
mp_req->req_buf = dma_alloc_coherent(&hba->pcidev->dev, CNIC_PAGE_SIZE,
|
||||
&mp_req->req_buf_dma,
|
||||
GFP_ATOMIC);
|
||||
|
|
|
|||
Loading…
Reference in a new issue