提交 0a504779 编写于 作者: G Greg Ungerer 提交者: Linus Torvalds

m68knommu: fix fec driver interrupt races

The FEC driver has a common interrupt handler for all interrupt event
types. It is raised on a number of distinct interrupt vectors.
This handler can't be re-entered while processing an interrupt, so
make sure all requested vectors are flagged as IRQF_DISABLED.
Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 e311f68a
...@@ -1253,7 +1253,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev) ...@@ -1253,7 +1253,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
/* Setup interrupt handlers. */ /* Setup interrupt handlers. */
for (idp = id; idp->name; idp++) { for (idp = id; idp->name; idp++) {
if (request_irq(idp->irq, idp->handler, 0, idp->name, dev) != 0) if (request_irq(idp->irq, idp->handler, IRQF_DISABLED, idp->name, dev) != 0)
printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, idp->irq); printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, idp->irq);
} }
...@@ -1382,7 +1382,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev) ...@@ -1382,7 +1382,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
/* Setup interrupt handlers. */ /* Setup interrupt handlers. */
for (idp = id; idp->name; idp++) { for (idp = id; idp->name; idp++) {
if (request_irq(b+idp->irq, fec_enet_interrupt, 0, idp->name, dev) != 0) if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name, dev) != 0)
printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq); printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq);
} }
...@@ -1553,7 +1553,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev) ...@@ -1553,7 +1553,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
/* Setup interrupt handlers. */ /* Setup interrupt handlers. */
for (idp = id; idp->name; idp++) { for (idp = id; idp->name; idp++) {
if (request_irq(b+idp->irq,fec_enet_interrupt,0,idp->name,dev)!=0) if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name,dev) != 0)
printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq); printk("FEC: Could not allocate %s IRQ(%d)!\n", idp->name, b+idp->irq);
} }
...@@ -1680,7 +1680,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev) ...@@ -1680,7 +1680,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
/* Setup interrupt handlers. */ /* Setup interrupt handlers. */
for (idp = id; idp->name; idp++) { for (idp = id; idp->name; idp++) {
if (request_irq(b+idp->irq,fec_enet_interrupt,0,idp->name,dev)!=0) if (request_irq(b+idp->irq, fec_enet_interrupt, IRQF_DISABLED, idp->name,dev) != 0)
printk("FEC: Could not allocate %s IRQ(%d)!\n", printk("FEC: Could not allocate %s IRQ(%d)!\n",
idp->name, b+idp->irq); idp->name, b+idp->irq);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册