diff options
author | Anirban Chakraborty <anirban.chakraborty@qlogic.com> | 2008-12-09 19:45:39 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 12:24:33 -0500 |
commit | 73208dfd7ab19f379d73e8a0fbf30f92c203e5e8 (patch) | |
tree | f69be5e89817d17b066ece4dbe04e395339c0754 /drivers/scsi/qla2xxx/qla_gbl.h | |
parent | 85b4aa4926a50210b683ac89326e338e7d131211 (diff) |
[SCSI] qla2xxx: add support for multi-queue adapter
Following changes have been made.
1. qla_hw_data structure holds an array for request queue pointers,
and an array for response queue pointers.
2. The base request and response queues are created by default.
3. Additional request and response queues are created at the time of vport
creation. If queue resources are exhausted during vport creation, newly
created vports use the default queue.
4. Requests are sent to the request queue that the vport was assigned
in the beginning.
5. Responses are completed on the response queue with which the request queue
is associated with.
[fixup memcpy argument reversal spotted by davej@redhat.com]
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_gbl.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index c0cc686d6cc3..d9712b543493 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -63,6 +63,7 @@ extern int ql2xallocfwdump; | |||
63 | extern int ql2xextended_error_logging; | 63 | extern int ql2xextended_error_logging; |
64 | extern int ql2xqfullrampup; | 64 | extern int ql2xqfullrampup; |
65 | extern int ql2xiidmaenable; | 65 | extern int ql2xiidmaenable; |
66 | extern int ql2xmaxqueues; | ||
66 | 67 | ||
67 | extern int qla2x00_loop_reset(scsi_qla_host_t *); | 68 | extern int qla2x00_loop_reset(scsi_qla_host_t *); |
68 | extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); | 69 | extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); |
@@ -97,7 +98,7 @@ extern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *); | |||
97 | extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *); | 98 | extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *); |
98 | extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *); | 99 | extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *); |
99 | 100 | ||
100 | extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *); | 101 | extern void qla2x00_sp_compl(struct qla_hw_data *, srb_t *); |
101 | 102 | ||
102 | extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); | 103 | extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); |
103 | 104 | ||
@@ -109,8 +110,9 @@ extern struct fw_blob *qla2x00_request_firmware(scsi_qla_host_t *); | |||
109 | extern int qla2x00_wait_for_hba_online(scsi_qla_host_t *); | 110 | extern int qla2x00_wait_for_hba_online(scsi_qla_host_t *); |
110 | 111 | ||
111 | extern void qla2xxx_wake_dpc(struct scsi_qla_host *); | 112 | extern void qla2xxx_wake_dpc(struct scsi_qla_host *); |
112 | extern void qla2x00_alert_all_vps(struct qla_hw_data *, uint16_t *); | 113 | extern void qla2x00_alert_all_vps(struct rsp_que *, uint16_t *); |
113 | extern void qla2x00_async_event(scsi_qla_host_t *, uint16_t *); | 114 | extern void qla2x00_async_event(scsi_qla_host_t *, struct rsp_que *, |
115 | uint16_t *); | ||
114 | extern int qla2x00_vp_abort_isp(scsi_qla_host_t *); | 116 | extern int qla2x00_vp_abort_isp(scsi_qla_host_t *); |
115 | 117 | ||
116 | /* | 118 | /* |
@@ -122,8 +124,10 @@ extern void qla2x00_build_scsi_iocbs_32(srb_t *, cmd_entry_t *, uint16_t); | |||
122 | extern void qla2x00_build_scsi_iocbs_64(srb_t *, cmd_entry_t *, uint16_t); | 124 | extern void qla2x00_build_scsi_iocbs_64(srb_t *, cmd_entry_t *, uint16_t); |
123 | extern int qla2x00_start_scsi(srb_t *sp); | 125 | extern int qla2x00_start_scsi(srb_t *sp); |
124 | extern int qla24xx_start_scsi(srb_t *sp); | 126 | extern int qla24xx_start_scsi(srb_t *sp); |
125 | int qla2x00_marker(scsi_qla_host_t *, uint16_t, uint16_t, uint8_t); | 127 | int qla2x00_marker(struct scsi_qla_host *, struct req_que *, struct rsp_que *, |
126 | int __qla2x00_marker(scsi_qla_host_t *, uint16_t, uint16_t, uint8_t); | 128 | uint16_t, uint16_t, uint8_t); |
129 | int __qla2x00_marker(struct scsi_qla_host *, struct req_que *, struct rsp_que *, | ||
130 | uint16_t, uint16_t, uint8_t); | ||
127 | 131 | ||
128 | /* | 132 | /* |
129 | * Global Function Prototypes in qla_mbx.c source file. | 133 | * Global Function Prototypes in qla_mbx.c source file. |
@@ -157,7 +161,7 @@ extern int | |||
157 | qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t); | 161 | qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t); |
158 | 162 | ||
159 | extern int | 163 | extern int |
160 | qla2x00_abort_command(scsi_qla_host_t *, srb_t *); | 164 | qla2x00_abort_command(scsi_qla_host_t *, srb_t *, struct req_que *); |
161 | 165 | ||
162 | extern int | 166 | extern int |
163 | qla2x00_abort_target(struct fc_port *, unsigned int); | 167 | qla2x00_abort_target(struct fc_port *, unsigned int); |
@@ -228,7 +232,7 @@ extern int | |||
228 | qla24xx_get_isp_stats(scsi_qla_host_t *, struct link_statistics *, | 232 | qla24xx_get_isp_stats(scsi_qla_host_t *, struct link_statistics *, |
229 | dma_addr_t); | 233 | dma_addr_t); |
230 | 234 | ||
231 | extern int qla24xx_abort_command(scsi_qla_host_t *, srb_t *); | 235 | extern int qla24xx_abort_command(scsi_qla_host_t *, srb_t *, struct req_que *); |
232 | extern int qla24xx_abort_target(struct fc_port *, unsigned int); | 236 | extern int qla24xx_abort_target(struct fc_port *, unsigned int); |
233 | extern int qla24xx_lun_reset(struct fc_port *, unsigned int); | 237 | extern int qla24xx_lun_reset(struct fc_port *, unsigned int); |
234 | 238 | ||
@@ -267,10 +271,10 @@ extern int qla84xx_verify_chip(struct scsi_qla_host *, uint16_t *); | |||
267 | extern irqreturn_t qla2100_intr_handler(int, void *); | 271 | extern irqreturn_t qla2100_intr_handler(int, void *); |
268 | extern irqreturn_t qla2300_intr_handler(int, void *); | 272 | extern irqreturn_t qla2300_intr_handler(int, void *); |
269 | extern irqreturn_t qla24xx_intr_handler(int, void *); | 273 | extern irqreturn_t qla24xx_intr_handler(int, void *); |
270 | extern void qla2x00_process_response_queue(struct scsi_qla_host *); | 274 | extern void qla2x00_process_response_queue(struct rsp_que *); |
271 | extern void qla24xx_process_response_queue(struct scsi_qla_host *); | 275 | extern void qla24xx_process_response_queue(struct rsp_que *); |
272 | 276 | ||
273 | extern int qla2x00_request_irqs(struct qla_hw_data *); | 277 | extern int qla2x00_request_irqs(struct qla_hw_data *, struct rsp_que *); |
274 | extern void qla2x00_free_irqs(scsi_qla_host_t *); | 278 | extern void qla2x00_free_irqs(scsi_qla_host_t *); |
275 | 279 | ||
276 | /* | 280 | /* |
@@ -370,4 +374,21 @@ extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *); | |||
370 | */ | 374 | */ |
371 | extern int qla2x00_dfs_setup(scsi_qla_host_t *); | 375 | extern int qla2x00_dfs_setup(scsi_qla_host_t *); |
372 | extern int qla2x00_dfs_remove(scsi_qla_host_t *); | 376 | extern int qla2x00_dfs_remove(scsi_qla_host_t *); |
377 | |||
378 | /* Globa function prototypes for multi-q */ | ||
379 | extern int qla25xx_request_irq(struct rsp_que *); | ||
380 | extern int qla25xx_init_req_que(struct scsi_qla_host *, struct req_que *, | ||
381 | uint8_t); | ||
382 | extern int qla25xx_init_rsp_que(struct scsi_qla_host *, struct rsp_que *, | ||
383 | uint8_t); | ||
384 | extern int qla25xx_create_req_que(struct qla_hw_data *, uint16_t, uint8_t, | ||
385 | uint16_t, uint8_t, uint8_t); | ||
386 | extern int qla25xx_create_rsp_que(struct qla_hw_data *, uint16_t, uint8_t, | ||
387 | uint16_t); | ||
388 | extern int qla25xx_update_req_que(struct scsi_qla_host *, uint8_t, uint8_t); | ||
389 | extern void qla2x00_init_response_q_entries(struct rsp_que *); | ||
390 | extern int qla25xx_delete_req_que(struct scsi_qla_host *, struct req_que *); | ||
391 | extern int qla25xx_delete_rsp_que(struct scsi_qla_host *, struct rsp_que *); | ||
392 | extern int qla25xx_create_queues(struct scsi_qla_host *, uint8_t); | ||
393 | extern int qla25xx_delete_queues(struct scsi_qla_host *, uint8_t); | ||
373 | #endif /* _QLA_GBL_H */ | 394 | #endif /* _QLA_GBL_H */ |