From: Chad Dupuis Date: Mon, 19 Oct 2015 19:40:38 +0000 (-0400) Subject: bnx2fc: Fix FCP RSP residual parsing. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=adcf7dfbea80382457a552b4eb7aa2b7d9f76dac;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git bnx2fc: Fix FCP RSP residual parsing. Signed-off-by: Giridhar Malavali Signed-off-by: Chad Dupuis Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 30916fd3a9f0..8ae0621dbe28 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -1759,7 +1759,10 @@ static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req, int fcp_rsp_len = 0; io_req->fcp_status = FC_GOOD; - io_req->fcp_resid = fcp_rsp->fcp_resid; + io_req->fcp_resid = 0; + if (rsp_flags & (FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER | + FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER)) + io_req->fcp_resid = fcp_rsp->fcp_resid; io_req->scsi_comp_flags = rsp_flags; CMD_SCSI_STATUS(sc_cmd) = io_req->cdb_status =