aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_fcp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 59a4408b27b5..e6c6f4742368 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -302,10 +302,13 @@ static void fc_fcp_ddp_done(struct fc_fcp_pkt *fsp)
302 if (!fsp) 302 if (!fsp)
303 return; 303 return;
304 304
305 if (fsp->xfer_ddp == FC_XID_UNKNOWN)
306 return;
307
305 lp = fsp->lp; 308 lp = fsp->lp;
306 if (fsp->xfer_ddp && lp->tt.ddp_done) { 309 if (lp->tt.ddp_done) {
307 fsp->xfer_len = lp->tt.ddp_done(lp, fsp->xfer_ddp); 310 fsp->xfer_len = lp->tt.ddp_done(lp, fsp->xfer_ddp);
308 fsp->xfer_ddp = 0; 311 fsp->xfer_ddp = FC_XID_UNKNOWN;
309 } 312 }
310} 313}
311 314
@@ -1708,6 +1711,7 @@ int fc_queuecommand(struct scsi_cmnd *sc_cmd, void (*done)(struct scsi_cmnd *))
1708 fsp->cmd = sc_cmd; /* save the cmd */ 1711 fsp->cmd = sc_cmd; /* save the cmd */
1709 fsp->lp = lp; /* save the softc ptr */ 1712 fsp->lp = lp; /* save the softc ptr */
1710 fsp->rport = rport; /* set the remote port ptr */ 1713 fsp->rport = rport; /* set the remote port ptr */
1714 fsp->xfer_ddp = FC_XID_UNKNOWN;
1711 sc_cmd->scsi_done = done; 1715 sc_cmd->scsi_done = done;
1712 1716
1713 /* 1717 /*