diff options
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/libfc.h | 48 |
1 files changed, 8 insertions, 40 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index f1bde91f98a2..c2b928cfafb9 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -518,25 +518,6 @@ struct libfc_function_template { | |||
518 | void (*exch_done)(struct fc_seq *sp); | 518 | void (*exch_done)(struct fc_seq *sp); |
519 | 519 | ||
520 | /* | 520 | /* |
521 | * Assigns a EM and a free XID for an new exchange and then | ||
522 | * allocates a new exchange and sequence pair. | ||
523 | * The fp can be used to determine free XID. | ||
524 | * | ||
525 | * STATUS: OPTIONAL | ||
526 | */ | ||
527 | struct fc_exch *(*exch_get)(struct fc_lport *lp, struct fc_frame *fp); | ||
528 | |||
529 | /* | ||
530 | * Release previously assigned XID by exch_get API. | ||
531 | * The LLD may implement this if XID is assigned by LLD | ||
532 | * in exch_get(). | ||
533 | * | ||
534 | * STATUS: OPTIONAL | ||
535 | */ | ||
536 | void (*exch_put)(struct fc_lport *lp, struct fc_exch_mgr *mp, | ||
537 | u16 ex_id); | ||
538 | |||
539 | /* | ||
540 | * Start a new sequence on the same exchange/sequence tuple. | 521 | * Start a new sequence on the same exchange/sequence tuple. |
541 | * | 522 | * |
542 | * STATUS: OPTIONAL | 523 | * STATUS: OPTIONAL |
@@ -703,7 +684,6 @@ struct fc_lport { | |||
703 | 684 | ||
704 | /* Associations */ | 685 | /* Associations */ |
705 | struct Scsi_Host *host; | 686 | struct Scsi_Host *host; |
706 | struct fc_exch_mgr *emp; | ||
707 | struct list_head ema_list; | 687 | struct list_head ema_list; |
708 | struct fc_rport *dns_rp; | 688 | struct fc_rport *dns_rp; |
709 | struct fc_rport *ptp_rp; | 689 | struct fc_rport *ptp_rp; |
@@ -996,27 +976,25 @@ void fc_exch_mgr_del(struct fc_exch_mgr_anchor *ema); | |||
996 | * a new exchange. | 976 | * a new exchange. |
997 | * The LLD may choose to have multiple EMs, | 977 | * The LLD may choose to have multiple EMs, |
998 | * e.g. one EM instance per CPU receive thread in LLD. | 978 | * e.g. one EM instance per CPU receive thread in LLD. |
999 | * The LLD can use exch_get() of struct libfc_function_template | ||
1000 | * to specify XID for a new exchange within | ||
1001 | * a specified EM instance. | ||
1002 | * | 979 | * |
1003 | * The em_idx to uniquely identify an EM instance. | 980 | * Specified match function is used in allocating exchanges |
981 | * from newly allocated EM. | ||
1004 | */ | 982 | */ |
1005 | struct fc_exch_mgr *fc_exch_mgr_alloc(struct fc_lport *lp, | 983 | struct fc_exch_mgr *fc_exch_mgr_alloc(struct fc_lport *lp, |
1006 | enum fc_class class, | 984 | enum fc_class class, |
1007 | u16 min_xid, | 985 | u16 min_xid, |
1008 | u16 max_xid); | 986 | u16 max_xid, |
987 | bool (*match)(struct fc_frame *)); | ||
1009 | 988 | ||
1010 | /* | 989 | /* |
1011 | * Free an exchange manager. | 990 | * Free all exchange managers of a lport. |
1012 | */ | 991 | */ |
1013 | void fc_exch_mgr_free(struct fc_exch_mgr *mp); | 992 | void fc_exch_mgr_free(struct fc_lport *lport); |
1014 | 993 | ||
1015 | /* | 994 | /* |
1016 | * Receive a frame on specified local port and exchange manager. | 995 | * Receive a frame on specified local port and exchange manager. |
1017 | */ | 996 | */ |
1018 | void fc_exch_recv(struct fc_lport *lp, struct fc_exch_mgr *mp, | 997 | void fc_exch_recv(struct fc_lport *lp, struct fc_frame *fp); |
1019 | struct fc_frame *fp); | ||
1020 | 998 | ||
1021 | /* | 999 | /* |
1022 | * This function is for exch_seq_send function pointer in | 1000 | * This function is for exch_seq_send function pointer in |
@@ -1058,19 +1036,9 @@ int fc_seq_exch_abort(const struct fc_seq *req_sp, unsigned int timer_msec); | |||
1058 | void fc_exch_done(struct fc_seq *sp); | 1036 | void fc_exch_done(struct fc_seq *sp); |
1059 | 1037 | ||
1060 | /* | 1038 | /* |
1061 | * Assigns a EM and XID for a frame and then allocates | ||
1062 | * a new exchange and sequence pair. | ||
1063 | * The fp can be used to determine free XID. | ||
1064 | */ | ||
1065 | struct fc_exch *fc_exch_get(struct fc_lport *lp, struct fc_frame *fp); | ||
1066 | |||
1067 | /* | ||
1068 | * Allocate a new exchange and sequence pair. | 1039 | * Allocate a new exchange and sequence pair. |
1069 | * if ex_id is zero then next free exchange id | ||
1070 | * from specified exchange manger mp will be assigned. | ||
1071 | */ | 1040 | */ |
1072 | struct fc_exch *fc_exch_alloc(struct fc_exch_mgr *mp, | 1041 | struct fc_exch *fc_exch_alloc(struct fc_lport *lport, struct fc_frame *fp); |
1073 | struct fc_frame *fp, u16 ex_id); | ||
1074 | /* | 1042 | /* |
1075 | * Start a new sequence on the same exchange as the supplied sequence. | 1043 | * Start a new sequence on the same exchange as the supplied sequence. |
1076 | */ | 1044 | */ |