diff options
Diffstat (limited to 'include/scsi/libfc.h')
-rw-r--r-- | include/scsi/libfc.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index a2e126b86e3e..a70eafaad084 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -245,6 +245,7 @@ struct fc_fcp_pkt { | |||
245 | */ | 245 | */ |
246 | struct fcp_cmnd cdb_cmd; | 246 | struct fcp_cmnd cdb_cmd; |
247 | size_t xfer_len; | 247 | size_t xfer_len; |
248 | u16 xfer_ddp; /* this xfer is ddped */ | ||
248 | u32 xfer_contig_end; /* offset of end of contiguous xfer */ | 249 | u32 xfer_contig_end; /* offset of end of contiguous xfer */ |
249 | u16 max_payload; /* max payload size in bytes */ | 250 | u16 max_payload; /* max payload size in bytes */ |
250 | 251 | ||
@@ -267,6 +268,15 @@ struct fc_fcp_pkt { | |||
267 | u8 recov_retry; /* count of recovery retries */ | 268 | u8 recov_retry; /* count of recovery retries */ |
268 | struct fc_seq *recov_seq; /* sequence for REC or SRR */ | 269 | struct fc_seq *recov_seq; /* sequence for REC or SRR */ |
269 | }; | 270 | }; |
271 | /* | ||
272 | * FC_FCP HELPER FUNCTIONS | ||
273 | *****************************/ | ||
274 | static inline bool fc_fcp_is_read(const struct fc_fcp_pkt *fsp) | ||
275 | { | ||
276 | if (fsp && fsp->cmd) | ||
277 | return fsp->cmd->sc_data_direction == DMA_FROM_DEVICE; | ||
278 | return false; | ||
279 | } | ||
270 | 280 | ||
271 | /* | 281 | /* |
272 | * Structure and function definitions for managing Fibre Channel Exchanges | 282 | * Structure and function definitions for managing Fibre Channel Exchanges |
@@ -400,6 +410,21 @@ struct libfc_function_template { | |||
400 | void *arg, unsigned int timer_msec); | 410 | void *arg, unsigned int timer_msec); |
401 | 411 | ||
402 | /* | 412 | /* |
413 | * Sets up the DDP context for a given exchange id on the given | ||
414 | * scatterlist if LLD supports DDP for large receive. | ||
415 | * | ||
416 | * STATUS: OPTIONAL | ||
417 | */ | ||
418 | int (*ddp_setup)(struct fc_lport *lp, u16 xid, | ||
419 | struct scatterlist *sgl, unsigned int sgc); | ||
420 | /* | ||
421 | * Completes the DDP transfer and returns the length of data DDPed | ||
422 | * for the given exchange id. | ||
423 | * | ||
424 | * STATUS: OPTIONAL | ||
425 | */ | ||
426 | int (*ddp_done)(struct fc_lport *lp, u16 xid); | ||
427 | /* | ||
403 | * Send a frame using an existing sequence and exchange. | 428 | * Send a frame using an existing sequence and exchange. |
404 | * | 429 | * |
405 | * STATUS: OPTIONAL | 430 | * STATUS: OPTIONAL |
@@ -654,6 +679,7 @@ struct fc_lport { | |||
654 | u16 link_speed; | 679 | u16 link_speed; |
655 | u16 link_supported_speeds; | 680 | u16 link_supported_speeds; |
656 | u16 lro_xid; /* max xid for fcoe lro */ | 681 | u16 lro_xid; /* max xid for fcoe lro */ |
682 | unsigned int lso_max; /* max large send size */ | ||
657 | struct fc_ns_fts fcts; /* FC-4 type masks */ | 683 | struct fc_ns_fts fcts; /* FC-4 type masks */ |
658 | struct fc_els_rnid_gen rnid_gen; /* RNID information */ | 684 | struct fc_els_rnid_gen rnid_gen; /* RNID information */ |
659 | 685 | ||
@@ -821,6 +847,11 @@ int fc_change_queue_type(struct scsi_device *sdev, int tag_type); | |||
821 | void fc_fcp_destroy(struct fc_lport *); | 847 | void fc_fcp_destroy(struct fc_lport *); |
822 | 848 | ||
823 | /* | 849 | /* |
850 | * Set up direct-data placement for this I/O request | ||
851 | */ | ||
852 | void fc_fcp_ddp_setup(struct fc_fcp_pkt *fsp, u16 xid); | ||
853 | |||
854 | /* | ||
824 | * ELS/CT interface | 855 | * ELS/CT interface |
825 | *****************************/ | 856 | *****************************/ |
826 | /* | 857 | /* |