summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorMichael Brown2010-11-12 00:57:10 +0100
committerMichael Brown2010-11-12 00:57:10 +0100
commitf12251551504b5838f4b6f0a974244504eca69e7 (patch)
treec6c46669d79fab4d68140be4370eb729b8a1bbd6 /src/drivers/net/forcedeth.c
parent[tcp] Set PSH flag only on packets containing data (diff)
downloadipxe-f12251551504b5838f4b6f0a974244504eca69e7.tar.gz
ipxe-f12251551504b5838f4b6f0a974244504eca69e7.tar.xz
ipxe-f12251551504b5838f4b6f0a974244504eca69e7.zip
[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>
Diffstat (limited to 'src/drivers/net/forcedeth.c')
-rw-r--r--src/drivers/net/forcedeth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c
index cce7cd1e..26bbdc8d 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 );