aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_exch.c
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2009-02-27 17:07:21 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-13 16:15:15 -0400
commitb277d2aa9a4d969002c4157bf77b76b9ad9ca04a (patch)
tree1054ff4ab2d03eaaa527919380ed6334233f632b /drivers/scsi/libfc/fc_exch.c
parent39ca9a065a5a0a6f2f0cd648090a979ba3f4f018 (diff)
[SCSI] libfc: add support of large receive offload by ddp in fc_fcp
When LLD supports direct data placement (ddp) for large receive of an scsi i/o coming into fc_fcp, we call into libfc_function_template's ddp_setup() to prepare for a ddp of large receive for this read I/O. When I/O is complete, we call the corresponding ddp_done() to get the length of data ddped as well as to let LLD do clean up. fc_fcp_ddp_setup()/fc_fcp_ddp_done() are added to setup and complete a ddped read I/O described by the given fc_fcp_pkt. They would call into corresponding ddp_setup/ddp_done implemented by the fcoe layer. Eventually, fcoe layer calls into LLD's ddp_setup/ddp_done provided through net_device Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/libfc/fc_exch.c')
-rw-r--r--drivers/scsi/libfc/fc_exch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 8a0c5c239e9c..992af05aacf1 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -489,7 +489,7 @@ static u16 fc_em_alloc_xid(struct fc_exch_mgr *mp, const struct fc_frame *fp)
489 struct fc_exch *ep = NULL; 489 struct fc_exch *ep = NULL;
490 490
491 if (mp->max_read) { 491 if (mp->max_read) {
492 if (fc_frame_is_read(fp)) { 492 if (fc_fcp_is_read(fr_fsp(fp))) {
493 min = mp->min_xid; 493 min = mp->min_xid;
494 max = mp->max_read; 494 max = mp->max_read;
495 plast = &mp->last_read; 495 plast = &mp->last_read;
@@ -1841,6 +1841,8 @@ struct fc_seq *fc_exch_seq_send(struct fc_lport *lp,
1841 fc_exch_setup_hdr(ep, fp, ep->f_ctl); 1841 fc_exch_setup_hdr(ep, fp, ep->f_ctl);
1842 sp->cnt++; 1842 sp->cnt++;
1843 1843
1844 fc_fcp_ddp_setup(fr_fsp(fp), ep->xid);
1845
1844 if (unlikely(lp->tt.frame_send(lp, fp))) 1846 if (unlikely(lp->tt.frame_send(lp, fp)))
1845 goto err; 1847 goto err;
1846 1848