diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2009-03-24 09:07:55 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 09:22:44 -0500 |
commit | 08029990b25b76b1bc167336358bd21812567f2a (patch) | |
tree | 87cb617366a61bd643818996cc6186e817e23b63 /drivers/scsi/qla2xxx/qla_mid.c | |
parent | 534841b3c110b0f149513c7695751879951d3f22 (diff) | |
download | kernel_goldelico_gta04-08029990b25b76b1bc167336358bd21812567f2a.zip kernel_goldelico_gta04-08029990b25b76b1bc167336358bd21812567f2a.tar.gz kernel_goldelico_gta04-08029990b25b76b1bc167336358bd21812567f2a.tar.bz2 |
[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_mid.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 785c612..e2bd36e 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c @@ -584,6 +584,7 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, struct req_que *req = NULL; struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); uint16_t que_id = 0; + device_reg_t __iomem *reg; req = kzalloc(sizeof(struct req_que), GFP_KERNEL); if (req == NULL) { @@ -631,6 +632,9 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, req->ring_index = 0; req->cnt = req->length; req->id = que_id; + reg = ISP_QUE_REG(ha, que_id); + req->req_q_in = ®->isp25mq.req_q_in; + req->req_q_out = ®->isp25mq.req_q_out; req->max_q_depth = ha->req_q_map[0]->max_q_depth; mutex_unlock(&ha->vport_lock); @@ -658,7 +662,8 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, int ret = 0; struct rsp_que *rsp = NULL; struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); - uint16_t que_id = 0;; + uint16_t que_id = 0; + device_reg_t __iomem *reg; rsp = kzalloc(sizeof(struct rsp_que), GFP_KERNEL); if (rsp == NULL) { @@ -706,6 +711,9 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, rsp->ring_ptr = rsp->ring; rsp->ring_index = 0; rsp->id = que_id; + reg = ISP_QUE_REG(ha, que_id); + rsp->rsp_q_in = ®->isp25mq.rsp_q_in; + rsp->rsp_q_out = ®->isp25mq.rsp_q_out; mutex_unlock(&ha->vport_lock); ret = qla25xx_request_irq(rsp); |