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, 7 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index a070e5712439..48adb89d911a 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -435,7 +435,13 @@ static int fc_fcp_send_data(struct fc_fcp_pkt *fsp, struct fc_seq *seq,
435 * burst length (t_blen) to seq_blen, otherwise set t_blen 435 * burst length (t_blen) to seq_blen, otherwise set t_blen
436 * to max FC frame payload previously set in fsp->max_payload. 436 * to max FC frame payload previously set in fsp->max_payload.
437 */ 437 */
438 t_blen = lp->seq_offload ? seq_blen : fsp->max_payload; 438 t_blen = fsp->max_payload;
439 if (lp->seq_offload) {
440 t_blen = min(seq_blen, (size_t)lp->lso_max);
441 FC_DEBUG_FCP("fsp=%p:lso:blen=%zx lso_max=0x%x t_blen=%zx\n",
442 fsp, seq_blen, lp->lso_max, t_blen);
443 }
444
439 WARN_ON(t_blen < FC_MIN_MAX_PAYLOAD); 445 WARN_ON(t_blen < FC_MIN_MAX_PAYLOAD);
440 if (t_blen > 512) 446 if (t_blen > 512)
441 t_blen &= ~(512 - 1); /* round down to block size */ 447 t_blen &= ~(512 - 1); /* round down to block size */