diff options
author | Michael Brown | 2011-03-16 19:58:52 +0100 |
---|---|---|
committer | Michael Brown | 2011-03-16 20:32:23 +0100 |
commit | c018d57803f318e3d3419219f340c004738dda6f (patch) | |
tree | 7b8f3c5ddf8e634fdda3d6fd1b5f61a59a15dd25 /src/drivers/net/igbvf | |
parent | [igbvf] Remove some unused Linux-specific portions of igbvf.h (diff) | |
download | ipxe-c018d57803f318e3d3419219f340c004738dda6f.tar.gz ipxe-c018d57803f318e3d3419219f340c004738dda6f.tar.xz ipxe-c018d57803f318e3d3419219f340c004738dda6f.zip |
[e1000] Remove unused variable when ICR register is simply cleared
On reset and close, the ICR register is read to clear any pending
interrupts, but the value is simply ignored. Avoid assigning the
value to a variable, to inhibit a warning from gcc 4.6.
Also fix a potential race condition in reset routines which clear
interrupts before disabling them.
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/igbvf')
-rw-r--r-- | src/drivers/net/igbvf/igbvf_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/net/igbvf/igbvf_main.c b/src/drivers/net/igbvf/igbvf_main.c index da558050..1f7e1dfd 100644 --- a/src/drivers/net/igbvf/igbvf_main.c +++ b/src/drivers/net/igbvf/igbvf_main.c @@ -666,12 +666,12 @@ static void igbvf_close ( struct net_device *netdev ) struct igbvf_adapter *adapter = netdev_priv ( netdev ); struct e1000_hw *hw = &adapter->hw; uint32_t rxdctl; - uint32_t icr; DBG ( "igbvf_close\n" ); - icr = er32(EICR); + /* Disable and acknowledge interrupts */ igbvf_irq_disable ( adapter ); + er32(EICR); /* disable receives */ rxdctl = er32 ( RXDCTL(0) ); |