aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/include
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-07-08 22:57:33 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:04:17 -0400
commit36d345a703b7b3f80a56ee37abb7908c52d1cd67 (patch)
treefe038e44b6c274a55814d1bae84f0cc21ad4b15a /drivers/scsi/bfa/include
parent4b5e759dca9fb26d921c1267283350004dbf197b (diff)
[SCSI] bfa: add dynamic queue selection
Add new bfa functionality to support dynamic queue selection (IO redirection). IO redirection can only be enabled when QoS is disabled. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/include')
-rw-r--r--drivers/scsi/bfa/include/bfa_fcpim.h20
-rw-r--r--drivers/scsi/bfa/include/bfa_svc.h1
-rw-r--r--drivers/scsi/bfa/include/defs/bfa_defs_driver.h2
3 files changed, 21 insertions, 2 deletions
diff --git a/drivers/scsi/bfa/include/bfa_fcpim.h b/drivers/scsi/bfa/include/bfa_fcpim.h
index 04789795fa53..4bc9453081df 100644
--- a/drivers/scsi/bfa/include/bfa_fcpim.h
+++ b/drivers/scsi/bfa/include/bfa_fcpim.h
@@ -42,6 +42,24 @@ u16 bfa_fcpim_qdepth_get(struct bfa_s *bfa);
42bfa_status_t bfa_fcpim_get_modstats(struct bfa_s *bfa, 42bfa_status_t bfa_fcpim_get_modstats(struct bfa_s *bfa,
43 struct bfa_fcpim_stats_s *modstats); 43 struct bfa_fcpim_stats_s *modstats);
44bfa_status_t bfa_fcpim_clr_modstats(struct bfa_s *bfa); 44bfa_status_t bfa_fcpim_clr_modstats(struct bfa_s *bfa);
45void bfa_fcpim_set_ioredirect(struct bfa_s *bfa, bfa_boolean_t state);
46void bfa_fcpim_update_ioredirect(struct bfa_s *bfa);
47void bfa_cb_ioredirect_state_change(void *hcb_bfad, bfa_boolean_t ioredirect);
48
49#define bfa_fcpim_ioredirect_enabled(__bfa) \
50 (((struct bfa_fcpim_mod_s *)(BFA_FCPIM_MOD(__bfa)))->ioredirect)
51
52#define bfa_fcpim_get_next_reqq(__bfa, __qid) \
53{ \
54 struct bfa_fcpim_mod_s *__fcpim = BFA_FCPIM_MOD(__bfa); \
55 __fcpim->reqq++; \
56 __fcpim->reqq &= (BFI_IOC_MAX_CQS - 1); \
57 *(__qid) = __fcpim->reqq; \
58}
59
60#define bfa_iocfc_map_msg_to_qid(__msg, __qid) \
61 *(__qid) = (u8)((__msg) & (BFI_IOC_MAX_CQS - 1));
62
45 63
46/* 64/*
47 * bfa itnim API functions 65 * bfa itnim API functions
@@ -56,6 +74,7 @@ void bfa_itnim_get_stats(struct bfa_itnim_s *itnim,
56 struct bfa_itnim_hal_stats_s *stats); 74 struct bfa_itnim_hal_stats_s *stats);
57void bfa_itnim_clear_stats(struct bfa_itnim_s *itnim); 75void bfa_itnim_clear_stats(struct bfa_itnim_s *itnim);
58 76
77#define bfa_itnim_get_reqq(__ioim) (((struct bfa_ioim_s *)__ioim)->itnim->reqq)
59 78
60/** 79/**
61 * BFA completion callback for bfa_itnim_online(). 80 * BFA completion callback for bfa_itnim_online().
@@ -156,4 +175,3 @@ void bfa_cb_tskim_done(void *bfad, struct bfad_tskim_s *dtsk,
156 enum bfi_tskim_status tsk_status); 175 enum bfi_tskim_status tsk_status);
157 176
158#endif /* __BFA_FCPIM_H__ */ 177#endif /* __BFA_FCPIM_H__ */
159
diff --git a/drivers/scsi/bfa/include/bfa_svc.h b/drivers/scsi/bfa/include/bfa_svc.h
index 1349b99a3c6d..7840943d73b0 100644
--- a/drivers/scsi/bfa/include/bfa_svc.h
+++ b/drivers/scsi/bfa/include/bfa_svc.h
@@ -215,6 +215,7 @@ bfa_status_t bfa_fcport_get_stats(struct bfa_s *bfa,
215 bfa_cb_pport_t cbfn, void *cbarg); 215 bfa_cb_pport_t cbfn, void *cbarg);
216bfa_status_t bfa_fcport_clear_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, 216bfa_status_t bfa_fcport_clear_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn,
217 void *cbarg); 217 void *cbarg);
218bfa_boolean_t bfa_fcport_is_qos_enabled(struct bfa_s *bfa);
218 219
219/* 220/*
220 * bfa rport API functions 221 * bfa rport API functions
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_driver.h b/drivers/scsi/bfa/include/defs/bfa_defs_driver.h
index 50382dd2ab41..7d00d00d3969 100644
--- a/drivers/scsi/bfa/include/defs/bfa_defs_driver.h
+++ b/drivers/scsi/bfa/include/defs/bfa_defs_driver.h
@@ -29,7 +29,7 @@ struct bfa_driver_stats_s {
29 u16 tm_target_reset; 29 u16 tm_target_reset;
30 u16 tm_bus_reset; 30 u16 tm_bus_reset;
31 u16 ioc_restart; /* IOC restart count */ 31 u16 ioc_restart; /* IOC restart count */
32 u16 io_pending; /* outstanding io count per-IOC */ 32 u16 rsvd;
33 u64 control_req; 33 u64 control_req;
34 u64 input_req; 34 u64 input_req;
35 u64 output_req; 35 u64 output_req;