[SCSI] qla2xxx: Fix for a multiqueue bug in CPU affinity mode
authorAnirban Chakraborty <anirban.chakraborty@qlogic.com>
Wed, 16 Dec 2009 05:29:45 +0000 (21:29 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 30 Dec 2009 17:09:47 +0000 (11:09 -0600)
Hold the hardware lock while do the response completion in work queue threads as
it involves sharing a common request queue among multiple threads.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_mid.c

index 2a4c7f4..b901aa2 100644 (file)
@@ -639,8 +639,10 @@ static void qla_do_work(struct work_struct *work)
        struct rsp_que *rsp = container_of(work, struct rsp_que, q_work);
        struct scsi_qla_host *vha;
 
+       spin_lock_irq(&rsp->hw->hardware_lock);
        vha = qla25xx_get_host(rsp);
        qla24xx_process_response_queue(vha, rsp);
+       spin_unlock_irq(&rsp->hw->hardware_lock);
 }
 
 /* create response queue */