ath9k: remove unneeded calculation of minimal calibration power
[linux-2.6/next.git] / drivers / scsi / bfa / include / fcs / bfa_fcs_fcpim.h
blobe719f2c3eb35eee07c9469dc932503e477165942
1 /*
2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
3 * All rights reserved
4 * www.brocade.com
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License (GPL) Version 2 as
10 * published by the Free Software Foundation
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
18 /**
19 * bfa_fcs_fcpim.h BFA FCS FCP Initiator Mode interfaces/defines.
22 #ifndef __BFA_FCS_FCPIM_H__
23 #define __BFA_FCS_FCPIM_H__
25 #include <defs/bfa_defs_status.h>
26 #include <defs/bfa_defs_itnim.h>
27 #include <fcs/bfa_fcs.h>
28 #include <fcs/bfa_fcs_rport.h>
29 #include <fcs/bfa_fcs_lport.h>
30 #include <bfa_fcpim.h>
33 * forward declarations
35 struct bfad_itnim_s;
37 struct bfa_fcs_itnim_s {
38 bfa_sm_t sm; /* state machine */
39 struct bfa_fcs_rport_s *rport; /* parent remote rport */
40 struct bfad_itnim_s *itnim_drv; /* driver peer instance */
41 struct bfa_fcs_s *fcs; /* fcs instance */
42 struct bfa_timer_s timer; /* timer functions */
43 struct bfa_itnim_s *bfa_itnim; /* BFA itnim struct */
44 bfa_boolean_t seq_rec; /* seq recovery support */
45 bfa_boolean_t rec_support; /* REC supported */
46 bfa_boolean_t conf_comp; /* FCP_CONF support */
47 bfa_boolean_t task_retry_id; /* task retry id supp */
48 struct bfa_fcxp_wqe_s fcxp_wqe; /* wait qelem for fcxp */
49 struct bfa_fcxp_s *fcxp; /* FCXP in use */
50 struct bfa_itnim_stats_s stats; /* itn statistics */
54 static inline struct bfad_port_s *
55 bfa_fcs_itnim_get_drvport(struct bfa_fcs_itnim_s *itnim)
57 return itnim->rport->port->bfad_port;
61 static inline struct bfa_fcs_port_s *
62 bfa_fcs_itnim_get_port(struct bfa_fcs_itnim_s *itnim)
64 return itnim->rport->port;
68 static inline wwn_t
69 bfa_fcs_itnim_get_nwwn(struct bfa_fcs_itnim_s *itnim)
71 return itnim->rport->nwwn;
75 static inline wwn_t
76 bfa_fcs_itnim_get_pwwn(struct bfa_fcs_itnim_s *itnim)
78 return itnim->rport->pwwn;
82 static inline u32
83 bfa_fcs_itnim_get_fcid(struct bfa_fcs_itnim_s *itnim)
85 return itnim->rport->pid;
89 static inline u32
90 bfa_fcs_itnim_get_maxfrsize(struct bfa_fcs_itnim_s *itnim)
92 return itnim->rport->maxfrsize;
96 static inline enum fc_cos
97 bfa_fcs_itnim_get_cos(struct bfa_fcs_itnim_s *itnim)
99 return itnim->rport->fc_cos;
103 static inline struct bfad_itnim_s *
104 bfa_fcs_itnim_get_drvitn(struct bfa_fcs_itnim_s *itnim)
106 return itnim->itnim_drv;
110 static inline struct bfa_itnim_s *
111 bfa_fcs_itnim_get_halitn(struct bfa_fcs_itnim_s *itnim)
113 return itnim->bfa_itnim;
117 * bfa fcs FCP Initiator mode API functions
119 void bfa_fcs_itnim_get_attr(struct bfa_fcs_itnim_s *itnim,
120 struct bfa_itnim_attr_s *attr);
121 void bfa_fcs_itnim_get_stats(struct bfa_fcs_itnim_s *itnim,
122 struct bfa_itnim_stats_s *stats);
123 struct bfa_fcs_itnim_s *bfa_fcs_itnim_lookup(struct bfa_fcs_port_s *port,
124 wwn_t rpwwn);
125 bfa_status_t bfa_fcs_itnim_attr_get(struct bfa_fcs_port_s *port, wwn_t rpwwn,
126 struct bfa_itnim_attr_s *attr);
127 bfa_status_t bfa_fcs_itnim_stats_get(struct bfa_fcs_port_s *port, wwn_t rpwwn,
128 struct bfa_itnim_stats_s *stats);
129 bfa_status_t bfa_fcs_itnim_stats_clear(struct bfa_fcs_port_s *port,
130 wwn_t rpwwn);
131 #endif /* __BFA_FCS_FCPIM_H__ */