]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnx2fc: Fix FCP RSP residual parsing.
authorChad Dupuis <chad.dupuis@qlogic.com>
Mon, 20 Jul 2015 20:30:19 +0000 (13:30 -0700)
committerEthan Zhao <ethan.zhao@oracle.com>
Tue, 20 Oct 2015 02:20:17 +0000 (11:20 +0900)
Orabug: 22013781

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/scsi/bnx2fc/bnx2fc_io.c

index 5d6a81b18065de1cf9a8b7878e9dab1af5064f7c..877a79adf43a4b1f4eef6f23c2020883d9fd85b5 100644 (file)
@@ -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 =