[Prism54-devel] [PATCH] fix for request_irq/interrupt race

Denis Vlasenko vda@port.imtp.ilyichevsk.odessa.ua
Thu, 26 Feb 2004 21:20:27 +0200


--Boundary-00=_7bkPA8q1yPJDlLH
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Bugzilla is out of reach for me, seems like my ISP lost uplink :(
Will try to put patch there too, but in meantime:

This patch fixes an oops happening when card has interrupts
pending at modprobe time. Details at

http://prism54.org/cgi-bin/bugzilla/show_bug.cgi?id=60

Patch is run-tested.
--
vda

--Boundary-00=_7bkPA8q1yPJDlLH
Content-Type: text/x-diff;
  charset="us-ascii";
  name="!prism54_islpci_hotplug.c.intr_fix.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="!prism54_islpci_hotplug.c.intr_fix.diff"

--- prism54/islpci_hotplug.c.old	Tue Feb 10 01:29:02 2004
+++ prism54/islpci_hotplug.c	Thu Feb 26 21:05:14 2004
@@ -220,8 +220,10 @@
 	priv = ndev->priv;
 	islpci_set_state(priv, PRV_STATE_PREBOOT); /* we are attempting to boot */
 
-	/* request for the interrupt before uploading the firmware */
+	/* card is in unknown state yet, might have some interrupts pending */
+	isl38xx_disable_interrupts(priv->device_base);
 
+	/* request for the interrupt before uploading the firmware */
 	rvalue = request_irq(pdev->irq, &islpci_interrupt,
 			     SA_SHIRQ, ndev->name, priv);
 

--Boundary-00=_7bkPA8q1yPJDlLH--