]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[forcedeth] Exit poll() as early as possible if no work to do
authorMichael Brown <mcb30@ipxe.org>
Thu, 11 Nov 2010 23:57:10 +0000 (23:57 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 11 Nov 2010 23:57:10 +0000 (23:57 +0000)
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/forcedeth.c

index cce7cd1ec0bb9be8129ce4817a46d4d8e46dbec3..26bbdc8d0e48cc34900db4cf28764027114d8511 100644 (file)
@@ -990,6 +990,10 @@ forcedeth_poll ( struct net_device *netdev )
 
        status = readl ( ioaddr + NvRegIrqStatus ) & NVREG_IRQSTAT_MASK;
 
+       /* Return when no interrupts have been triggered */
+       if ( ! status )
+               return;
+
        /* Clear interrupts */
        writel ( NVREG_IRQSTAT_MASK, ioaddr + NvRegIrqStatus );
 
@@ -1000,10 +1004,6 @@ forcedeth_poll ( struct net_device *netdev )
        if ( ( status & NVREG_IRQ_LINK ) || ! ( netdev_link_ok ( netdev ) ) )
                forcedeth_link_status ( netdev );
 
-       /* Return when no interrupts have been triggered */
-       if ( ! status )
-               return;
-
        /* Process transmitted packets */
        nv_process_tx_packets ( netdev );