Skip to content

Commit

Permalink
[forcedeth] Exit poll() as early as possible if no work to do
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Nov 11, 2010
1 parent 67dc832 commit f122515
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/drivers/net/forcedeth.c
Expand Up @@ -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 );

Expand All @@ -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 );

Expand Down

0 comments on commit f122515

Please sign in to comment.