diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_crtn.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_crtn.h | 63 |
1 files changed, 52 insertions, 11 deletions
diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index f88ce3f26190..d2a922997c0f 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h | |||
@@ -23,6 +23,8 @@ typedef int (*node_filter)(struct lpfc_nodelist *, void *); | |||
23 | struct fc_rport; | 23 | struct fc_rport; |
24 | void lpfc_dump_mem(struct lpfc_hba *, LPFC_MBOXQ_t *, uint16_t); | 24 | void lpfc_dump_mem(struct lpfc_hba *, LPFC_MBOXQ_t *, uint16_t); |
25 | void lpfc_dump_wakeup_param(struct lpfc_hba *, LPFC_MBOXQ_t *); | 25 | void lpfc_dump_wakeup_param(struct lpfc_hba *, LPFC_MBOXQ_t *); |
26 | void lpfc_dump_static_vport(struct lpfc_hba *, LPFC_MBOXQ_t *, uint16_t); | ||
27 | int lpfc_dump_fcoe_param(struct lpfc_hba *, struct lpfcMboxq *); | ||
26 | void lpfc_read_nv(struct lpfc_hba *, LPFC_MBOXQ_t *); | 28 | void lpfc_read_nv(struct lpfc_hba *, LPFC_MBOXQ_t *); |
27 | void lpfc_config_async(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); | 29 | void lpfc_config_async(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); |
28 | 30 | ||
@@ -35,17 +37,19 @@ int lpfc_config_msi(struct lpfc_hba *, LPFC_MBOXQ_t *); | |||
35 | int lpfc_read_sparam(struct lpfc_hba *, LPFC_MBOXQ_t *, int); | 37 | int lpfc_read_sparam(struct lpfc_hba *, LPFC_MBOXQ_t *, int); |
36 | void lpfc_read_config(struct lpfc_hba *, LPFC_MBOXQ_t *); | 38 | void lpfc_read_config(struct lpfc_hba *, LPFC_MBOXQ_t *); |
37 | void lpfc_read_lnk_stat(struct lpfc_hba *, LPFC_MBOXQ_t *); | 39 | 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 *, | 40 | int lpfc_reg_rpi(struct lpfc_hba *, uint16_t, uint32_t, uint8_t *, |
39 | LPFC_MBOXQ_t *, uint32_t); | 41 | LPFC_MBOXQ_t *, uint32_t); |
40 | void lpfc_unreg_login(struct lpfc_hba *, uint16_t, uint32_t, LPFC_MBOXQ_t *); | 42 | 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 *); | 43 | 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 *); | 44 | void lpfc_reg_vpi(struct lpfc_vport *, LPFC_MBOXQ_t *); |
43 | void lpfc_unreg_vpi(struct lpfc_hba *, uint16_t, LPFC_MBOXQ_t *); | 45 | 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); | 46 | void lpfc_init_link(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t, uint32_t); |
47 | void lpfc_request_features(struct lpfc_hba *, struct lpfcMboxq *); | ||
45 | 48 | ||
46 | struct lpfc_vport *lpfc_find_vport_by_did(struct lpfc_hba *, uint32_t); | 49 | struct lpfc_vport *lpfc_find_vport_by_did(struct lpfc_hba *, uint32_t); |
47 | void lpfc_cleanup_rpis(struct lpfc_vport *, int); | 50 | void lpfc_cleanup_rpis(struct lpfc_vport *, int); |
48 | int lpfc_linkdown(struct lpfc_hba *); | 51 | int lpfc_linkdown(struct lpfc_hba *); |
52 | void lpfc_linkdown_port(struct lpfc_vport *); | ||
49 | void lpfc_port_link_failure(struct lpfc_vport *); | 53 | void lpfc_port_link_failure(struct lpfc_vport *); |
50 | void lpfc_mbx_cmpl_read_la(struct lpfc_hba *, LPFC_MBOXQ_t *); | 54 | void lpfc_mbx_cmpl_read_la(struct lpfc_hba *, LPFC_MBOXQ_t *); |
51 | 55 | ||
@@ -54,6 +58,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 *); | 58 | 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 *); | 59 | 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 *); | 60 | void lpfc_mbx_cmpl_fdmi_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *); |
61 | void lpfc_mbx_cmpl_reg_vfi(struct lpfc_hba *, LPFC_MBOXQ_t *); | ||
57 | void lpfc_enqueue_node(struct lpfc_vport *, struct lpfc_nodelist *); | 62 | void lpfc_enqueue_node(struct lpfc_vport *, struct lpfc_nodelist *); |
58 | void lpfc_dequeue_node(struct lpfc_vport *, struct lpfc_nodelist *); | 63 | void lpfc_dequeue_node(struct lpfc_vport *, struct lpfc_nodelist *); |
59 | struct lpfc_nodelist *lpfc_enable_node(struct lpfc_vport *, | 64 | struct lpfc_nodelist *lpfc_enable_node(struct lpfc_vport *, |
@@ -105,6 +110,7 @@ int lpfc_issue_els_adisc(struct lpfc_vport *, struct lpfc_nodelist *, uint8_t); | |||
105 | int lpfc_issue_els_logo(struct lpfc_vport *, struct lpfc_nodelist *, uint8_t); | 110 | int lpfc_issue_els_logo(struct lpfc_vport *, struct lpfc_nodelist *, uint8_t); |
106 | int lpfc_issue_els_npiv_logo(struct lpfc_vport *, struct lpfc_nodelist *); | 111 | int lpfc_issue_els_npiv_logo(struct lpfc_vport *, struct lpfc_nodelist *); |
107 | int lpfc_issue_els_scr(struct lpfc_vport *, uint32_t, uint8_t); | 112 | int lpfc_issue_els_scr(struct lpfc_vport *, uint32_t, uint8_t); |
113 | int lpfc_issue_fabric_reglogin(struct lpfc_vport *); | ||
108 | int lpfc_els_free_iocb(struct lpfc_hba *, struct lpfc_iocbq *); | 114 | int lpfc_els_free_iocb(struct lpfc_hba *, struct lpfc_iocbq *); |
109 | int lpfc_ct_free_iocb(struct lpfc_hba *, struct lpfc_iocbq *); | 115 | int lpfc_ct_free_iocb(struct lpfc_hba *, struct lpfc_iocbq *); |
110 | int lpfc_els_rsp_acc(struct lpfc_vport *, uint32_t, struct lpfc_iocbq *, | 116 | int lpfc_els_rsp_acc(struct lpfc_vport *, uint32_t, struct lpfc_iocbq *, |
@@ -149,15 +155,19 @@ int lpfc_online(struct lpfc_hba *); | |||
149 | void lpfc_unblock_mgmt_io(struct lpfc_hba *); | 155 | void lpfc_unblock_mgmt_io(struct lpfc_hba *); |
150 | void lpfc_offline_prep(struct lpfc_hba *); | 156 | void lpfc_offline_prep(struct lpfc_hba *); |
151 | void lpfc_offline(struct lpfc_hba *); | 157 | void lpfc_offline(struct lpfc_hba *); |
158 | void lpfc_reset_hba(struct lpfc_hba *); | ||
152 | 159 | ||
153 | int lpfc_sli_setup(struct lpfc_hba *); | 160 | int lpfc_sli_setup(struct lpfc_hba *); |
154 | int lpfc_sli_queue_setup(struct lpfc_hba *); | 161 | int lpfc_sli_queue_setup(struct lpfc_hba *); |
155 | 162 | ||
156 | void lpfc_handle_eratt(struct lpfc_hba *); | 163 | void lpfc_handle_eratt(struct lpfc_hba *); |
157 | void lpfc_handle_latt(struct lpfc_hba *); | 164 | void lpfc_handle_latt(struct lpfc_hba *); |
158 | irqreturn_t lpfc_intr_handler(int, void *); | 165 | irqreturn_t lpfc_sli_intr_handler(int, void *); |
159 | irqreturn_t lpfc_sp_intr_handler(int, void *); | 166 | irqreturn_t lpfc_sli_sp_intr_handler(int, void *); |
160 | irqreturn_t lpfc_fp_intr_handler(int, void *); | 167 | irqreturn_t lpfc_sli_fp_intr_handler(int, void *); |
168 | irqreturn_t lpfc_sli4_intr_handler(int, void *); | ||
169 | irqreturn_t lpfc_sli4_sp_intr_handler(int, void *); | ||
170 | irqreturn_t lpfc_sli4_fp_intr_handler(int, void *); | ||
161 | 171 | ||
162 | void lpfc_read_rev(struct lpfc_hba *, LPFC_MBOXQ_t *); | 172 | void lpfc_read_rev(struct lpfc_hba *, LPFC_MBOXQ_t *); |
163 | void lpfc_config_ring(struct lpfc_hba *, int, LPFC_MBOXQ_t *); | 173 | void lpfc_config_ring(struct lpfc_hba *, int, LPFC_MBOXQ_t *); |
@@ -165,16 +175,32 @@ void lpfc_config_port(struct lpfc_hba *, LPFC_MBOXQ_t *); | |||
165 | void lpfc_kill_board(struct lpfc_hba *, LPFC_MBOXQ_t *); | 175 | void lpfc_kill_board(struct lpfc_hba *, LPFC_MBOXQ_t *); |
166 | void lpfc_mbox_put(struct lpfc_hba *, LPFC_MBOXQ_t *); | 176 | void lpfc_mbox_put(struct lpfc_hba *, LPFC_MBOXQ_t *); |
167 | LPFC_MBOXQ_t *lpfc_mbox_get(struct lpfc_hba *); | 177 | LPFC_MBOXQ_t *lpfc_mbox_get(struct lpfc_hba *); |
178 | void __lpfc_mbox_cmpl_put(struct lpfc_hba *, LPFC_MBOXQ_t *); | ||
168 | void lpfc_mbox_cmpl_put(struct lpfc_hba *, LPFC_MBOXQ_t *); | 179 | void lpfc_mbox_cmpl_put(struct lpfc_hba *, LPFC_MBOXQ_t *); |
180 | int lpfc_mbox_cmd_check(struct lpfc_hba *, LPFC_MBOXQ_t *); | ||
181 | int lpfc_mbox_dev_check(struct lpfc_hba *); | ||
169 | int lpfc_mbox_tmo_val(struct lpfc_hba *, int); | 182 | int lpfc_mbox_tmo_val(struct lpfc_hba *, int); |
183 | void lpfc_init_vfi(struct lpfcMboxq *, struct lpfc_vport *); | ||
184 | void lpfc_reg_vfi(struct lpfcMboxq *, struct lpfc_vport *, dma_addr_t); | ||
185 | void lpfc_init_vpi(struct lpfcMboxq *, uint16_t); | ||
186 | void lpfc_unreg_vfi(struct lpfcMboxq *, uint16_t); | ||
187 | void lpfc_reg_fcfi(struct lpfc_hba *, struct lpfcMboxq *); | ||
188 | void lpfc_unreg_fcfi(struct lpfcMboxq *, uint16_t); | ||
189 | void lpfc_resume_rpi(struct lpfcMboxq *, struct lpfc_nodelist *); | ||
170 | 190 | ||
171 | void lpfc_config_hbq(struct lpfc_hba *, uint32_t, struct lpfc_hbq_init *, | 191 | void lpfc_config_hbq(struct lpfc_hba *, uint32_t, struct lpfc_hbq_init *, |
172 | uint32_t , LPFC_MBOXQ_t *); | 192 | uint32_t , LPFC_MBOXQ_t *); |
173 | struct hbq_dmabuf *lpfc_els_hbq_alloc(struct lpfc_hba *); | 193 | struct hbq_dmabuf *lpfc_els_hbq_alloc(struct lpfc_hba *); |
174 | void lpfc_els_hbq_free(struct lpfc_hba *, struct hbq_dmabuf *); | 194 | void lpfc_els_hbq_free(struct lpfc_hba *, struct hbq_dmabuf *); |
195 | struct hbq_dmabuf *lpfc_sli4_rb_alloc(struct lpfc_hba *); | ||
196 | void lpfc_sli4_rb_free(struct lpfc_hba *, struct hbq_dmabuf *); | ||
197 | void lpfc_sli4_build_dflt_fcf_record(struct lpfc_hba *, struct fcf_record *, | ||
198 | uint16_t); | ||
199 | void lpfc_unregister_unused_fcf(struct lpfc_hba *); | ||
175 | 200 | ||
176 | int lpfc_mem_alloc(struct lpfc_hba *); | 201 | int lpfc_mem_alloc(struct lpfc_hba *, int align); |
177 | void lpfc_mem_free(struct lpfc_hba *); | 202 | void lpfc_mem_free(struct lpfc_hba *); |
203 | void lpfc_mem_free_all(struct lpfc_hba *); | ||
178 | void lpfc_stop_vport_timers(struct lpfc_vport *); | 204 | void lpfc_stop_vport_timers(struct lpfc_vport *); |
179 | 205 | ||
180 | void lpfc_poll_timeout(unsigned long ptr); | 206 | void lpfc_poll_timeout(unsigned long ptr); |
@@ -186,6 +212,7 @@ void lpfc_sli_release_iocbq(struct lpfc_hba *, struct lpfc_iocbq *); | |||
186 | uint16_t lpfc_sli_next_iotag(struct lpfc_hba *, struct lpfc_iocbq *); | 212 | uint16_t lpfc_sli_next_iotag(struct lpfc_hba *, struct lpfc_iocbq *); |
187 | void lpfc_sli_cancel_iocbs(struct lpfc_hba *, struct list_head *, uint32_t, | 213 | void lpfc_sli_cancel_iocbs(struct lpfc_hba *, struct list_head *, uint32_t, |
188 | uint32_t); | 214 | uint32_t); |
215 | void lpfc_sli_wake_mbox_wait(struct lpfc_hba *, LPFC_MBOXQ_t *); | ||
189 | 216 | ||
190 | void lpfc_reset_barrier(struct lpfc_hba * phba); | 217 | void lpfc_reset_barrier(struct lpfc_hba * phba); |
191 | int lpfc_sli_brdready(struct lpfc_hba *, uint32_t); | 218 | int lpfc_sli_brdready(struct lpfc_hba *, uint32_t); |
@@ -198,12 +225,13 @@ int lpfc_sli_host_down(struct lpfc_vport *); | |||
198 | int lpfc_sli_hba_down(struct lpfc_hba *); | 225 | int lpfc_sli_hba_down(struct lpfc_hba *); |
199 | int lpfc_sli_issue_mbox(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); | 226 | int lpfc_sli_issue_mbox(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); |
200 | int lpfc_sli_handle_mb_event(struct lpfc_hba *); | 227 | int lpfc_sli_handle_mb_event(struct lpfc_hba *); |
201 | int lpfc_sli_flush_mbox_queue(struct lpfc_hba *); | 228 | void lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *); |
202 | int lpfc_sli_check_eratt(struct lpfc_hba *); | 229 | int lpfc_sli_check_eratt(struct lpfc_hba *); |
203 | int lpfc_sli_handle_slow_ring_event(struct lpfc_hba *, | 230 | void lpfc_sli_handle_slow_ring_event(struct lpfc_hba *, |
204 | struct lpfc_sli_ring *, uint32_t); | 231 | struct lpfc_sli_ring *, uint32_t); |
232 | int lpfc_sli4_handle_received_buffer(struct lpfc_hba *); | ||
205 | void lpfc_sli_def_mbox_cmpl(struct lpfc_hba *, LPFC_MBOXQ_t *); | 233 | 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 *, | 234 | int lpfc_sli_issue_iocb(struct lpfc_hba *, uint32_t, |
207 | struct lpfc_iocbq *, uint32_t); | 235 | struct lpfc_iocbq *, uint32_t); |
208 | void lpfc_sli_pcimem_bcopy(void *, void *, uint32_t); | 236 | void lpfc_sli_pcimem_bcopy(void *, void *, uint32_t); |
209 | void lpfc_sli_abort_iocb_ring(struct lpfc_hba *, struct lpfc_sli_ring *); | 237 | void lpfc_sli_abort_iocb_ring(struct lpfc_hba *, struct lpfc_sli_ring *); |
@@ -237,7 +265,7 @@ struct lpfc_nodelist *lpfc_findnode_wwpn(struct lpfc_vport *, | |||
237 | 265 | ||
238 | int lpfc_sli_issue_mbox_wait(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); | 266 | int lpfc_sli_issue_mbox_wait(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t); |
239 | 267 | ||
240 | int lpfc_sli_issue_iocb_wait(struct lpfc_hba *, struct lpfc_sli_ring *, | 268 | int lpfc_sli_issue_iocb_wait(struct lpfc_hba *, uint32_t, |
241 | struct lpfc_iocbq *, struct lpfc_iocbq *, | 269 | struct lpfc_iocbq *, struct lpfc_iocbq *, |
242 | uint32_t); | 270 | uint32_t); |
243 | void lpfc_sli_abort_fcp_cmpl(struct lpfc_hba *, struct lpfc_iocbq *, | 271 | void lpfc_sli_abort_fcp_cmpl(struct lpfc_hba *, struct lpfc_iocbq *, |
@@ -254,6 +282,12 @@ void lpfc_in_buf_free(struct lpfc_hba *, struct lpfc_dmabuf *); | |||
254 | const char* lpfc_info(struct Scsi_Host *); | 282 | const char* lpfc_info(struct Scsi_Host *); |
255 | int lpfc_scan_finished(struct Scsi_Host *, unsigned long); | 283 | int lpfc_scan_finished(struct Scsi_Host *, unsigned long); |
256 | 284 | ||
285 | int lpfc_init_api_table_setup(struct lpfc_hba *, uint8_t); | ||
286 | int lpfc_sli_api_table_setup(struct lpfc_hba *, uint8_t); | ||
287 | int lpfc_scsi_api_table_setup(struct lpfc_hba *, uint8_t); | ||
288 | int lpfc_mbox_api_table_setup(struct lpfc_hba *, uint8_t); | ||
289 | int lpfc_api_table_setup(struct lpfc_hba *, uint8_t); | ||
290 | |||
257 | void lpfc_get_cfgparam(struct lpfc_hba *); | 291 | void lpfc_get_cfgparam(struct lpfc_hba *); |
258 | void lpfc_get_vport_cfgparam(struct lpfc_vport *); | 292 | void lpfc_get_vport_cfgparam(struct lpfc_vport *); |
259 | int lpfc_alloc_sysfs_attr(struct lpfc_vport *); | 293 | int lpfc_alloc_sysfs_attr(struct lpfc_vport *); |
@@ -314,8 +348,15 @@ lpfc_send_els_failure_event(struct lpfc_hba *, struct lpfc_iocbq *, | |||
314 | struct lpfc_iocbq *); | 348 | struct lpfc_iocbq *); |
315 | struct lpfc_fast_path_event *lpfc_alloc_fast_evt(struct lpfc_hba *); | 349 | 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 *); | 350 | void lpfc_free_fast_evt(struct lpfc_hba *, struct lpfc_fast_path_event *); |
351 | void lpfc_create_static_vport(struct lpfc_hba *); | ||
352 | void lpfc_stop_hba_timers(struct lpfc_hba *); | ||
353 | void lpfc_stop_port(struct lpfc_hba *); | ||
354 | void lpfc_parse_fcoe_conf(struct lpfc_hba *, uint8_t *, uint32_t); | ||
355 | int lpfc_parse_vpd(struct lpfc_hba *, uint8_t *, int); | ||
356 | void lpfc_start_fdiscs(struct lpfc_hba *phba); | ||
317 | 357 | ||
318 | #define ScsiResult(host_code, scsi_code) (((host_code) << 16) | scsi_code) | 358 | #define ScsiResult(host_code, scsi_code) (((host_code) << 16) | scsi_code) |
319 | #define HBA_EVENT_RSCN 5 | 359 | #define HBA_EVENT_RSCN 5 |
320 | #define HBA_EVENT_LINK_UP 2 | 360 | #define HBA_EVENT_LINK_UP 2 |
321 | #define HBA_EVENT_LINK_DOWN 3 | 361 | #define HBA_EVENT_LINK_DOWN 3 |
362 | |||