Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233446
b: refs/heads/master
c: 713b3c9
h: refs/heads/master
v: v3
  • Loading branch information
Jesse Brandeburg authored and Jeff Kirsher committed Feb 17, 2011
1 parent 37811db commit 92ea513
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 615b32af9730def64330e4c0c95c973e90bd9c6d
refs/heads/master: 713b3c9e4c1a6da6b45da6474ed554ed0a48de69
31 changes: 21 additions & 10 deletions trunk/drivers/net/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3344,6 +3344,21 @@ int e1000e_up(struct e1000_adapter *adapter)
return 0;
}

static void e1000e_flush_descriptors(struct e1000_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;

if (!(adapter->flags2 & FLAG2_DMA_BURST))
return;

/* flush pending descriptor writebacks to memory */
ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD);
ew32(RDTR, adapter->rx_int_delay | E1000_RDTR_FPD);

/* execute the writes immediately */
e1e_flush();
}

void e1000e_down(struct e1000_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
Expand Down Expand Up @@ -3383,6 +3398,9 @@ void e1000e_down(struct e1000_adapter *adapter)

if (!pci_channel_offline(adapter->pdev))
e1000e_reset(adapter);

e1000e_flush_descriptors(adapter);

e1000_clean_tx_ring(adapter);
e1000_clean_rx_ring(adapter);

Expand Down Expand Up @@ -4354,19 +4372,12 @@ static void e1000_watchdog_task(struct work_struct *work)
else
ew32(ICS, E1000_ICS_RXDMT0);

/* flush pending descriptors to memory before detecting Tx hang */
e1000e_flush_descriptors(adapter);

/* Force detection of hung controller every watchdog period */
adapter->detect_tx_hung = 1;

/* flush partial descriptors to memory before detecting Tx hang */
if (adapter->flags2 & FLAG2_DMA_BURST) {
ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD);
ew32(RDTR, adapter->rx_int_delay | E1000_RDTR_FPD);
/*
* no need to flush the writes because the timeout code does
* an er32 first thing
*/
}

/*
* With 82571 controllers, LAA may be overwritten due to controller
* reset from the other port. Set the appropriate LAA in RAR[0]
Expand Down

0 comments on commit 92ea513

Please sign in to comment.