diff options
author | Jing Huang <huangj@brocade.com> | 2010-07-08 22:57:33 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:04:17 -0400 |
commit | 36d345a703b7b3f80a56ee37abb7908c52d1cd67 (patch) | |
tree | fe038e44b6c274a55814d1bae84f0cc21ad4b15a /drivers/scsi | |
parent | 4b5e759dca9fb26d921c1267283350004dbf197b (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')
-rw-r--r-- | drivers/scsi/bfa/bfa_cb_ioim_macros.h | 7 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcpim.c | 24 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcpim_priv.h | 5 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcport.c | 13 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_hw_cb.c | 7 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_hw_ct.c | 7 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_intr.c | 1 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_iocfc.c | 2 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_iocfc.h | 9 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_ioim.c | 29 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfad_im.c | 9 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/bfa_fcpim.h | 20 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/bfa_svc.h | 1 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/defs/bfa_defs_driver.h | 2 |
14 files changed, 117 insertions, 19 deletions
diff --git a/drivers/scsi/bfa/bfa_cb_ioim_macros.h b/drivers/scsi/bfa/bfa_cb_ioim_macros.h index 53a616f5f50d..3906ed926966 100644 --- a/drivers/scsi/bfa/bfa_cb_ioim_macros.h +++ b/drivers/scsi/bfa/bfa_cb_ioim_macros.h | |||
@@ -171,6 +171,11 @@ bfa_cb_ioim_get_cdblen(struct bfad_ioim_s *dio) | |||
171 | return cmnd->cmd_len; | 171 | return cmnd->cmd_len; |
172 | } | 172 | } |
173 | 173 | ||
174 | 174 | /** | |
175 | * Assign queue to be used for the I/O request. This value depends on whether | ||
176 | * the driver wants to use the queues via any specific algorithm. Currently, | ||
177 | * this is not supported. | ||
178 | */ | ||
179 | #define bfa_cb_ioim_get_reqq(__dio) BFA_FALSE | ||
175 | 180 | ||
176 | #endif /* __BFA_HCB_IOIM_MACROS_H__ */ | 181 | #endif /* __BFA_HCB_IOIM_MACROS_H__ */ |
diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c index 12849e9071cd..8c703d8dc94b 100644 --- a/drivers/scsi/bfa/bfa_fcpim.c +++ b/drivers/scsi/bfa/bfa_fcpim.c | |||
@@ -167,4 +167,28 @@ bfa_fcpim_qdepth_get(struct bfa_s *bfa) | |||
167 | return fcpim->q_depth; | 167 | return fcpim->q_depth; |
168 | } | 168 | } |
169 | 169 | ||
170 | void | ||
171 | bfa_fcpim_update_ioredirect(struct bfa_s *bfa) | ||
172 | { | ||
173 | bfa_boolean_t ioredirect; | ||
174 | |||
175 | /* | ||
176 | * IO redirection is turned off when QoS is enabled and vice versa | ||
177 | */ | ||
178 | ioredirect = bfa_fcport_is_qos_enabled(bfa) ? BFA_FALSE : BFA_TRUE; | ||
170 | 179 | ||
180 | /* | ||
181 | * Notify the bfad module of a possible state change in | ||
182 | * IO redirection capability, due to a QoS state change. bfad will | ||
183 | * check on the support for io redirection and update the | ||
184 | * fcpim's ioredirect state accordingly. | ||
185 | */ | ||
186 | bfa_cb_ioredirect_state_change((void *)(bfa->bfad), ioredirect); | ||
187 | } | ||
188 | |||
189 | void | ||
190 | bfa_fcpim_set_ioredirect(struct bfa_s *bfa, bfa_boolean_t state) | ||
191 | { | ||
192 | struct bfa_fcpim_mod_s *fcpim = BFA_FCPIM_MOD(bfa); | ||
193 | fcpim->ioredirect = state; | ||
194 | } | ||
diff --git a/drivers/scsi/bfa/bfa_fcpim_priv.h b/drivers/scsi/bfa/bfa_fcpim_priv.h index 3db39da72427..762516cb5cb2 100644 --- a/drivers/scsi/bfa/bfa_fcpim_priv.h +++ b/drivers/scsi/bfa/bfa_fcpim_priv.h | |||
@@ -49,7 +49,8 @@ struct bfa_fcpim_mod_s { | |||
49 | int num_tskim_reqs; | 49 | int num_tskim_reqs; |
50 | u32 path_tov; | 50 | u32 path_tov; |
51 | u16 q_depth; | 51 | u16 q_depth; |
52 | u16 rsvd; | 52 | u8 reqq; /* Request queue to be used */ |
53 | u8 rsvd; | ||
53 | struct list_head itnim_q; /* queue of active itnim */ | 54 | struct list_head itnim_q; /* queue of active itnim */ |
54 | struct list_head ioim_free_q; /* free IO resources */ | 55 | struct list_head ioim_free_q; /* free IO resources */ |
55 | struct list_head ioim_resfree_q; /* IOs waiting for f/w */ | 56 | struct list_head ioim_resfree_q; /* IOs waiting for f/w */ |
@@ -58,6 +59,7 @@ struct bfa_fcpim_mod_s { | |||
58 | u32 ios_active; /* current active IOs */ | 59 | u32 ios_active; /* current active IOs */ |
59 | u32 delay_comp; | 60 | u32 delay_comp; |
60 | struct bfa_fcpim_stats_s stats; | 61 | struct bfa_fcpim_stats_s stats; |
62 | bfa_boolean_t ioredirect; | ||
61 | }; | 63 | }; |
62 | 64 | ||
63 | struct bfa_ioim_s; | 65 | struct bfa_ioim_s; |
@@ -82,6 +84,7 @@ struct bfa_ioim_s { | |||
82 | struct bfa_cb_qe_s hcb_qe; /* bfa callback qelem */ | 84 | struct bfa_cb_qe_s hcb_qe; /* bfa callback qelem */ |
83 | bfa_cb_cbfn_t io_cbfn; /* IO completion handler */ | 85 | bfa_cb_cbfn_t io_cbfn; /* IO completion handler */ |
84 | struct bfa_ioim_sp_s *iosp; /* slow-path IO handling */ | 86 | struct bfa_ioim_sp_s *iosp; /* slow-path IO handling */ |
87 | u8 reqq; /* Request queue for I/O */ | ||
85 | }; | 88 | }; |
86 | 89 | ||
87 | struct bfa_ioim_sp_s { | 90 | struct bfa_ioim_sp_s { |
diff --git a/drivers/scsi/bfa/bfa_fcport.c b/drivers/scsi/bfa/bfa_fcport.c index d3b5efba8af0..e0e7a0dda545 100644 --- a/drivers/scsi/bfa/bfa_fcport.c +++ b/drivers/scsi/bfa/bfa_fcport.c | |||
@@ -1857,8 +1857,13 @@ bfa_fcport_cfg_qos(struct bfa_s *bfa, bfa_boolean_t on_off) | |||
1857 | 1857 | ||
1858 | bfa_trc(bfa, ioc_type); | 1858 | bfa_trc(bfa, ioc_type); |
1859 | 1859 | ||
1860 | if (ioc_type == BFA_IOC_TYPE_FC) | 1860 | if (ioc_type == BFA_IOC_TYPE_FC) { |
1861 | fcport->cfg.qos_enabled = on_off; | 1861 | fcport->cfg.qos_enabled = on_off; |
1862 | /** | ||
1863 | * Notify fcpim of the change in QoS state | ||
1864 | */ | ||
1865 | bfa_fcpim_update_ioredirect(bfa); | ||
1866 | } | ||
1862 | } | 1867 | } |
1863 | 1868 | ||
1864 | void | 1869 | void |
@@ -1942,4 +1947,10 @@ bfa_fcport_is_linkup(struct bfa_s *bfa) | |||
1942 | return bfa_sm_cmp_state(BFA_FCPORT_MOD(bfa), bfa_fcport_sm_linkup); | 1947 | return bfa_sm_cmp_state(BFA_FCPORT_MOD(bfa), bfa_fcport_sm_linkup); |
1943 | } | 1948 | } |
1944 | 1949 | ||
1950 | bfa_boolean_t | ||
1951 | bfa_fcport_is_qos_enabled(struct bfa_s *bfa) | ||
1952 | { | ||
1953 | struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); | ||
1945 | 1954 | ||
1955 | return fcport->cfg.qos_enabled; | ||
1956 | } | ||
diff --git a/drivers/scsi/bfa/bfa_hw_cb.c b/drivers/scsi/bfa/bfa_hw_cb.c index 871a4e28575c..edfd729445cf 100644 --- a/drivers/scsi/bfa/bfa_hw_cb.c +++ b/drivers/scsi/bfa/bfa_hw_cb.c | |||
@@ -152,4 +152,9 @@ bfa_hwcb_isr_mode_set(struct bfa_s *bfa, bfa_boolean_t msix) | |||
152 | bfa->iocfc.hwif.hw_rspq_ack = bfa_hwcb_rspq_ack_msix; | 152 | bfa->iocfc.hwif.hw_rspq_ack = bfa_hwcb_rspq_ack_msix; |
153 | } | 153 | } |
154 | 154 | ||
155 | 155 | void | |
156 | bfa_hwcb_msix_get_rme_range(struct bfa_s *bfa, u32 *start, u32 *end) | ||
157 | { | ||
158 | *start = BFA_MSIX_RME_Q0; | ||
159 | *end = BFA_MSIX_RME_Q7; | ||
160 | } | ||
diff --git a/drivers/scsi/bfa/bfa_hw_ct.c b/drivers/scsi/bfa/bfa_hw_ct.c index 76ceb9a4bf2f..a357fb3066fd 100644 --- a/drivers/scsi/bfa/bfa_hw_ct.c +++ b/drivers/scsi/bfa/bfa_hw_ct.c | |||
@@ -168,4 +168,9 @@ bfa_hwct_isr_mode_set(struct bfa_s *bfa, bfa_boolean_t msix) | |||
168 | bfa_ioc_isr_mode_set(&bfa->ioc, msix); | 168 | bfa_ioc_isr_mode_set(&bfa->ioc, msix); |
169 | } | 169 | } |
170 | 170 | ||
171 | 171 | void | |
172 | bfa_hwct_msix_get_rme_range(struct bfa_s *bfa, u32 *start, u32 *end) | ||
173 | { | ||
174 | *start = BFA_MSIX_RME_Q0; | ||
175 | *end = BFA_MSIX_RME_Q3; | ||
176 | } | ||
diff --git a/drivers/scsi/bfa/bfa_intr.c b/drivers/scsi/bfa/bfa_intr.c index 0eba3f930d5b..493678889b24 100644 --- a/drivers/scsi/bfa/bfa_intr.c +++ b/drivers/scsi/bfa/bfa_intr.c | |||
@@ -134,6 +134,7 @@ bfa_isr_enable(struct bfa_s *bfa) | |||
134 | 134 | ||
135 | bfa_reg_write(bfa->iocfc.bfa_regs.intr_status, intr_unmask); | 135 | bfa_reg_write(bfa->iocfc.bfa_regs.intr_status, intr_unmask); |
136 | bfa_reg_write(bfa->iocfc.bfa_regs.intr_mask, ~intr_unmask); | 136 | bfa_reg_write(bfa->iocfc.bfa_regs.intr_mask, ~intr_unmask); |
137 | bfa->iocfc.intr_mask = ~intr_unmask; | ||
137 | bfa_isr_mode_set(bfa, bfa->msix.nvecs != 0); | 138 | bfa_isr_mode_set(bfa, bfa->msix.nvecs != 0); |
138 | } | 139 | } |
139 | 140 | ||
diff --git a/drivers/scsi/bfa/bfa_iocfc.c b/drivers/scsi/bfa/bfa_iocfc.c index 0776d74d40de..90820be99864 100644 --- a/drivers/scsi/bfa/bfa_iocfc.c +++ b/drivers/scsi/bfa/bfa_iocfc.c | |||
@@ -187,6 +187,7 @@ bfa_iocfc_init_mem(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
187 | iocfc->hwif.hw_msix_uninstall = bfa_hwct_msix_uninstall; | 187 | iocfc->hwif.hw_msix_uninstall = bfa_hwct_msix_uninstall; |
188 | iocfc->hwif.hw_isr_mode_set = bfa_hwct_isr_mode_set; | 188 | iocfc->hwif.hw_isr_mode_set = bfa_hwct_isr_mode_set; |
189 | iocfc->hwif.hw_msix_getvecs = bfa_hwct_msix_getvecs; | 189 | iocfc->hwif.hw_msix_getvecs = bfa_hwct_msix_getvecs; |
190 | iocfc->hwif.hw_msix_get_rme_range = bfa_hwct_msix_get_rme_range; | ||
190 | } else { | 191 | } else { |
191 | iocfc->hwif.hw_reginit = bfa_hwcb_reginit; | 192 | iocfc->hwif.hw_reginit = bfa_hwcb_reginit; |
192 | iocfc->hwif.hw_reqq_ack = bfa_hwcb_reqq_ack; | 193 | iocfc->hwif.hw_reqq_ack = bfa_hwcb_reqq_ack; |
@@ -196,6 +197,7 @@ bfa_iocfc_init_mem(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
196 | iocfc->hwif.hw_msix_uninstall = bfa_hwcb_msix_uninstall; | 197 | iocfc->hwif.hw_msix_uninstall = bfa_hwcb_msix_uninstall; |
197 | iocfc->hwif.hw_isr_mode_set = bfa_hwcb_isr_mode_set; | 198 | iocfc->hwif.hw_isr_mode_set = bfa_hwcb_isr_mode_set; |
198 | iocfc->hwif.hw_msix_getvecs = bfa_hwcb_msix_getvecs; | 199 | iocfc->hwif.hw_msix_getvecs = bfa_hwcb_msix_getvecs; |
200 | iocfc->hwif.hw_msix_get_rme_range = bfa_hwcb_msix_get_rme_range; | ||
199 | } | 201 | } |
200 | 202 | ||
201 | iocfc->hwif.hw_reginit(bfa); | 203 | iocfc->hwif.hw_reginit(bfa); |
diff --git a/drivers/scsi/bfa/bfa_iocfc.h b/drivers/scsi/bfa/bfa_iocfc.h index 2b281037fd79..74a6a048d1fd 100644 --- a/drivers/scsi/bfa/bfa_iocfc.h +++ b/drivers/scsi/bfa/bfa_iocfc.h | |||
@@ -63,6 +63,8 @@ struct bfa_hwif_s { | |||
63 | void (*hw_isr_mode_set)(struct bfa_s *bfa, bfa_boolean_t msix); | 63 | void (*hw_isr_mode_set)(struct bfa_s *bfa, bfa_boolean_t msix); |
64 | void (*hw_msix_getvecs)(struct bfa_s *bfa, u32 *vecmap, | 64 | void (*hw_msix_getvecs)(struct bfa_s *bfa, u32 *vecmap, |
65 | u32 *nvecs, u32 *maxvec); | 65 | u32 *nvecs, u32 *maxvec); |
66 | void (*hw_msix_get_rme_range) (struct bfa_s *bfa, u32 *start, | ||
67 | u32 *end); | ||
66 | }; | 68 | }; |
67 | typedef void (*bfa_cb_iocfc_t) (void *cbarg, enum bfa_status status); | 69 | typedef void (*bfa_cb_iocfc_t) (void *cbarg, enum bfa_status status); |
68 | 70 | ||
@@ -104,7 +106,8 @@ struct bfa_iocfc_s { | |||
104 | struct bfa_hwif_s hwif; | 106 | struct bfa_hwif_s hwif; |
105 | 107 | ||
106 | bfa_cb_iocfc_t updateq_cbfn; /* bios callback function */ | 108 | bfa_cb_iocfc_t updateq_cbfn; /* bios callback function */ |
107 | void *updateq_cbarg; /* bios callback arg */ | 109 | void *updateq_cbarg; /* bios callback arg */ |
110 | u32 intr_mask; | ||
108 | }; | 111 | }; |
109 | 112 | ||
110 | #define bfa_lpuid(__bfa) bfa_ioc_portid(&(__bfa)->ioc) | 113 | #define bfa_lpuid(__bfa) bfa_ioc_portid(&(__bfa)->ioc) |
@@ -119,6 +122,8 @@ struct bfa_iocfc_s { | |||
119 | #define bfa_msix_getvecs(__bfa, __vecmap, __nvecs, __maxvec) \ | 122 | #define bfa_msix_getvecs(__bfa, __vecmap, __nvecs, __maxvec) \ |
120 | ((__bfa)->iocfc.hwif.hw_msix_getvecs(__bfa, __vecmap, \ | 123 | ((__bfa)->iocfc.hwif.hw_msix_getvecs(__bfa, __vecmap, \ |
121 | __nvecs, __maxvec)) | 124 | __nvecs, __maxvec)) |
125 | #define bfa_msix_get_rme_range(__bfa, __start, __end) \ | ||
126 | ((__bfa)->iocfc.hwif.hw_msix_get_rme_range(__bfa, __start, __end)) | ||
122 | 127 | ||
123 | /* | 128 | /* |
124 | * FC specific IOC functions. | 129 | * FC specific IOC functions. |
@@ -154,6 +159,7 @@ void bfa_hwcb_msix_uninstall(struct bfa_s *bfa); | |||
154 | void bfa_hwcb_isr_mode_set(struct bfa_s *bfa, bfa_boolean_t msix); | 159 | void bfa_hwcb_isr_mode_set(struct bfa_s *bfa, bfa_boolean_t msix); |
155 | void bfa_hwcb_msix_getvecs(struct bfa_s *bfa, u32 *vecmap, | 160 | void bfa_hwcb_msix_getvecs(struct bfa_s *bfa, u32 *vecmap, |
156 | u32 *nvecs, u32 *maxvec); | 161 | u32 *nvecs, u32 *maxvec); |
162 | void bfa_hwcb_msix_get_rme_range(struct bfa_s *bfa, u32 *start, u32 *end); | ||
157 | void bfa_hwct_reginit(struct bfa_s *bfa); | 163 | void bfa_hwct_reginit(struct bfa_s *bfa); |
158 | void bfa_hwct_reqq_ack(struct bfa_s *bfa, int rspq); | 164 | void bfa_hwct_reqq_ack(struct bfa_s *bfa, int rspq); |
159 | void bfa_hwct_rspq_ack(struct bfa_s *bfa, int rspq); | 165 | void bfa_hwct_rspq_ack(struct bfa_s *bfa, int rspq); |
@@ -163,6 +169,7 @@ void bfa_hwct_msix_uninstall(struct bfa_s *bfa); | |||
163 | void bfa_hwct_isr_mode_set(struct bfa_s *bfa, bfa_boolean_t msix); | 169 | void bfa_hwct_isr_mode_set(struct bfa_s *bfa, bfa_boolean_t msix); |
164 | void bfa_hwct_msix_getvecs(struct bfa_s *bfa, u32 *vecmap, | 170 | void bfa_hwct_msix_getvecs(struct bfa_s *bfa, u32 *vecmap, |
165 | u32 *nvecs, u32 *maxvec); | 171 | u32 *nvecs, u32 *maxvec); |
172 | void bfa_hwct_msix_get_rme_range(struct bfa_s *bfa, u32 *start, u32 *end); | ||
166 | 173 | ||
167 | void bfa_com_meminfo(bfa_boolean_t mincfg, u32 *dm_len); | 174 | void bfa_com_meminfo(bfa_boolean_t mincfg, u32 *dm_len); |
168 | void bfa_com_attach(struct bfa_s *bfa, struct bfa_meminfo_s *mi, | 175 | void bfa_com_attach(struct bfa_s *bfa, struct bfa_meminfo_s *mi, |
diff --git a/drivers/scsi/bfa/bfa_ioim.c b/drivers/scsi/bfa/bfa_ioim.c index 687f3d6e252b..680b87d8f0d9 100644 --- a/drivers/scsi/bfa/bfa_ioim.c +++ b/drivers/scsi/bfa/bfa_ioim.c | |||
@@ -234,8 +234,8 @@ bfa_ioim_sm_active(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) | |||
234 | bfa_sm_set_state(ioim, bfa_ioim_sm_abort); | 234 | bfa_sm_set_state(ioim, bfa_ioim_sm_abort); |
235 | else { | 235 | else { |
236 | bfa_sm_set_state(ioim, bfa_ioim_sm_abort_qfull); | 236 | bfa_sm_set_state(ioim, bfa_ioim_sm_abort_qfull); |
237 | bfa_reqq_wait(ioim->bfa, ioim->itnim->reqq, | 237 | bfa_reqq_wait(ioim->bfa, ioim->reqq, |
238 | &ioim->iosp->reqq_wait); | 238 | &ioim->iosp->reqq_wait); |
239 | } | 239 | } |
240 | break; | 240 | break; |
241 | 241 | ||
@@ -247,8 +247,8 @@ bfa_ioim_sm_active(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) | |||
247 | bfa_sm_set_state(ioim, bfa_ioim_sm_cleanup); | 247 | bfa_sm_set_state(ioim, bfa_ioim_sm_cleanup); |
248 | else { | 248 | else { |
249 | bfa_sm_set_state(ioim, bfa_ioim_sm_cleanup_qfull); | 249 | bfa_sm_set_state(ioim, bfa_ioim_sm_cleanup_qfull); |
250 | bfa_reqq_wait(ioim->bfa, ioim->itnim->reqq, | 250 | bfa_reqq_wait(ioim->bfa, ioim->reqq, |
251 | &ioim->iosp->reqq_wait); | 251 | &ioim->iosp->reqq_wait); |
252 | } | 252 | } |
253 | break; | 253 | break; |
254 | 254 | ||
@@ -305,7 +305,7 @@ bfa_ioim_sm_abort(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) | |||
305 | bfa_sm_set_state(ioim, bfa_ioim_sm_cleanup); | 305 | bfa_sm_set_state(ioim, bfa_ioim_sm_cleanup); |
306 | else { | 306 | else { |
307 | bfa_sm_set_state(ioim, bfa_ioim_sm_cleanup_qfull); | 307 | bfa_sm_set_state(ioim, bfa_ioim_sm_cleanup_qfull); |
308 | bfa_reqq_wait(ioim->bfa, ioim->itnim->reqq, | 308 | bfa_reqq_wait(ioim->bfa, ioim->reqq, |
309 | &ioim->iosp->reqq_wait); | 309 | &ioim->iosp->reqq_wait); |
310 | } | 310 | } |
311 | break; | 311 | break; |
@@ -738,9 +738,9 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim) | |||
738 | /** | 738 | /** |
739 | * check for room in queue to send request now | 739 | * check for room in queue to send request now |
740 | */ | 740 | */ |
741 | m = bfa_reqq_next(ioim->bfa, itnim->reqq); | 741 | m = bfa_reqq_next(ioim->bfa, ioim->reqq); |
742 | if (!m) { | 742 | if (!m) { |
743 | bfa_reqq_wait(ioim->bfa, ioim->itnim->reqq, | 743 | bfa_reqq_wait(ioim->bfa, ioim->reqq, |
744 | &ioim->iosp->reqq_wait); | 744 | &ioim->iosp->reqq_wait); |
745 | return BFA_FALSE; | 745 | return BFA_FALSE; |
746 | } | 746 | } |
@@ -832,7 +832,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim) | |||
832 | /** | 832 | /** |
833 | * queue I/O message to firmware | 833 | * queue I/O message to firmware |
834 | */ | 834 | */ |
835 | bfa_reqq_produce(ioim->bfa, itnim->reqq); | 835 | bfa_reqq_produce(ioim->bfa, ioim->reqq); |
836 | return BFA_TRUE; | 836 | return BFA_TRUE; |
837 | } | 837 | } |
838 | 838 | ||
@@ -930,14 +930,13 @@ bfa_ioim_sgpg_setup(struct bfa_ioim_s *ioim) | |||
930 | static bfa_boolean_t | 930 | static bfa_boolean_t |
931 | bfa_ioim_send_abort(struct bfa_ioim_s *ioim) | 931 | bfa_ioim_send_abort(struct bfa_ioim_s *ioim) |
932 | { | 932 | { |
933 | struct bfa_itnim_s *itnim = ioim->itnim; | ||
934 | struct bfi_ioim_abort_req_s *m; | 933 | struct bfi_ioim_abort_req_s *m; |
935 | enum bfi_ioim_h2i msgop; | 934 | enum bfi_ioim_h2i msgop; |
936 | 935 | ||
937 | /** | 936 | /** |
938 | * check for room in queue to send request now | 937 | * check for room in queue to send request now |
939 | */ | 938 | */ |
940 | m = bfa_reqq_next(ioim->bfa, itnim->reqq); | 939 | m = bfa_reqq_next(ioim->bfa, ioim->reqq); |
941 | if (!m) | 940 | if (!m) |
942 | return BFA_FALSE; | 941 | return BFA_FALSE; |
943 | 942 | ||
@@ -956,7 +955,7 @@ bfa_ioim_send_abort(struct bfa_ioim_s *ioim) | |||
956 | /** | 955 | /** |
957 | * queue I/O message to firmware | 956 | * queue I/O message to firmware |
958 | */ | 957 | */ |
959 | bfa_reqq_produce(ioim->bfa, itnim->reqq); | 958 | bfa_reqq_produce(ioim->bfa, ioim->reqq); |
960 | return BFA_TRUE; | 959 | return BFA_TRUE; |
961 | } | 960 | } |
962 | 961 | ||
@@ -1306,6 +1305,14 @@ void | |||
1306 | bfa_ioim_start(struct bfa_ioim_s *ioim) | 1305 | bfa_ioim_start(struct bfa_ioim_s *ioim) |
1307 | { | 1306 | { |
1308 | bfa_trc_fp(ioim->bfa, ioim->iotag); | 1307 | bfa_trc_fp(ioim->bfa, ioim->iotag); |
1308 | |||
1309 | /** | ||
1310 | * Obtain the queue over which this request has to be issued | ||
1311 | */ | ||
1312 | ioim->reqq = bfa_fcpim_ioredirect_enabled(ioim->bfa) ? | ||
1313 | bfa_cb_ioim_get_reqq(ioim->dio) : | ||
1314 | bfa_itnim_get_reqq(ioim); | ||
1315 | |||
1309 | bfa_sm_send_event(ioim, BFA_IOIM_SM_START); | 1316 | bfa_sm_send_event(ioim, BFA_IOIM_SM_START); |
1310 | } | 1317 | } |
1311 | 1318 | ||
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 943bc4b37284..ffbec9ba21b7 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c | |||
@@ -702,6 +702,15 @@ bfad_im_probe_undo(struct bfad_s *bfad) | |||
702 | } | 702 | } |
703 | } | 703 | } |
704 | 704 | ||
705 | /** | ||
706 | * Call back function to handle IO redirection state change | ||
707 | */ | ||
708 | void | ||
709 | bfa_cb_ioredirect_state_change(void *hcb_bfad, bfa_boolean_t ioredirect) | ||
710 | { | ||
711 | /* Do nothing */ | ||
712 | } | ||
713 | |||
705 | struct Scsi_Host * | 714 | struct Scsi_Host * |
706 | bfad_os_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad) | 715 | bfad_os_scsi_host_alloc(struct bfad_im_port_s *im_port, struct bfad_s *bfad) |
707 | { | 716 | { |
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); | |||
42 | bfa_status_t bfa_fcpim_get_modstats(struct bfa_s *bfa, | 42 | bfa_status_t bfa_fcpim_get_modstats(struct bfa_s *bfa, |
43 | struct bfa_fcpim_stats_s *modstats); | 43 | struct bfa_fcpim_stats_s *modstats); |
44 | bfa_status_t bfa_fcpim_clr_modstats(struct bfa_s *bfa); | 44 | bfa_status_t bfa_fcpim_clr_modstats(struct bfa_s *bfa); |
45 | void bfa_fcpim_set_ioredirect(struct bfa_s *bfa, bfa_boolean_t state); | ||
46 | void bfa_fcpim_update_ioredirect(struct bfa_s *bfa); | ||
47 | void 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); |
57 | void bfa_itnim_clear_stats(struct bfa_itnim_s *itnim); | 75 | void 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); |
216 | bfa_status_t bfa_fcport_clear_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, | 216 | bfa_status_t bfa_fcport_clear_stats(struct bfa_s *bfa, bfa_cb_pport_t cbfn, |
217 | void *cbarg); | 217 | void *cbarg); |
218 | bfa_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; |