Преглед на файлове

[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 години
родител
ревизия
f122515515
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4
    4
      src/drivers/net/forcedeth.c

+ 4
- 4
src/drivers/net/forcedeth.c Целия файл

@@ -990,6 +990,10 @@ forcedeth_poll ( struct net_device *netdev )
990 990
 
991 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 997
 	/* Clear interrupts */
994 998
 	writel ( NVREG_IRQSTAT_MASK, ioaddr + NvRegIrqStatus );
995 999
 
@@ -1000,10 +1004,6 @@ forcedeth_poll ( struct net_device *netdev )
1000 1004
 	if ( ( status & NVREG_IRQ_LINK ) || ! ( netdev_link_ok ( netdev ) ) )
1001 1005
 		forcedeth_link_status ( netdev );
1002 1006
 
1003
-	/* Return when no interrupts have been triggered */
1004
-	if ( ! status )
1005
-		return;
1006
-
1007 1007
 	/* Process transmitted packets */
1008 1008
 	nv_process_tx_packets ( netdev );
1009 1009
 

Loading…
Отказ
Запис