aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_def.h
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-03-24 12:07:55 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-03 10:22:44 -0400
commit08029990b25b76b1bc167336358bd21812567f2a (patch)
tree87cb617366a61bd643818996cc6186e817e23b63 /drivers/scsi/qla2xxx/qla_def.h
parent534841b3c110b0f149513c7695751879951d3f22 (diff)
[SCSI] qla2xxx: Refactor request/response-queue register handling.
Original code used an overabundance of indirect pointers to function helpers. Instead, the driver can exploit the immutable properties of a queue's ISP-association and ID, which are both known at queue initialization-time. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index e0c5bb54b258..c2bc67c42648 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -372,10 +372,10 @@ struct device_reg_2xxx {
372}; 372};
373 373
374struct device_reg_25xxmq { 374struct device_reg_25xxmq {
375 volatile uint32_t req_q_in; 375 uint32_t req_q_in;
376 volatile uint32_t req_q_out; 376 uint32_t req_q_out;
377 volatile uint32_t rsp_q_in; 377 uint32_t rsp_q_in;
378 volatile uint32_t rsp_q_out; 378 uint32_t rsp_q_out;
379}; 379};
380 380
381typedef union { 381typedef union {
@@ -2102,9 +2102,6 @@ struct isp_operations {
2102 2102
2103 int (*get_flash_version) (struct scsi_qla_host *, void *); 2103 int (*get_flash_version) (struct scsi_qla_host *, void *);
2104 int (*start_scsi) (srb_t *); 2104 int (*start_scsi) (srb_t *);
2105 void (*wrt_req_reg) (struct qla_hw_data *, uint16_t, uint16_t);
2106 void (*wrt_rsp_reg) (struct qla_hw_data *, uint16_t, uint16_t);
2107 uint16_t (*rd_req_reg) (struct qla_hw_data *, uint16_t);
2108}; 2105};
2109 2106
2110/* MSI-X Support *************************************************************/ 2107/* MSI-X Support *************************************************************/
@@ -2200,6 +2197,8 @@ struct rsp_que {
2200 dma_addr_t dma; 2197 dma_addr_t dma;
2201 response_t *ring; 2198 response_t *ring;
2202 response_t *ring_ptr; 2199 response_t *ring_ptr;
2200 uint32_t __iomem *rsp_q_in; /* FWI2-capable only. */
2201 uint32_t __iomem *rsp_q_out;
2203 uint16_t ring_index; 2202 uint16_t ring_index;
2204 uint16_t out_ptr; 2203 uint16_t out_ptr;
2205 uint16_t length; 2204 uint16_t length;
@@ -2217,6 +2216,8 @@ struct req_que {
2217 dma_addr_t dma; 2216 dma_addr_t dma;
2218 request_t *ring; 2217 request_t *ring;
2219 request_t *ring_ptr; 2218 request_t *ring_ptr;
2219 uint32_t __iomem *req_q_in; /* FWI2-capable only. */
2220 uint32_t __iomem *req_q_out;
2220 uint16_t ring_index; 2221 uint16_t ring_index;
2221 uint16_t in_ptr; 2222 uint16_t in_ptr;
2222 uint16_t cnt; 2223 uint16_t cnt;
@@ -2277,7 +2278,7 @@ struct qla_hw_data {
2277 2278
2278#define MIN_IOBASE_LEN 0x100 2279#define MIN_IOBASE_LEN 0x100
2279/* Multi queue data structs */ 2280/* Multi queue data structs */
2280 device_reg_t *mqiobase; 2281 device_reg_t __iomem *mqiobase;
2281 uint16_t msix_count; 2282 uint16_t msix_count;
2282 uint8_t mqenable; 2283 uint8_t mqenable;
2283 struct req_que **req_q_map; 2284 struct req_que **req_q_map;