diff options
-rw-r--r-- | drivers/scsi/libfc/fc_libfc.c | 19 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_libfc.h | 1 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_libfc.c b/drivers/scsi/libfc/fc_libfc.c index 5e40dab8f91..b7735129f1f 100644 --- a/drivers/scsi/libfc/fc_libfc.c +++ b/drivers/scsi/libfc/fc_libfc.c | |||
@@ -232,6 +232,25 @@ void fc_fill_reply_hdr(struct fc_frame *fp, const struct fc_frame *in_fp, | |||
232 | } | 232 | } |
233 | EXPORT_SYMBOL(fc_fill_reply_hdr); | 233 | EXPORT_SYMBOL(fc_fill_reply_hdr); |
234 | 234 | ||
235 | /** | ||
236 | * fc_fc4_conf_lport_params() - Modify "service_params" of specified lport | ||
237 | * if there is service provider (target provider) registered with libfc | ||
238 | * for specified "fc_ft_type" | ||
239 | * @lport: Local port which service_params needs to be modified | ||
240 | * @type: FC-4 type, such as FC_TYPE_FCP | ||
241 | */ | ||
242 | void fc_fc4_conf_lport_params(struct fc_lport *lport, enum fc_fh_type type) | ||
243 | { | ||
244 | struct fc4_prov *prov_entry; | ||
245 | BUG_ON(type >= FC_FC4_PROV_SIZE); | ||
246 | BUG_ON(!lport); | ||
247 | prov_entry = fc_passive_prov[type]; | ||
248 | if (type == FC_TYPE_FCP) { | ||
249 | if (prov_entry && prov_entry->recv) | ||
250 | lport->service_params |= FCP_SPPF_TARG_FCN; | ||
251 | } | ||
252 | } | ||
253 | |||
235 | void fc_lport_iterate(void (*notify)(struct fc_lport *, void *), void *arg) | 254 | void fc_lport_iterate(void (*notify)(struct fc_lport *, void *), void *arg) |
236 | { | 255 | { |
237 | struct fc_lport *lport; | 256 | struct fc_lport *lport; |
diff --git a/drivers/scsi/libfc/fc_libfc.h b/drivers/scsi/libfc/fc_libfc.h index 8496f7020b9..fedc819d70c 100644 --- a/drivers/scsi/libfc/fc_libfc.h +++ b/drivers/scsi/libfc/fc_libfc.h | |||
@@ -125,6 +125,7 @@ void fc_destroy_fcp(void); | |||
125 | const char *fc_els_resp_type(struct fc_frame *); | 125 | const char *fc_els_resp_type(struct fc_frame *); |
126 | extern void fc_fc4_add_lport(struct fc_lport *); | 126 | extern void fc_fc4_add_lport(struct fc_lport *); |
127 | extern void fc_fc4_del_lport(struct fc_lport *); | 127 | extern void fc_fc4_del_lport(struct fc_lport *); |
128 | extern void fc_fc4_conf_lport_params(struct fc_lport *, enum fc_fh_type); | ||
128 | 129 | ||
129 | /* | 130 | /* |
130 | * Copies a buffer into an sg list | 131 | * Copies a buffer into an sg list |
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index e0ef81426c3..735f1f82ccf 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
@@ -1597,6 +1597,7 @@ int fc_lport_config(struct fc_lport *lport) | |||
1597 | 1597 | ||
1598 | fc_lport_add_fc4_type(lport, FC_TYPE_FCP); | 1598 | fc_lport_add_fc4_type(lport, FC_TYPE_FCP); |
1599 | fc_lport_add_fc4_type(lport, FC_TYPE_CT); | 1599 | fc_lport_add_fc4_type(lport, FC_TYPE_CT); |
1600 | fc_fc4_conf_lport_params(lport, FC_TYPE_FCP); | ||
1600 | 1601 | ||
1601 | return 0; | 1602 | return 0; |
1602 | } | 1603 | } |