summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2009-02-27 14:07:10 -0800
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-13 15:14:33 -0500
commit276d68142b7b676594ab8739355c27e9e5b3d41d (patch)
tree6c341ba366c900f2bef253d13b117da1c278ee3f /drivers/scsi
parentea1e9a9df5e1fde7ad8878c85b4a097cad0ddcea (diff)
downloadlinux-stable-276d68142b7b676594ab8739355c27e9e5b3d41d.tar.gz
linux-stable-276d68142b7b676594ab8739355c27e9e5b3d41d.tar.bz2
linux-stable-276d68142b7b676594ab8739355c27e9e5b3d41d.zip
[SCSI] libfc: use lso_max for sequence offload
Make sure for large send is supported by LLD in outgoing FCP data, we are only sending the lso_max a time in one single large send, since that is what supported by LLD. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-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,
* burst length (t_blen) to seq_blen, otherwise set t_blen
* to max FC frame payload previously set in fsp->max_payload.
*/
- t_blen = lp->seq_offload ? seq_blen : fsp->max_payload;
+ t_blen = fsp->max_payload;
+ if (lp->seq_offload) {
+ t_blen = min(seq_blen, (size_t)lp->lso_max);
+ FC_DEBUG_FCP("fsp=%p:lso:blen=%zx lso_max=0x%x t_blen=%zx\n",
+ fsp, seq_blen, lp->lso_max, t_blen);
+ }
+
WARN_ON(t_blen < FC_MIN_MAX_PAYLOAD);
if (t_blen > 512)
t_blen &= ~(512 - 1); /* round down to block size */