david/ipxe
Archived
1
0

[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>
This commit is contained in:
Michael Brown 2010-11-11 23:57:10 +00:00
parent 67dc832d15
commit f122515515

View 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 );