From 33dc362b7f155a584688bcab2facdd4d21232001 Mon Sep 17 00:00:00 2001 From: Yi Zou Date: Mon, 20 Jun 2011 16:59:05 -0700 Subject: [SCSI] libfc, tcm_fc: add ddp_targ() to libfc function template to supprot FCoE DDP in target mode The fcoe driver can implement ddp_targ() similarly to ddp_setup() when fcoe stack works with existing target frame, e.g., tcm, where the ddp_targ() would eventually point to the underlying hardware driver's implementation of ndo_fcoe_ddp_targ() through net_device_ops. This new API sets up DDP context for target appropriately by setting required bits for DDP context. Signed-off-by: Yi Zou Signed-off-by: Kiran Patil Signed-off-by: Robert Love Signed-off-by: James Bottomley --- include/scsi/libfc.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/scsi') diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index a3cbda4ddb5c..7d96829b0c00 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h @@ -510,6 +510,14 @@ struct libfc_function_template { * STATUS: OPTIONAL */ int (*ddp_done)(struct fc_lport *, u16); + /* + * Sets up the DDP context for a given exchange id on the given + * scatterlist if LLD supports DDP for FCoE target. + * + * STATUS: OPTIONAL + */ + int (*ddp_target)(struct fc_lport *, u16, struct scatterlist *, + unsigned int); /* * Allow LLD to fill its own Link Error Status Block * -- cgit v1.2.3-59-g8ed1b