Title: [6497] trunk/drivers/net/bfin_mac.c: netdev feedback from David Miller: Revert to IRQF_SHARED or explain.
Revision
6497
Author
hennerich
Date
2009-05-29 04:42:37 -0500 (Fri, 29 May 2009)

Log Message

netdev feedback from David Miller: Revert to IRQF_SHARED or explain.

Let's do both 

The Blackfin MAC DMA RX interrupt is a dedicated internal systems
interrupt there is now way it can be SHARED with anything else in the
system. In case this interrupt triggers we know its origin. For no
reason we set the IRQF_SHARED flag so that CONFIG_DEBUG_SHIRQ will bug
us here.

Check the source of the interrupt in bfin_mac_interrupt ISR and return
IRQ_NONE if applicable.

Modified Paths

Diff

Modified: trunk/drivers/net/bfin_mac.c (6496 => 6497)


--- trunk/drivers/net/bfin_mac.c	2009-05-29 09:16:26 UTC (rev 6496)
+++ trunk/drivers/net/bfin_mac.c	2009-05-29 09:42:37 UTC (rev 6497)
@@ -720,6 +720,9 @@
 	struct net_device *dev = dev_id;
 	int number = 0;
 
+	if (!(bfin_read_DMA1_IRQ_STATUS() & (DMA_DONE | DMA_ERR)))
+		return IRQ_NONE;
+
 get_one_packet:
 	if (current_rx_ptr->status.status_word == 0) {
 		/* no more new packet received */
@@ -729,8 +732,7 @@
 				goto real_rx;
 			}
 		}
-		bfin_write_DMA1_IRQ_STATUS(bfin_read_DMA1_IRQ_STATUS() |
-					   DMA_DONE | DMA_ERR);
+		bfin_write_DMA1_IRQ_STATUS(DMA_DONE | DMA_ERR);
 		return IRQ_HANDLED;
 	}
 
@@ -1041,7 +1043,7 @@
 	/* now, enable interrupts */
 	/* register irq handler */
 	rc = request_irq(IRQ_MAC_RX, bfin_mac_interrupt,
-			IRQF_DISABLED, "EMAC_RX", ndev);
+			IRQF_DISABLED | IRQF_SHARED, "EMAC_RX", ndev);
 	if (rc) {
 		dev_err(&pdev->dev, "Cannot request Blackfin MAC RX IRQ!\n");
 		rc = -EBUSY;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to