aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_gbl.h
diff options
context:
space:
mode:
authorAnirban Chakraborty <anirban.chakraborty@qlogic.com>2008-12-09 19:45:39 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 12:24:33 -0500
commit73208dfd7ab19f379d73e8a0fbf30f92c203e5e8 (patch)
treef69be5e89817d17b066ece4dbe04e395339c0754 /drivers/scsi/qla2xxx/qla_gbl.h
parent85b4aa4926a50210b683ac89326e338e7d131211 (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.h41
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;
63extern int ql2xextended_error_logging; 63extern int ql2xextended_error_logging;
64extern int ql2xqfullrampup; 64extern int ql2xqfullrampup;
65extern int ql2xiidmaenable; 65extern int ql2xiidmaenable;
66extern int ql2xmaxqueues;
66 67
67extern int qla2x00_loop_reset(scsi_qla_host_t *); 68extern int qla2x00_loop_reset(scsi_qla_host_t *);
68extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); 69extern 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 *);
97extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *); 98extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *);
98extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *); 99extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *);
99 100
100extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *); 101extern void qla2x00_sp_compl(struct qla_hw_data *, srb_t *);
101 102
102extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); 103extern 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 *);
109extern int qla2x00_wait_for_hba_online(scsi_qla_host_t *); 110extern int qla2x00_wait_for_hba_online(scsi_qla_host_t *);
110 111
111extern void qla2xxx_wake_dpc(struct scsi_qla_host *); 112extern void qla2xxx_wake_dpc(struct scsi_qla_host *);
112extern void qla2x00_alert_all_vps(struct qla_hw_data *, uint16_t *); 113extern void qla2x00_alert_all_vps(struct rsp_que *, uint16_t *);
113extern void qla2x00_async_event(scsi_qla_host_t *, uint16_t *); 114extern void qla2x00_async_event(scsi_qla_host_t *, struct rsp_que *,
115 uint16_t *);
114extern int qla2x00_vp_abort_isp(scsi_qla_host_t *); 116extern 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);
122extern void qla2x00_build_scsi_iocbs_64(srb_t *, cmd_entry_t *, uint16_t); 124extern void qla2x00_build_scsi_iocbs_64(srb_t *, cmd_entry_t *, uint16_t);
123extern int qla2x00_start_scsi(srb_t *sp); 125extern int qla2x00_start_scsi(srb_t *sp);
124extern int qla24xx_start_scsi(srb_t *sp); 126extern int qla24xx_start_scsi(srb_t *sp);
125int qla2x00_marker(scsi_qla_host_t *, uint16_t, uint16_t, uint8_t); 127int qla2x00_marker(struct scsi_qla_host *, struct req_que *, struct rsp_que *,
126int __qla2x00_marker(scsi_qla_host_t *, uint16_t, uint16_t, uint8_t); 128 uint16_t, uint16_t, uint8_t);
129int __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
157qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t); 161qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t);
158 162
159extern int 163extern int
160qla2x00_abort_command(scsi_qla_host_t *, srb_t *); 164qla2x00_abort_command(scsi_qla_host_t *, srb_t *, struct req_que *);
161 165
162extern int 166extern int
163qla2x00_abort_target(struct fc_port *, unsigned int); 167qla2x00_abort_target(struct fc_port *, unsigned int);
@@ -228,7 +232,7 @@ extern int
228qla24xx_get_isp_stats(scsi_qla_host_t *, struct link_statistics *, 232qla24xx_get_isp_stats(scsi_qla_host_t *, struct link_statistics *,
229 dma_addr_t); 233 dma_addr_t);
230 234
231extern int qla24xx_abort_command(scsi_qla_host_t *, srb_t *); 235extern int qla24xx_abort_command(scsi_qla_host_t *, srb_t *, struct req_que *);
232extern int qla24xx_abort_target(struct fc_port *, unsigned int); 236extern int qla24xx_abort_target(struct fc_port *, unsigned int);
233extern int qla24xx_lun_reset(struct fc_port *, unsigned int); 237extern 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 *);
267extern irqreturn_t qla2100_intr_handler(int, void *); 271extern irqreturn_t qla2100_intr_handler(int, void *);
268extern irqreturn_t qla2300_intr_handler(int, void *); 272extern irqreturn_t qla2300_intr_handler(int, void *);
269extern irqreturn_t qla24xx_intr_handler(int, void *); 273extern irqreturn_t qla24xx_intr_handler(int, void *);
270extern void qla2x00_process_response_queue(struct scsi_qla_host *); 274extern void qla2x00_process_response_queue(struct rsp_que *);
271extern void qla24xx_process_response_queue(struct scsi_qla_host *); 275extern void qla24xx_process_response_queue(struct rsp_que *);
272 276
273extern int qla2x00_request_irqs(struct qla_hw_data *); 277extern int qla2x00_request_irqs(struct qla_hw_data *, struct rsp_que *);
274extern void qla2x00_free_irqs(scsi_qla_host_t *); 278extern 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 */
371extern int qla2x00_dfs_setup(scsi_qla_host_t *); 375extern int qla2x00_dfs_setup(scsi_qla_host_t *);
372extern int qla2x00_dfs_remove(scsi_qla_host_t *); 376extern int qla2x00_dfs_remove(scsi_qla_host_t *);
377
378/* Globa function prototypes for multi-q */
379extern int qla25xx_request_irq(struct rsp_que *);
380extern int qla25xx_init_req_que(struct scsi_qla_host *, struct req_que *,
381 uint8_t);
382extern int qla25xx_init_rsp_que(struct scsi_qla_host *, struct rsp_que *,
383 uint8_t);
384extern int qla25xx_create_req_que(struct qla_hw_data *, uint16_t, uint8_t,
385 uint16_t, uint8_t, uint8_t);
386extern int qla25xx_create_rsp_que(struct qla_hw_data *, uint16_t, uint8_t,
387 uint16_t);
388extern int qla25xx_update_req_que(struct scsi_qla_host *, uint8_t, uint8_t);
389extern void qla2x00_init_response_q_entries(struct rsp_que *);
390extern int qla25xx_delete_req_que(struct scsi_qla_host *, struct req_que *);
391extern int qla25xx_delete_rsp_que(struct scsi_qla_host *, struct rsp_que *);
392extern int qla25xx_create_queues(struct scsi_qla_host *, uint8_t);
393extern int qla25xx_delete_queues(struct scsi_qla_host *, uint8_t);
373#endif /* _QLA_GBL_H */ 394#endif /* _QLA_GBL_H */