aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_fcpim.h
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2011-07-20 20:04:03 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-07-27 06:55:03 -0400
commit83763d591b343b07331cebe86715205230c568b1 (patch)
tree3d81bae3ca6ddcee24415001b1dd8ed2d27e3599 /drivers/scsi/bfa/bfa_fcpim.h
parent45c5dc1d3f42d4f54a5ab5f45ee55f0ffe1099f1 (diff)
[SCSI] bfa: Introduced initiator based lun masking feature.
- Added support to enable initiator based lun masking. - Initiator based Lun masking works similar to zoning where initiator port is allowed to see only those LUNs which are configured to be seen. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcpim.h')
-rw-r--r--drivers/scsi/bfa/bfa_fcpim.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/bfa/bfa_fcpim.h b/drivers/scsi/bfa/bfa_fcpim.h
index c224987b9c30..99fc913929b6 100644
--- a/drivers/scsi/bfa/bfa_fcpim.h
+++ b/drivers/scsi/bfa/bfa_fcpim.h
@@ -110,6 +110,7 @@ struct bfad_ioim_s;
110struct bfad_tskim_s; 110struct bfad_tskim_s;
111 111
112typedef void (*bfa_fcpim_profile_t) (struct bfa_ioim_s *ioim); 112typedef void (*bfa_fcpim_profile_t) (struct bfa_ioim_s *ioim);
113typedef bfa_boolean_t (*bfa_ioim_lm_proc_rsp_data_t) (struct bfa_ioim_s *ioim);
113 114
114struct bfa_fcpim_s { 115struct bfa_fcpim_s {
115 struct bfa_s *bfa; 116 struct bfa_s *bfa;
@@ -123,7 +124,7 @@ struct bfa_fcpim_s {
123 u32 path_tov; 124 u32 path_tov;
124 u16 q_depth; 125 u16 q_depth;
125 u8 reqq; /* Request queue to be used */ 126 u8 reqq; /* Request queue to be used */
126 u8 rsvd; 127 u8 lun_masking_pending;
127 struct list_head itnim_q; /* queue of active itnim */ 128 struct list_head itnim_q; /* queue of active itnim */
128 struct list_head ioim_resfree_q; /* IOs waiting for f/w */ 129 struct list_head ioim_resfree_q; /* IOs waiting for f/w */
129 struct list_head ioim_comp_q; /* IO global comp Q */ 130 struct list_head ioim_comp_q; /* IO global comp Q */
@@ -178,7 +179,9 @@ struct bfa_ioim_s {
178 bfa_cb_cbfn_t io_cbfn; /* IO completion handler */ 179 bfa_cb_cbfn_t io_cbfn; /* IO completion handler */
179 struct bfa_ioim_sp_s *iosp; /* slow-path IO handling */ 180 struct bfa_ioim_sp_s *iosp; /* slow-path IO handling */
180 u8 reqq; /* Request queue for I/O */ 181 u8 reqq; /* Request queue for I/O */
182 u8 mode; /* IO is passthrough or not */
181 u64 start_time; /* IO's Profile start val */ 183 u64 start_time; /* IO's Profile start val */
184 bfa_ioim_lm_proc_rsp_data_t proc_rsp_data; /* RSP data adjust */
182}; 185};
183 186
184struct bfa_ioim_sp_s { 187struct bfa_ioim_sp_s {
@@ -258,6 +261,10 @@ struct bfa_itnim_s {
258 (__ioim)->iotag |= k << BFA_IOIM_RETRY_TAG_OFFSET; \ 261 (__ioim)->iotag |= k << BFA_IOIM_RETRY_TAG_OFFSET; \
259} while (0) 262} while (0)
260 263
264#define BFA_IOIM_TO_LPS(__ioim) \
265 BFA_LPS_FROM_TAG(BFA_LPS_MOD(__ioim->bfa), \
266 __ioim->itnim->rport->rport_info.lp_tag)
267
261static inline bfa_boolean_t 268static inline bfa_boolean_t
262bfa_ioim_maxretry_reached(struct bfa_ioim_s *ioim) 269bfa_ioim_maxretry_reached(struct bfa_ioim_s *ioim)
263{ 270{
@@ -407,4 +414,7 @@ void bfa_tskim_start(struct bfa_tskim_s *tskim,
407void bfa_cb_tskim_done(void *bfad, struct bfad_tskim_s *dtsk, 414void bfa_cb_tskim_done(void *bfad, struct bfad_tskim_s *dtsk,
408 enum bfi_tskim_status tsk_status); 415 enum bfi_tskim_status tsk_status);
409 416
417void bfa_fcpim_lunmask_rp_update(struct bfa_s *bfa, wwn_t lp_wwn,
418 wwn_t rp_wwn, u16 rp_tag, u8 lp_tag);
419
410#endif /* __BFA_FCPIM_H__ */ 420#endif /* __BFA_FCPIM_H__ */