0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _LIBFC_H_
0009 #define _LIBFC_H_
0010
0011 #include <linux/timer.h>
0012 #include <linux/if.h>
0013 #include <linux/percpu.h>
0014 #include <linux/refcount.h>
0015
0016 #include <scsi/scsi_transport.h>
0017 #include <scsi/scsi_transport_fc.h>
0018 #include <scsi/scsi_bsg_fc.h>
0019
0020 #include <scsi/fc/fc_fcp.h>
0021 #include <scsi/fc/fc_ns.h>
0022 #include <scsi/fc/fc_ms.h>
0023 #include <scsi/fc/fc_els.h>
0024 #include <scsi/fc/fc_gs.h>
0025
0026 #include <scsi/fc_frame.h>
0027
0028 #define FC_FC4_PROV_SIZE (FC_TYPE_FCP + 1)
0029
0030
0031
0032
0033 #define FC_NO_ERR 0
0034 #define FC_EX_TIMEOUT 1
0035 #define FC_EX_CLOSED 2
0036 #define FC_EX_ALLOC_ERR 3
0037 #define FC_EX_XMIT_ERR 4
0038 #define FC_EX_ELS_RJT 5
0039 #define FC_EX_INV_LOGIN 6
0040 #define FC_EX_SEQ_ERR 6
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057 enum fc_lport_state {
0058 LPORT_ST_DISABLED = 0,
0059 LPORT_ST_FLOGI,
0060 LPORT_ST_DNS,
0061 LPORT_ST_RNN_ID,
0062 LPORT_ST_RSNN_NN,
0063 LPORT_ST_RSPN_ID,
0064 LPORT_ST_RFT_ID,
0065 LPORT_ST_RFF_ID,
0066 LPORT_ST_FDMI,
0067 LPORT_ST_RHBA,
0068 LPORT_ST_RPA,
0069 LPORT_ST_DHBA,
0070 LPORT_ST_DPRT,
0071 LPORT_ST_SCR,
0072 LPORT_ST_READY,
0073 LPORT_ST_LOGO,
0074 LPORT_ST_RESET
0075 };
0076
0077 enum fc_disc_event {
0078 DISC_EV_NONE = 0,
0079 DISC_EV_SUCCESS,
0080 DISC_EV_FAILED
0081 };
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095 enum fc_rport_state {
0096 RPORT_ST_INIT,
0097 RPORT_ST_FLOGI,
0098 RPORT_ST_PLOGI_WAIT,
0099 RPORT_ST_PLOGI,
0100 RPORT_ST_PRLI,
0101 RPORT_ST_RTV,
0102 RPORT_ST_READY,
0103 RPORT_ST_ADISC,
0104 RPORT_ST_DELETE,
0105 };
0106
0107
0108
0109
0110
0111
0112
0113
0114 struct fc_disc_port {
0115 struct fc_lport *lp;
0116 struct list_head peers;
0117 struct work_struct rport_work;
0118 u32 port_id;
0119 };
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129 enum fc_rport_event {
0130 RPORT_EV_NONE = 0,
0131 RPORT_EV_READY,
0132 RPORT_EV_FAILED,
0133 RPORT_EV_STOP,
0134 RPORT_EV_LOGO
0135 };
0136
0137 struct fc_rport_priv;
0138
0139
0140
0141
0142
0143 struct fc_rport_operations {
0144 void (*event_callback)(struct fc_lport *, struct fc_rport_priv *,
0145 enum fc_rport_event);
0146 };
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156 struct fc_rport_libfc_priv {
0157 struct fc_lport *local_port;
0158 enum fc_rport_state rp_state;
0159 u16 flags;
0160 #define FC_RP_FLAGS_REC_SUPPORTED (1 << 0)
0161 #define FC_RP_FLAGS_RETRY (1 << 1)
0162 #define FC_RP_STARTED (1 << 2)
0163 #define FC_RP_FLAGS_CONF_REQ (1 << 3)
0164 unsigned int e_d_tov;
0165 unsigned int r_a_tov;
0166 };
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190 struct fc_rport_priv {
0191 struct fc_lport *local_port;
0192 struct fc_rport *rport;
0193 struct kref kref;
0194 enum fc_rport_state rp_state;
0195 struct fc_rport_identifiers ids;
0196 u16 flags;
0197 u16 max_seq;
0198 u16 disc_id;
0199 u16 maxframe_size;
0200 unsigned int retries;
0201 unsigned int major_retries;
0202 unsigned int e_d_tov;
0203 unsigned int r_a_tov;
0204 struct mutex rp_mutex;
0205 struct delayed_work retry_work;
0206 enum fc_rport_event event;
0207 struct fc_rport_operations *ops;
0208 struct list_head peers;
0209 struct work_struct event_work;
0210 u32 supported_classes;
0211 u16 prli_count;
0212 struct rcu_head rcu;
0213 u16 sp_features;
0214 u8 spp_type;
0215 void (*lld_event_callback)(struct fc_lport *,
0216 struct fc_rport_priv *,
0217 enum fc_rport_event);
0218 };
0219
0220
0221
0222
0223
0224
0225
0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243
0244 struct fc_stats {
0245 u64 SecondsSinceLastReset;
0246 u64 TxFrames;
0247 u64 TxWords;
0248 u64 RxFrames;
0249 u64 RxWords;
0250 u64 ErrorFrames;
0251 u64 DumpedFrames;
0252 u64 FcpPktAllocFails;
0253 u64 FcpPktAborts;
0254 u64 FcpFrameAllocFails;
0255 u64 LinkFailureCount;
0256 u64 LossOfSignalCount;
0257 u64 InvalidTxWordCount;
0258 u64 InvalidCRCCount;
0259 u64 InputRequests;
0260 u64 OutputRequests;
0261 u64 ControlRequests;
0262 u64 InputBytes;
0263 u64 OutputBytes;
0264 u64 VLinkFailureCount;
0265 u64 MissDiscAdvCount;
0266 };
0267
0268
0269
0270
0271
0272
0273
0274
0275 struct fc_seq_els_data {
0276 enum fc_els_rjt_reason reason;
0277 enum fc_els_rjt_explan explan;
0278 };
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297
0298
0299
0300
0301
0302
0303
0304
0305
0306
0307
0308
0309
0310
0311 struct fc_fcp_pkt {
0312 spinlock_t scsi_pkt_lock;
0313 refcount_t ref_cnt;
0314
0315
0316 u32 data_len;
0317
0318
0319 struct scsi_cmnd *cmd;
0320 struct list_head list;
0321
0322
0323 struct fc_lport *lp;
0324 u8 state;
0325
0326
0327 u8 cdb_status;
0328 u8 status_code;
0329 u8 scsi_comp_flags;
0330 u32 io_status;
0331 u32 req_flags;
0332 u32 scsi_resid;
0333
0334
0335 size_t xfer_len;
0336 struct fcp_cmnd cdb_cmd;
0337 u32 xfer_contig_end;
0338 u16 max_payload;
0339 u16 xfer_ddp;
0340
0341
0342 struct fc_rport *rport;
0343 struct fc_seq *seq_ptr;
0344
0345
0346 struct timer_list timer;
0347 int wait_for_comp;
0348 int timer_delay;
0349 u32 recov_retry;
0350 struct fc_seq *recov_seq;
0351 struct completion tm_done;
0352 } ____cacheline_aligned_in_smp;
0353
0354
0355
0356
0357 struct libfc_cmd_priv {
0358 struct fc_fcp_pkt *fsp;
0359 u32 resid_len;
0360 u8 status;
0361 };
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372 struct fc_exch_mgr;
0373 struct fc_exch_mgr_anchor;
0374 extern u16 fc_cpu_mask;
0375
0376
0377
0378
0379
0380
0381
0382
0383 struct fc_seq {
0384 u8 id;
0385 u16 ssb_stat;
0386 u16 cnt;
0387 u32 rec_data;
0388 };
0389
0390 #define FC_EX_DONE (1 << 0)
0391 #define FC_EX_RST_CLEANUP (1 << 1)
0392 #define FC_EX_QUARANTINE (1 << 2)
0393
0394
0395
0396
0397
0398
0399
0400
0401
0402
0403
0404
0405
0406
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433 struct fc_exch {
0434 spinlock_t ex_lock;
0435 atomic_t ex_refcnt;
0436 enum fc_class class;
0437 struct fc_exch_mgr *em;
0438 struct fc_exch_pool *pool;
0439 struct list_head ex_list;
0440 struct fc_lport *lp;
0441 u32 esb_stat;
0442 u8 state;
0443 u8 fh_type;
0444 u8 seq_id;
0445 u8 encaps;
0446 u16 xid;
0447 u16 oxid;
0448 u16 rxid;
0449 u32 oid;
0450 u32 sid;
0451 u32 did;
0452 u32 r_a_tov;
0453 u32 f_ctl;
0454 struct fc_seq seq;
0455 int resp_active;
0456 struct task_struct *resp_task;
0457 wait_queue_head_t resp_wq;
0458 void (*resp)(struct fc_seq *, struct fc_frame *, void *);
0459 void *arg;
0460 void (*destructor)(struct fc_seq *, void *);
0461 struct delayed_work timeout_work;
0462 } ____cacheline_aligned_in_smp;
0463 #define fc_seq_exch(sp) container_of(sp, struct fc_exch, seq)
0464
0465
0466 struct libfc_function_template {
0467
0468
0469
0470
0471
0472 int (*frame_send)(struct fc_lport *, struct fc_frame *);
0473
0474
0475
0476
0477
0478
0479 struct fc_seq *(*elsct_send)(struct fc_lport *, u32 did,
0480 struct fc_frame *, unsigned int op,
0481 void (*resp)(struct fc_seq *,
0482 struct fc_frame *, void *arg),
0483 void *arg, u32 timer_msec);
0484
0485
0486
0487
0488
0489
0490
0491 int (*ddp_setup)(struct fc_lport *, u16, struct scatterlist *,
0492 unsigned int);
0493
0494
0495
0496
0497
0498
0499 int (*ddp_done)(struct fc_lport *, u16);
0500
0501
0502
0503
0504
0505
0506 int (*ddp_target)(struct fc_lport *, u16, struct scatterlist *,
0507 unsigned int);
0508
0509
0510
0511
0512
0513 void (*get_lesb)(struct fc_lport *, struct fc_els_lesb *lesb);
0514
0515
0516
0517
0518
0519
0520
0521
0522 void (*exch_mgr_reset)(struct fc_lport *, u32 s_id, u32 d_id);
0523
0524
0525
0526
0527
0528
0529
0530
0531
0532
0533
0534
0535
0536
0537
0538
0539
0540
0541 void (*lport_set_port_id)(struct fc_lport *, u32 port_id,
0542 struct fc_frame *);
0543
0544
0545
0546
0547
0548
0549 void (*rport_event_callback)(struct fc_lport *,
0550 struct fc_rport_priv *,
0551 enum fc_rport_event);
0552
0553
0554
0555
0556
0557
0558
0559
0560
0561 int (*fcp_cmd_send)(struct fc_lport *, struct fc_fcp_pkt *,
0562 void (*resp)(struct fc_seq *, struct fc_frame *,
0563 void *));
0564
0565
0566
0567
0568
0569
0570 void (*fcp_cleanup)(struct fc_lport *);
0571
0572
0573
0574
0575
0576
0577 void (*fcp_abort_io)(struct fc_lport *);
0578
0579
0580
0581
0582
0583
0584 void (*disc_recv_req)(struct fc_lport *, struct fc_frame *);
0585
0586
0587
0588
0589
0590
0591 void (*disc_start)(void (*disc_callback)(struct fc_lport *,
0592 enum fc_disc_event),
0593 struct fc_lport *);
0594
0595
0596
0597
0598
0599
0600
0601 void (*disc_stop) (struct fc_lport *);
0602
0603
0604
0605
0606
0607
0608
0609
0610 void (*disc_stop_final) (struct fc_lport *);
0611 };
0612
0613
0614
0615
0616
0617
0618
0619
0620
0621
0622
0623
0624
0625
0626
0627
0628
0629 struct fc_disc {
0630 unsigned char retry_count;
0631 unsigned char pending;
0632 unsigned char requested;
0633 unsigned short seq_count;
0634 unsigned char buf_len;
0635 u16 disc_id;
0636
0637 struct list_head rports;
0638 void *priv;
0639 struct mutex disc_mutex;
0640 struct fc_gpn_ft_resp partial_buf;
0641 struct delayed_work disc_work;
0642
0643 void (*disc_callback)(struct fc_lport *,
0644 enum fc_disc_event);
0645 };
0646
0647
0648
0649
0650 extern struct blocking_notifier_head fc_lport_notifier_head;
0651 enum fc_lport_event {
0652 FC_LPORT_EV_ADD,
0653 FC_LPORT_EV_DEL,
0654 };
0655
0656
0657
0658
0659
0660
0661
0662
0663
0664
0665
0666
0667
0668
0669
0670
0671
0672
0673
0674
0675
0676
0677
0678
0679
0680
0681
0682
0683
0684
0685
0686
0687
0688
0689
0690
0691
0692
0693
0694
0695
0696
0697
0698
0699
0700
0701 struct fc_lport {
0702
0703 struct Scsi_Host *host;
0704 struct list_head ema_list;
0705 struct fc_rport_priv *dns_rdata;
0706 struct fc_rport_priv *ms_rdata;
0707 struct fc_rport_priv *ptp_rdata;
0708 void *scsi_priv;
0709 struct fc_disc disc;
0710
0711
0712 struct list_head vports;
0713 struct fc_vport *vport;
0714
0715
0716 struct libfc_function_template tt;
0717 u8 link_up;
0718 u8 qfull;
0719 u16 vlan;
0720 enum fc_lport_state state;
0721 unsigned long boot_time;
0722 struct fc_host_statistics host_stats;
0723 struct fc_stats __percpu *stats;
0724 u8 retry_count;
0725
0726
0727 u32 port_id;
0728 u64 wwpn;
0729 u64 wwnn;
0730 unsigned int service_params;
0731 unsigned int e_d_tov;
0732 unsigned int r_a_tov;
0733 struct fc_els_rnid_gen rnid_gen;
0734
0735
0736 u32 sg_supp:1;
0737 u32 seq_offload:1;
0738 u32 crc_offload:1;
0739 u32 lro_enabled:1;
0740 u32 does_npiv:1;
0741 u32 npiv_enabled:1;
0742 u32 point_to_multipoint:1;
0743 u32 fdmi_enabled:1;
0744 u32 mfs;
0745 u8 max_retry_count;
0746 u8 max_rport_retry_count;
0747 u16 rport_priv_size;
0748 u16 link_speed;
0749 u16 link_supported_speeds;
0750 u16 lro_xid;
0751 unsigned int lso_max;
0752 struct fc_ns_fts fcts;
0753
0754
0755 struct mutex lp_mutex;
0756 struct list_head list;
0757 struct delayed_work retry_work;
0758 void *prov[FC_FC4_PROV_SIZE];
0759 struct list_head lport_list;
0760 };
0761
0762
0763
0764
0765
0766
0767
0768
0769 struct fc4_prov {
0770 int (*prli)(struct fc_rport_priv *, u32 spp_len,
0771 const struct fc_els_spp *spp_in,
0772 struct fc_els_spp *spp_out);
0773 void (*prlo)(struct fc_rport_priv *);
0774 void (*recv)(struct fc_lport *, struct fc_frame *);
0775 struct module *module;
0776 };
0777
0778
0779
0780
0781 int fc_fc4_register_provider(enum fc_fh_type type, struct fc4_prov *);
0782 void fc_fc4_deregister_provider(enum fc_fh_type type, struct fc4_prov *);
0783
0784
0785
0786
0787
0788
0789
0790
0791
0792 static inline int fc_lport_test_ready(struct fc_lport *lport)
0793 {
0794 return lport->state == LPORT_ST_READY;
0795 }
0796
0797
0798
0799
0800
0801
0802 static inline void fc_set_wwnn(struct fc_lport *lport, u64 wwnn)
0803 {
0804 lport->wwnn = wwnn;
0805 }
0806
0807
0808
0809
0810
0811
0812 static inline void fc_set_wwpn(struct fc_lport *lport, u64 wwpn)
0813 {
0814 lport->wwpn = wwpn;
0815 }
0816
0817
0818
0819
0820
0821
0822 static inline void fc_lport_state_enter(struct fc_lport *lport,
0823 enum fc_lport_state state)
0824 {
0825 if (state != lport->state)
0826 lport->retry_count = 0;
0827 lport->state = state;
0828 }
0829
0830
0831
0832
0833
0834 static inline int fc_lport_init_stats(struct fc_lport *lport)
0835 {
0836 lport->stats = alloc_percpu(struct fc_stats);
0837 if (!lport->stats)
0838 return -ENOMEM;
0839 return 0;
0840 }
0841
0842
0843
0844
0845
0846 static inline void fc_lport_free_stats(struct fc_lport *lport)
0847 {
0848 free_percpu(lport->stats);
0849 }
0850
0851
0852
0853
0854
0855 static inline void *lport_priv(const struct fc_lport *lport)
0856 {
0857 return (void *)(lport + 1);
0858 }
0859
0860
0861
0862
0863
0864
0865
0866
0867
0868 static inline struct fc_lport *
0869 libfc_host_alloc(struct scsi_host_template *sht, int priv_size)
0870 {
0871 struct fc_lport *lport;
0872 struct Scsi_Host *shost;
0873
0874 shost = scsi_host_alloc(sht, sizeof(*lport) + priv_size);
0875 if (!shost)
0876 return NULL;
0877 lport = shost_priv(shost);
0878 lport->host = shost;
0879 INIT_LIST_HEAD(&lport->ema_list);
0880 INIT_LIST_HEAD(&lport->vports);
0881 return lport;
0882 }
0883
0884
0885
0886
0887 static inline bool fc_fcp_is_read(const struct fc_fcp_pkt *fsp)
0888 {
0889 if (fsp && fsp->cmd)
0890 return fsp->cmd->sc_data_direction == DMA_FROM_DEVICE;
0891 return false;
0892 }
0893
0894
0895
0896
0897 int fc_lport_init(struct fc_lport *);
0898 int fc_lport_destroy(struct fc_lport *);
0899 int fc_fabric_logoff(struct fc_lport *);
0900 int fc_fabric_login(struct fc_lport *);
0901 void __fc_linkup(struct fc_lport *);
0902 void fc_linkup(struct fc_lport *);
0903 void __fc_linkdown(struct fc_lport *);
0904 void fc_linkdown(struct fc_lport *);
0905 void fc_vport_setlink(struct fc_lport *);
0906 void fc_vports_linkchange(struct fc_lport *);
0907 int fc_lport_config(struct fc_lport *);
0908 int fc_lport_reset(struct fc_lport *);
0909 void fc_lport_recv(struct fc_lport *lport, struct fc_frame *fp);
0910 int fc_set_mfs(struct fc_lport *, u32 mfs);
0911 struct fc_lport *libfc_vport_create(struct fc_vport *, int privsize);
0912 struct fc_lport *fc_vport_id_lookup(struct fc_lport *, u32 port_id);
0913 int fc_lport_bsg_request(struct bsg_job *);
0914 void fc_lport_set_local_id(struct fc_lport *, u32 port_id);
0915 void fc_lport_iterate(void (*func)(struct fc_lport *, void *), void *);
0916
0917
0918
0919
0920 void fc_rport_terminate_io(struct fc_rport *);
0921 struct fc_rport_priv *fc_rport_lookup(const struct fc_lport *lport,
0922 u32 port_id);
0923 struct fc_rport_priv *fc_rport_create(struct fc_lport *, u32);
0924 void fc_rport_destroy(struct kref *kref);
0925 int fc_rport_login(struct fc_rport_priv *rdata);
0926 int fc_rport_logoff(struct fc_rport_priv *rdata);
0927 void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp);
0928 void fc_rport_flush_queue(void);
0929
0930
0931
0932
0933 void fc_disc_init(struct fc_lport *);
0934 void fc_disc_config(struct fc_lport *, void *);
0935
0936 static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc)
0937 {
0938 return container_of(disc, struct fc_lport, disc);
0939 }
0940
0941
0942
0943
0944 int fc_fcp_init(struct fc_lport *);
0945 void fc_fcp_destroy(struct fc_lport *);
0946
0947
0948
0949
0950 int fc_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
0951 int fc_eh_abort(struct scsi_cmnd *);
0952 int fc_eh_device_reset(struct scsi_cmnd *);
0953 int fc_eh_host_reset(struct scsi_cmnd *);
0954 int fc_slave_alloc(struct scsi_device *);
0955
0956
0957
0958
0959 int fc_elsct_init(struct fc_lport *);
0960 struct fc_seq *fc_elsct_send(struct fc_lport *, u32 did,
0961 struct fc_frame *,
0962 unsigned int op,
0963 void (*resp)(struct fc_seq *,
0964 struct fc_frame *,
0965 void *arg),
0966 void *arg, u32 timer_msec);
0967 void fc_lport_flogi_resp(struct fc_seq *, struct fc_frame *, void *);
0968 void fc_lport_logo_resp(struct fc_seq *, struct fc_frame *, void *);
0969 void fc_fill_reply_hdr(struct fc_frame *, const struct fc_frame *,
0970 enum fc_rctl, u32 parm_offset);
0971 void fc_fill_hdr(struct fc_frame *, const struct fc_frame *,
0972 enum fc_rctl, u32 f_ctl, u16 seq_cnt, u32 parm_offset);
0973
0974
0975
0976
0977
0978 int fc_exch_init(struct fc_lport *);
0979 void fc_exch_update_stats(struct fc_lport *lport);
0980 struct fc_seq *fc_exch_seq_send(struct fc_lport *lport,
0981 struct fc_frame *fp,
0982 void (*resp)(struct fc_seq *,
0983 struct fc_frame *fp,
0984 void *arg),
0985 void (*destructor)(struct fc_seq *, void *),
0986 void *arg, u32 timer_msec);
0987 void fc_seq_els_rsp_send(struct fc_frame *, enum fc_els_cmd,
0988 struct fc_seq_els_data *);
0989 struct fc_seq *fc_seq_start_next(struct fc_seq *sp);
0990 void fc_seq_set_resp(struct fc_seq *sp,
0991 void (*resp)(struct fc_seq *, struct fc_frame *, void *),
0992 void *arg);
0993 struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp);
0994 void fc_seq_release(struct fc_seq *sp);
0995 struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *,
0996 struct fc_exch_mgr *,
0997 bool (*match)(struct fc_frame *));
0998 void fc_exch_mgr_del(struct fc_exch_mgr_anchor *);
0999 int fc_exch_mgr_list_clone(struct fc_lport *src, struct fc_lport *dst);
1000 struct fc_exch_mgr *fc_exch_mgr_alloc(struct fc_lport *, enum fc_class class,
1001 u16 min_xid, u16 max_xid,
1002 bool (*match)(struct fc_frame *));
1003 void fc_exch_mgr_free(struct fc_lport *);
1004 void fc_exch_recv(struct fc_lport *, struct fc_frame *);
1005 void fc_exch_mgr_reset(struct fc_lport *, u32 s_id, u32 d_id);
1006 int fc_seq_send(struct fc_lport *lport, struct fc_seq *sp, struct fc_frame *fp);
1007 int fc_seq_exch_abort(const struct fc_seq *, unsigned int timer_msec);
1008 void fc_exch_done(struct fc_seq *sp);
1009
1010
1011
1012
1013 void fc_get_host_speed(struct Scsi_Host *);
1014 void fc_get_host_port_state(struct Scsi_Host *);
1015 void fc_set_rport_loss_tmo(struct fc_rport *, u32 timeout);
1016 struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *);
1017
1018 #endif