]> err.no Git - linux-2.6/commitdiff
[SCSI] aacraid: sa race condition fix
authorMark Haverkamp <markh@osdl.org>
Wed, 10 May 2006 16:13:11 +0000 (09:13 -0700)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 20 May 2006 14:22:44 +0000 (09:22 -0500)
Received From Mark Salyzyn

A race condition existed that could result in a lost completion of a
command to the ppc based cards.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aacraid/sa.c

index ecc47b605c583b6dbf9b3a87234eaeac64e7e75f..88d400fccc94eee64ee797f234b88f667b4934ad 100644 (file)
@@ -66,11 +66,11 @@ static irqreturn_t aac_sa_intr(int irq, void *dev_id, struct pt_regs *regs)
                        sa_writew(dev, DoorbellClrReg_p, PrintfReady); /* clear PrintfReady */
                        sa_writew(dev, DoorbellReg_s, PrintfDone);
                } else if (intstat & DOORBELL_1) {      // dev -> Host Normal Command Ready
-                       aac_command_normal(&dev->queues->queue[HostNormCmdQueue]);
                        sa_writew(dev, DoorbellClrReg_p, DOORBELL_1);
+                       aac_command_normal(&dev->queues->queue[HostNormCmdQueue]);
                } else if (intstat & DOORBELL_2) {      // dev -> Host Normal Response Ready
-                       aac_response_normal(&dev->queues->queue[HostNormRespQueue]);
                        sa_writew(dev, DoorbellClrReg_p, DOORBELL_2);
+                       aac_response_normal(&dev->queues->queue[HostNormRespQueue]);
                } else if (intstat & DOORBELL_3) {      // dev -> Host Normal Command Not Full
                        sa_writew(dev, DoorbellClrReg_p, DOORBELL_3);
                } else if (intstat & DOORBELL_4) {      // dev -> Host Normal Response Not Full