diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-05-22 14:51:39 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-08 12:21:29 -0400 |
commit | da0436e915a5c17ee79e72c1bf978a4ebb1cbf4d (patch) | |
tree | 7784646b7627117fa7849a901c85294fae905505 /drivers/scsi/lpfc/lpfc_crtn.h | |
parent | 3772a99175f5378b5001e8da364341a8b8226a4a (diff) |
[SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - Base Support
Adds new hardware and interface definitions.
Adds new interface routines - utilizing the reorganized layout of the
driver. Adds SLI-4 specific functions for attachment, initialization,
teardown, etc.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_crtn.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_crtn.h | 59 |
1 files changed, 48 insertions, 11 deletions
diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index f88ce3f26190..3802e455734f 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h | |||
@@ -35,17 +35,19 @@ int lpfc_config_msi(struct lpfc_hba *, LPFC_MBOXQ_t *); | |||
35 | int lpfc_read_sparam(struct lpfc_hba *, LPFC_MBOXQ_t *, int); | 35 | int lpfc_read_sparam(struct lpfc_hba *, LPFC_MBOXQ_t *, int); |
36 | void lpfc_read_config(struct lpfc_hba *, LPFC_MBOXQ_t *); | 36 | void lpfc_read_config(struct lpfc_hba *, LPFC_MBOXQ_t *); |
37 | void lpfc_read_lnk_stat(struct lpfc_hba *, LPFC_MBOXQ_t *); | 37 | void lpfc_read_lnk_stat(struct lpfc_hba *, LPFC_MBOXQ_t *); |
38 | int lpfc_reg_login(struct lpfc_hba *, uint16_t, uint32_t, uint8_t *, | 38 | int lpfc_reg_rpi(struct lpfc_hba *, uint16_t, uint32_t, uint8_t *, |
39 | LPFC_MBOXQ_t *, uint32_t); | 39 | LPFC_MBOXQ_t *, uint32_t); |
40 | void lpfc_unreg_login(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *); | 40 | void lpfc_unreg_login(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *); |
41 | void lpfc_unreg_did(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *); | 41 | void lpfc_unreg_did(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *); |
42 | void lpfc_reg_vpi(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *); | 42 | void lpfc_reg_vpi(struct lpfc_vport *, LPFC_MBOXQ_t *); |
43 | void lpfc_unreg_vpi(struct lpfc_hba *, uint16_t, LPFC_MBOXQ_t *); | 43 | void lpfc_unreg_vpi(struct lpfc_hba *, uint16_t, LPFC_MBOXQ_t *); |
44 | void lpfc_init_link(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t, uint32_t); | 44 | void lpfc_init_link(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t, uint32_t); |
45 | void lpfc_request_features(struct lpfc_hba *, struct lpfcMboxq *); | ||
45 | 46 | ||
46 | struct lpfc_vport *lpfc_find_vport_by_did(struct lpfc_hba *, uint32_t); | 47 | struct lpfc_vport *lpfc_find_vport_by_did(struct lpfc_hba *, uint32_t); |
47 | void lpfc_cleanup_rpis(struct lpfc_vport *, int); | 48 | void lpfc_cleanup_rpis(struct lpfc_vport *, int); |
48 | int lpfc_linkdown(struct lpfc_hba *); | 49 | int lpfc_linkdown(struct lpfc_hba *); |
50 | void lpfc_linkdown_port(struct lpfc_vport *); | ||
49 | void lpfc_port_link_failure(struct lpfc_vport *); | 51 | void lpfc_port_link_failure(struct lpfc_vport *); |
50 | void lpfc_mbx_cmpl_read_la(struct lpfc_hba *, LPFC_MBOXQ_t *); | 52 | void lpfc_mbx_cmpl_read_la(struct lpfc_hba *, LPFC_MBOXQ_t *); |
51 | 53 | ||
@@ -54,6 +56,7 @@ void lpfc_mbx_cmpl_dflt_rpi(struct lpfc_hba *, LPFC_MBOXQ_t *); | |||
54 | void lpfc_mbx_cmpl_fabric_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *); | 56 | void lpfc_mbx_cmpl_fabric_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *); |
55 | void lpfc_mbx_cmpl_ns_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *); | 57 | void lpfc_mbx_cmpl_ns_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *); |
56 | void lpfc_mbx_cmpl_fdmi_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *); | 58 | void lpfc_mbx_cmpl_fdmi_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *); |
59 | void lpfc_mbx_cmpl_reg_vfi(struct lpfc_hba *, LPFC_MBOXQ_t *); | ||
57 | void lpfc_enqueue_node(struct lpfc_vport *, struct lpfc_nodelist *); | 60 | void lpfc_enqueue_node(struct lpfc_vport *, struct lpfc_nodelist *); |
58 | void lpfc_dequeue_node(struct lpfc_vport *, struct lpfc_nodelist *); | 61 | void lpfc_dequeue_node(struct lpfc_vport *, struct lpfc_nodelist *); |
59 | struct lpfc_nodelist *lpfc_enable_node(struct lpfc_vport *, | 62 | struct lpfc_nodelist *lpfc_enable_node(struct lpfc_vport *, |
@@ -149,15 +152,19 @@ int lpfc_online(struct lpfc_hba *); | |||
149 | void lpfc_unblock_mgmt_io(struct lpfc_hba *); | 152 | void lpfc_unblock_mgmt_io(struct lpfc_hba *); |
150 | void lpfc_offline_prep(struct lpfc_hba *); | 153 | void lpfc_offline_prep(struct lpfc_hba *); |
151 | void lpfc_offline(struct lpfc_hba *); | 154 | void lpfc_offline(struct lpfc_hba *); |
155 | void lpfc_reset_hba(struct lpfc_hba *); | ||
152 | 156 | ||
153 | int lpfc_sli_setup(struct lpfc_hba *); | 157 | int lpfc_sli_setup(struct lpfc_hba *); |
154 | int lpfc_sli_queue_setup(struct lpfc_hba *); | 158 | int lpfc_sli_queue_setup(struct lpfc_hba *); |
155 | 159 | ||
156 | void lpfc_handle_eratt(struct lpfc_hba *); | 160 | void lpfc_handle_eratt(struct lpfc_hba *); |
157 | void lpfc_handle_latt(struct lpfc_hba *); | 161 | void lpfc_handle_latt(struct lpfc_hba *); |
158 | irqreturn_t lpfc_intr_handler(int, void *); | 162 | irqreturn_t lpfc_sli_intr_handler(int, void *); |
159 | irqreturn_t lpfc_sp_intr_handler(int, void *); | 163 | irqreturn_t lpfc_sli_sp_intr_handler(int, void *); |
160 | irqreturn_t lpfc_fp_intr_handler(int, void *); | 164 | irqreturn_t lpfc_sli_fp_intr_handler(int, void *); |
165 | irqreturn_t lpfc_sli4_intr_handler(int, void *); | ||
166 | irqreturn_t lpfc_sli4_sp_intr_handler(int, void *); | ||
167 | irqreturn_t lpfc_sli4_fp_intr_handler(int, void *); | ||
161 | 168 | ||
162 | void lpfc_read_rev(struct lpfc_hba *, LPFC_MBOXQ_t *); | 169 | void lpfc_read_rev(struct lpfc_hba *, LPFC_MBOXQ_t *); |
163 | void lpfc_config_ring(struct lpfc_hba *, int, LPFC_MBOXQ_t *); | 170 | void lpfc_config_ring(struct lpfc_hba *, int, LPFC_MBOXQ_t *); |
@@ -165,16 +172,32 @@ void lpfc_config_port(struct lpfc_hba *, LPFC_MBOXQ_t *); | |||
165 | void lpfc_kill_board(struct lpfc_hba *, LPFC_MBOXQ_t *); | 172 | void lpfc_kill_board(struct lpfc_hba *, LPFC_MBOXQ_t *); |
166 | void lpfc_mbox_put(struct lpfc_hba *, LPFC_MBOXQ_t *); | 173 | void lpfc_mbox_put(struct lpfc_hba *, LPFC_MBOXQ_t *); |
167 | LPFC_MBOXQ_t *lpfc_mbox_get(struct lpfc_hba *); | 174 | LPFC_MBOXQ_t *lpfc_mbox_get(struct lpfc_hba *); |
175 | void __lpfc_mbox_cmpl_put(struct lpfc_hba *, LPFC_MBOXQ_t *); | ||
168 | void lpfc_mbox_cmpl_put(struct lpfc_hba *, LPFC_MBOXQ_t *); | 176 | void lpfc_mbox_cmpl_put(struct lpfc_hba *, LPFC_MBOXQ_t *); |
177 | int lpfc_mbox_cmd_check(struct lpfc_hba *, LPFC_MBOXQ_t *); | ||
178 | int lpfc_mbox_dev_check(struct lpfc_hba *); | ||
169 | int lpfc_mbox_tmo_val(struct lpfc_hba *, int); | 179 | int lpfc_mbox_tmo_val(struct lpfc_hba *, int); |
180 | void lpfc_init_vfi(struct lpfcMboxq *, struct lpfc_vport *); | ||
181 | void lpfc_reg_vfi(struct lpfcMboxq *, struct lpfc_vport *, dma_addr_t); | ||
182 | void lpfc_init_vpi(struct lpfcMboxq *, uint16_t); | ||
183 | void lpfc_unreg_vfi(struct lpfcMboxq *, uint16_t); | ||
184 | void lpfc_reg_fcfi(struct lpfc_hba *, struct lpfcMboxq *); | ||
185 | void lpfc_unreg_fcfi(struct lpfcMboxq *, uint16_t); | ||
186 | void lpfc_resume_rpi(struct lpfcMboxq *, struct lpfc_nodelist *); | ||
170 | 187 | ||
171 | void lpfc_config_hbq(struct lpfc_hba *, uint32_t, struct lpfc_hbq_init *, | 188 | void lpfc_config_hbq(struct lpfc_hba *, uint32_t, struct lpfc_hbq_init *, |
172 | uint32_t , LPFC_MBOXQ_t *); | 189 | uint32_t , LPFC_MBOXQ_t *); |
173 | struct hbq_dmabuf *lpfc_els_hbq_alloc(struct lpfc_hba *); | 190 | struct hbq_dmabuf *lpfc_els_hbq_alloc(struct lpfc_hba *); |
174 | void lpfc_els_hbq_free(struct lpfc_hba *, struct hbq_dmabuf *); | 191 | void lpfc_els_hbq_free(struct lpfc_hba *, struct hbq_dmabuf *); |
192 | struct hbq_dmabuf *lpfc_sli4_rb_alloc(struct lpfc_hba *); | ||
193 | void lpfc_sli4_rb_free(struct lpfc_hba *, struct hbq_dmabuf *); | ||
194 | void lpfc_sli4_build_dflt_fcf_record(struct lpfc_hba *, struct fcf_record *, | ||
195 | uint16_t); | ||
196 | void lpfc_unregister_unused_fcf(struct lpfc_hba *); | ||
175 | 197 | ||
176 | int lpfc_mem_alloc(struct lpfc_hba *); | 198 | int lpfc_mem_alloc(struct lpfc_hba *, int align); |
177 | void lpfc_mem_free(struct lpfc_hba *); | 199 | void lpfc_mem_free(struct lpfc_hba *); |
200 | void lpfc_mem_free_all(struct lpfc_hba *); | ||
178 | void lpfc_stop_vport_timers(struct lpfc_vport *); | 201 | void lpfc_stop_vport_timers(struct lpfc_vport *); |
179 | 202 | ||
180 | void lpfc_poll_timeout(unsigned long ptr); | 203 | void lpfc_poll_timeout(unsigned long ptr); |
@@ -198,12 +221,13 @@ int lpfc_sli_host_down(struct lpfc_vport *); | |||
198 | int lpfc_sli_hba_down(struct lpfc_hba *); | 221 | int lpfc_sli_hba_down(struct lpfc_hba *); |
199 | int lpfc_sli_issue_mbox(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); | 222 | int lpfc_sli_issue_mbox(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); |
200 | int lpfc_sli_handle_mb_event(struct lpfc_hba *); | 223 | int lpfc_sli_handle_mb_event(struct lpfc_hba *); |
201 | int lpfc_sli_flush_mbox_queue(struct lpfc_hba *); | 224 | void lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *); |
202 | int lpfc_sli_check_eratt(struct lpfc_hba *); | 225 | int lpfc_sli_check_eratt(struct lpfc_hba *); |
203 | int lpfc_sli_handle_slow_ring_event(struct lpfc_hba *, | 226 | void lpfc_sli_handle_slow_ring_event(struct lpfc_hba *, |
204 | struct lpfc_sli_ring *, uint32_t); | 227 | struct lpfc_sli_ring *, uint32_t); |
228 | int lpfc_sli4_handle_received_buffer(struct lpfc_hba *); | ||
205 | void lpfc_sli_def_mbox_cmpl(struct lpfc_hba *, LPFC_MBOXQ_t *); | 229 | void lpfc_sli_def_mbox_cmpl(struct lpfc_hba *, LPFC_MBOXQ_t *); |
206 | int lpfc_sli_issue_iocb(struct lpfc_hba *, struct lpfc_sli_ring *, | 230 | int lpfc_sli_issue_iocb(struct lpfc_hba *, uint32_t, |
207 | struct lpfc_iocbq *, uint32_t); | 231 | struct lpfc_iocbq *, uint32_t); |
208 | void lpfc_sli_pcimem_bcopy(void *, void *, uint32_t); | 232 | void lpfc_sli_pcimem_bcopy(void *, void *, uint32_t); |
209 | void lpfc_sli_abort_iocb_ring(struct lpfc_hba *, struct lpfc_sli_ring *); | 233 | void lpfc_sli_abort_iocb_ring(struct lpfc_hba *, struct lpfc_sli_ring *); |
@@ -237,7 +261,7 @@ struct lpfc_nodelist *lpfc_findnode_wwpn(struct lpfc_vport *, | |||
237 | 261 | ||
238 | int lpfc_sli_issue_mbox_wait(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); | 262 | int lpfc_sli_issue_mbox_wait(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); |
239 | 263 | ||
240 | int lpfc_sli_issue_iocb_wait(struct lpfc_hba *, struct lpfc_sli_ring *, | 264 | int lpfc_sli_issue_iocb_wait(struct lpfc_hba *, uint32_t, |
241 | struct lpfc_iocbq *, struct lpfc_iocbq *, | 265 | struct lpfc_iocbq *, struct lpfc_iocbq *, |
242 | uint32_t); | 266 | uint32_t); |
243 | void lpfc_sli_abort_fcp_cmpl(struct lpfc_hba *, struct lpfc_iocbq *, | 267 | void lpfc_sli_abort_fcp_cmpl(struct lpfc_hba *, struct lpfc_iocbq *, |
@@ -254,6 +278,12 @@ void lpfc_in_buf_free(struct lpfc_hba *, struct lpfc_dmabuf *); | |||
254 | const char* lpfc_info(struct Scsi_Host *); | 278 | const char* lpfc_info(struct Scsi_Host *); |
255 | int lpfc_scan_finished(struct Scsi_Host *, unsigned long); | 279 | int lpfc_scan_finished(struct Scsi_Host *, unsigned long); |
256 | 280 | ||
281 | int lpfc_init_api_table_setup(struct lpfc_hba *, uint8_t); | ||
282 | int lpfc_sli_api_table_setup(struct lpfc_hba *, uint8_t); | ||
283 | int lpfc_scsi_api_table_setup(struct lpfc_hba *, uint8_t); | ||
284 | int lpfc_mbox_api_table_setup(struct lpfc_hba *, uint8_t); | ||
285 | int lpfc_api_table_setup(struct lpfc_hba *, uint8_t); | ||
286 | |||
257 | void lpfc_get_cfgparam(struct lpfc_hba *); | 287 | void lpfc_get_cfgparam(struct lpfc_hba *); |
258 | void lpfc_get_vport_cfgparam(struct lpfc_vport *); | 288 | void lpfc_get_vport_cfgparam(struct lpfc_vport *); |
259 | int lpfc_alloc_sysfs_attr(struct lpfc_vport *); | 289 | int lpfc_alloc_sysfs_attr(struct lpfc_vport *); |
@@ -314,8 +344,15 @@ lpfc_send_els_failure_event(struct lpfc_hba *, struct lpfc_iocbq *, | |||
314 | struct lpfc_iocbq *); | 344 | struct lpfc_iocbq *); |
315 | struct lpfc_fast_path_event *lpfc_alloc_fast_evt(struct lpfc_hba *); | 345 | struct lpfc_fast_path_event *lpfc_alloc_fast_evt(struct lpfc_hba *); |
316 | void lpfc_free_fast_evt(struct lpfc_hba *, struct lpfc_fast_path_event *); | 346 | void lpfc_free_fast_evt(struct lpfc_hba *, struct lpfc_fast_path_event *); |
347 | void lpfc_create_static_vport(struct lpfc_hba *); | ||
348 | void lpfc_stop_hba_timers(struct lpfc_hba *); | ||
349 | void lpfc_stop_port(struct lpfc_hba *); | ||
350 | void lpfc_parse_fcoe_conf(struct lpfc_hba *, uint8_t *, uint32_t); | ||
351 | int lpfc_parse_vpd(struct lpfc_hba *, uint8_t *, int); | ||
352 | void lpfc_start_fdiscs(struct lpfc_hba *phba); | ||
317 | 353 | ||
318 | #define ScsiResult(host_code, scsi_code) (((host_code) << 16) | scsi_code) | 354 | #define ScsiResult(host_code, scsi_code) (((host_code) << 16) | scsi_code) |
319 | #define HBA_EVENT_RSCN 5 | 355 | #define HBA_EVENT_RSCN 5 |
320 | #define HBA_EVENT_LINK_UP 2 | 356 | #define HBA_EVENT_LINK_UP 2 |
321 | #define HBA_EVENT_LINK_DOWN 3 | 357 | #define HBA_EVENT_LINK_DOWN 3 |
358 | |||