qla2xxx: ISP25xx multiqueue shadow register crash fix.
authorJoe Carnuccio <joe.carnuccio@qlogic.com>
Thu, 25 Sep 2014 09:16:39 +0000 (05:16 -0400)
committerChristoph Hellwig <hch@lst.de>
Thu, 25 Sep 2014 12:25:02 +0000 (14:25 +0200)
When creating request/response queues from qla25xx_setup_mode(),
the shadow index register pointers were not being initialized
to point at the registers.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/qla2xxx/qla_mid.c

index 89998244f48d30782dc51db46ce49dee06dd28c9..5c2e0317f1c0a31e408f89788536352c19c4c7fa 100644 (file)
@@ -702,6 +702,7 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options,
        req->req_q_in = &reg->isp25mq.req_q_in;
        req->req_q_out = &reg->isp25mq.req_q_out;
        req->max_q_depth = ha->req_q_map[0]->max_q_depth;
+       req->out_ptr = (void *)(req->ring + req->length);
        mutex_unlock(&ha->vport_lock);
        ql_dbg(ql_dbg_multiq, base_vha, 0xc004,
            "ring_ptr=%p ring_index=%d, "
@@ -811,6 +812,7 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options,
        reg = ISP_QUE_REG(ha, que_id);
        rsp->rsp_q_in = &reg->isp25mq.rsp_q_in;
        rsp->rsp_q_out = &reg->isp25mq.rsp_q_out;
+       rsp->in_ptr = (void *)(rsp->ring + rsp->length);
        mutex_unlock(&ha->vport_lock);
        ql_dbg(ql_dbg_multiq, base_vha, 0xc00b,
            "options=%x id=%d rsp_q_in=%p rsp_q_out=%p",