From 08029990b25b76b1bc167336358bd21812567f2a Mon Sep 17 00:00:00 2001 From: Andrew Vasquez Date: Tue, 24 Mar 2009 09:07:55 -0700 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/qla2xxx/qla_def.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'drivers/scsi/qla2xxx/qla_def.h') 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 { }; struct device_reg_25xxmq { - volatile uint32_t req_q_in; - volatile uint32_t req_q_out; - volatile uint32_t rsp_q_in; - volatile uint32_t rsp_q_out; + uint32_t req_q_in; + uint32_t req_q_out; + uint32_t rsp_q_in; + uint32_t rsp_q_out; }; typedef union { @@ -2102,9 +2102,6 @@ struct isp_operations { int (*get_flash_version) (struct scsi_qla_host *, void *); int (*start_scsi) (srb_t *); - void (*wrt_req_reg) (struct qla_hw_data *, uint16_t, uint16_t); - void (*wrt_rsp_reg) (struct qla_hw_data *, uint16_t, uint16_t); - uint16_t (*rd_req_reg) (struct qla_hw_data *, uint16_t); }; /* MSI-X Support *************************************************************/ @@ -2200,6 +2197,8 @@ struct rsp_que { dma_addr_t dma; response_t *ring; response_t *ring_ptr; + uint32_t __iomem *rsp_q_in; /* FWI2-capable only. */ + uint32_t __iomem *rsp_q_out; uint16_t ring_index; uint16_t out_ptr; uint16_t length; @@ -2217,6 +2216,8 @@ struct req_que { dma_addr_t dma; request_t *ring; request_t *ring_ptr; + uint32_t __iomem *req_q_in; /* FWI2-capable only. */ + uint32_t __iomem *req_q_out; uint16_t ring_index; uint16_t in_ptr; uint16_t cnt; @@ -2277,7 +2278,7 @@ struct qla_hw_data { #define MIN_IOBASE_LEN 0x100 /* Multi queue data structs */ - device_reg_t *mqiobase; + device_reg_t __iomem *mqiobase; uint16_t msix_count; uint8_t mqenable; struct req_que **req_q_map; -- cgit v1.2.2