Browse Source

[forcedeth] Exit poll() as early as possible if no work to do

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
f122515515
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      src/drivers/net/forcedeth.c

+ 4
- 4
src/drivers/net/forcedeth.c View File

990
 
990
 
991
 	status = readl ( ioaddr + NvRegIrqStatus ) & NVREG_IRQSTAT_MASK;
991
 	status = readl ( ioaddr + NvRegIrqStatus ) & NVREG_IRQSTAT_MASK;
992
 
992
 
993
+	/* Return when no interrupts have been triggered */
994
+	if ( ! status )
995
+		return;
996
+
993
 	/* Clear interrupts */
997
 	/* Clear interrupts */
994
 	writel ( NVREG_IRQSTAT_MASK, ioaddr + NvRegIrqStatus );
998
 	writel ( NVREG_IRQSTAT_MASK, ioaddr + NvRegIrqStatus );
995
 
999
 
1000
 	if ( ( status & NVREG_IRQ_LINK ) || ! ( netdev_link_ok ( netdev ) ) )
1004
 	if ( ( status & NVREG_IRQ_LINK ) || ! ( netdev_link_ok ( netdev ) ) )
1001
 		forcedeth_link_status ( netdev );
1005
 		forcedeth_link_status ( netdev );
1002
 
1006
 
1003
-	/* Return when no interrupts have been triggered */
1004
-	if ( ! status )
1005
-		return;
1006
-
1007
 	/* Process transmitted packets */
1007
 	/* Process transmitted packets */
1008
 	nv_process_tx_packets ( netdev );
1008
 	nv_process_tx_packets ( netdev );
1009
 
1009
 

Loading…
Cancel
Save