From: Anirban Chakraborty Date: Wed, 16 Dec 2009 05:29:45 +0000 (-0800) Subject: [SCSI] qla2xxx: Fix for a multiqueue bug in CPU affinity mode X-Git-Tag: v2.6.33-rc4~82^2~11 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=5c66f5d193f68c2a7da0f2ad3535ed30ab14307b;p=net-next-2.6.git [SCSI] qla2xxx: Fix for a multiqueue bug in CPU affinity mode 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 Signed-off-by: Giridhar Malavali Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 2a4c7f4e7b6..b901aa267e7 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c @@ -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 */