]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[SCSI] qla2xxx: Remove interrupt request bit check in the response processing path...
authorAnirban Chakraborty <anirban.chakraborty@qlogic.com>
Mon, 9 Feb 2009 04:50:11 +0000 (20:50 -0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Tue, 10 Feb 2009 16:15:19 +0000 (11:15 -0500)
Correct response-queue-0 processing by instructing the firmware
to run with interrupt-handshaking disabled, similarly to what is
now done for all non-0 response queues.  Since all
response-queues now run in the same mode, the driver no longer
needs the hot-path 'is-disabled-HCCR' test.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/qla2xxx/qla_mid.c

index a336b4bc81a7e50b5d1407ba249c0c5944615a6f..bce5b0435188673402384246be5dd7ecf3375ebc 100644 (file)
@@ -376,10 +376,8 @@ extern int qla2x00_dfs_remove(scsi_qla_host_t *);
 
 /* Globa function prototypes for multi-q */
 extern int qla25xx_request_irq(struct rsp_que *);
-extern int qla25xx_init_req_que(struct scsi_qla_host *, struct req_que *,
-       uint8_t);
-extern int qla25xx_init_rsp_que(struct scsi_qla_host *, struct rsp_que *,
-       uint8_t);
+extern int qla25xx_init_req_que(struct scsi_qla_host *, struct req_que *);
+extern int qla25xx_init_rsp_que(struct scsi_qla_host *, struct rsp_que *);
 extern int qla25xx_create_req_que(struct qla_hw_data *, uint16_t, uint8_t,
        uint16_t, uint8_t, uint8_t);
 extern int qla25xx_create_rsp_que(struct qla_hw_data *, uint16_t, uint8_t,
index f6368a1d3021e1e4e2f2c569d5742683cab61d47..986501759ad4910fa6b93c7db75d355001c47ad8 100644 (file)
@@ -1226,9 +1226,8 @@ qla24xx_config_rings(struct scsi_qla_host *vha)
                        icb->firmware_options_2 |=
                                __constant_cpu_to_le32(BIT_18);
 
-               icb->firmware_options_2 |= __constant_cpu_to_le32(BIT_22);
+               icb->firmware_options_2 &= __constant_cpu_to_le32(~BIT_22);
                icb->firmware_options_2 |= __constant_cpu_to_le32(BIT_23);
-               ha->rsp_q_map[0]->options = icb->firmware_options_2;
 
                WRT_REG_DWORD(&reg->isp25mq.req_q_in, 0);
                WRT_REG_DWORD(&reg->isp25mq.req_q_out, 0);
@@ -3493,7 +3492,7 @@ qla25xx_init_queues(struct qla_hw_data *ha)
                rsp = ha->rsp_q_map[i];
                if (rsp) {
                        rsp->options &= ~BIT_0;
-                       ret = qla25xx_init_rsp_que(base_vha, rsp, rsp->options);
+                       ret = qla25xx_init_rsp_que(base_vha, rsp);
                        if (ret != QLA_SUCCESS)
                                DEBUG2_17(printk(KERN_WARNING
                                        "%s Rsp que:%d init failed\n", __func__,
@@ -3507,7 +3506,7 @@ qla25xx_init_queues(struct qla_hw_data *ha)
                if (req) {
                /* Clear outstanding commands array. */
                        req->options &= ~BIT_0;
-                       ret = qla25xx_init_req_que(base_vha, req, req->options);
+                       ret = qla25xx_init_req_que(base_vha, req);
                        if (ret != QLA_SUCCESS)
                                DEBUG2_17(printk(KERN_WARNING
                                        "%s Req que:%d init failed\n", __func__,
index e28ad81baf1e09d84edcbfef99e1ce945c2264b3..b5554ea4693bb429a1cb10305c121fa662b57b3d 100644 (file)
@@ -1707,7 +1707,6 @@ qla25xx_msix_rsp_q(int irq, void *dev_id)
        struct qla_hw_data *ha;
        struct rsp_que *rsp;
        struct device_reg_24xx __iomem *reg;
-       uint16_t msix_disabled_hccr = 0;
 
        rsp = (struct rsp_que *) dev_id;
        if (!rsp) {
@@ -1720,17 +1719,8 @@ qla25xx_msix_rsp_q(int irq, void *dev_id)
 
        spin_lock_irq(&ha->hardware_lock);
 
-       msix_disabled_hccr = rsp->options;
-       if (!rsp->id)
-               msix_disabled_hccr &= __constant_cpu_to_le32(BIT_22);
-       else
-               msix_disabled_hccr &= __constant_cpu_to_le32(BIT_6);
-
        qla24xx_process_response_queue(rsp);
 
-       if (!msix_disabled_hccr)
-               WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT);
-
        spin_unlock_irq(&ha->hardware_lock);
 
        return IRQ_HANDLED;
index f94ffbb98e95f2a53918888ed76ebf235b3aa5cc..723cd37294c38aeccf56331ba5e6996c7f08d17c 100644 (file)
@@ -3090,8 +3090,7 @@ verify_done:
 }
 
 int
-qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req,
-       uint8_t options)
+qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req)
 {
        int rval;
        unsigned long flags;
@@ -3101,7 +3100,7 @@ qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req,
        struct qla_hw_data *ha = vha->hw;
 
        mcp->mb[0] = MBC_INITIALIZE_MULTIQ;
-       mcp->mb[1] = options;
+       mcp->mb[1] = req->options;
        mcp->mb[2] = MSW(LSD(req->dma));
        mcp->mb[3] = LSW(LSD(req->dma));
        mcp->mb[6] = MSW(MSD(req->dma));
@@ -3128,7 +3127,7 @@ qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req,
        mcp->tov = 60;
 
        spin_lock_irqsave(&ha->hardware_lock, flags);
-       if (!(options & BIT_0)) {
+       if (!(req->options & BIT_0)) {
                WRT_REG_DWORD(&reg->req_q_in, 0);
                WRT_REG_DWORD(&reg->req_q_out, 0);
        }
@@ -3142,8 +3141,7 @@ qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req,
 }
 
 int
-qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp,
-       uint8_t options)
+qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp)
 {
        int rval;
        unsigned long flags;
@@ -3153,7 +3151,7 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp,
        struct qla_hw_data *ha = vha->hw;
 
        mcp->mb[0] = MBC_INITIALIZE_MULTIQ;
-       mcp->mb[1] = options;
+       mcp->mb[1] = rsp->options;
        mcp->mb[2] = MSW(LSD(rsp->dma));
        mcp->mb[3] = LSW(LSD(rsp->dma));
        mcp->mb[6] = MSW(MSD(rsp->dma));
@@ -3178,7 +3176,7 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp,
        mcp->tov = 60;
 
        spin_lock_irqsave(&ha->hardware_lock, flags);
-       if (!(options & BIT_0)) {
+       if (!(rsp->options & BIT_0)) {
                WRT_REG_DWORD(&reg->rsp_q_out, 0);
                WRT_REG_DWORD(&reg->rsp_q_in, 0);
        }
index f53179c46423adb449c2480aa205bcd2b868c17a..d27ceda507910b030247eab428e5cca7721893e7 100644 (file)
@@ -471,7 +471,7 @@ qla25xx_delete_req_que(struct scsi_qla_host *vha, struct req_que *req)
 
        if (req) {
                req->options |= BIT_0;
-               ret = qla25xx_init_req_que(vha, req, req->options);
+               ret = qla25xx_init_req_que(vha, req);
        }
        if (ret == QLA_SUCCESS)
                qla25xx_free_req_que(vha, req);
@@ -486,7 +486,7 @@ qla25xx_delete_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp)
 
        if (rsp) {
                rsp->options |= BIT_0;
-               ret = qla25xx_init_rsp_que(vha, rsp, rsp->options);
+               ret = qla25xx_init_rsp_que(vha, rsp);
        }
        if (ret == QLA_SUCCESS)
                qla25xx_free_rsp_que(vha, rsp);
@@ -502,7 +502,7 @@ int qla25xx_update_req_que(struct scsi_qla_host *vha, uint8_t que, uint8_t qos)
 
        req->options |= BIT_3;
        req->qos = qos;
-       ret = qla25xx_init_req_que(vha, req, req->options);
+       ret = qla25xx_init_req_que(vha, req);
        if (ret != QLA_SUCCESS)
                DEBUG2_17(printk(KERN_WARNING "%s failed\n", __func__));
        /* restore options bit */
@@ -632,7 +632,7 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options,
        req->max_q_depth = ha->req_q_map[0]->max_q_depth;
        mutex_unlock(&ha->vport_lock);
 
-       ret = qla25xx_init_req_que(base_vha, req, options);
+       ret = qla25xx_init_req_que(base_vha, req);
        if (ret != QLA_SUCCESS) {
                qla_printk(KERN_WARNING, ha, "%s failed\n", __func__);
                mutex_lock(&ha->vport_lock);
@@ -710,7 +710,7 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options,
        if (ret)
                goto que_failed;
 
-       ret = qla25xx_init_rsp_que(base_vha, rsp, options);
+       ret = qla25xx_init_rsp_que(base_vha, rsp);
        if (ret != QLA_SUCCESS) {
                qla_printk(KERN_WARNING, ha, "%s failed\n", __func__);
                mutex_lock(&ha->vport_lock);