From: Michael Brown Date: Thu, 11 Nov 2010 23:57:10 +0000 (+0000) Subject: [forcedeth] Exit poll() as early as possible if no work to do X-Git-Tag: v1.20.1~2436 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f122515;p=thirdparty%2Fipxe.git [forcedeth] Exit poll() as early as possible if no work to do Signed-off-by: Thomas Miletich Signed-off-by: Michael Brown --- diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c index cce7cd1ec..26bbdc8d0 100644 --- a/src/drivers/net/forcedeth.c +++ b/src/drivers/net/forcedeth.c @@ -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 );