[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>
This commit is contained in:
Michael Brown
2011-03-16 18:58:52 +00:00
parent d94e62ded4
commit c018d57803
12 changed files with 24 additions and 30 deletions

View File

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