diff options
author | Matthew Vick <matthew.vick@intel.com> | 2012-03-16 05:03:00 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-04-03 18:25:16 -0400 |
commit | bf03085f85112eac2d19036ea3003071220285bb (patch) | |
tree | 204f9390746aa2798589f6a4d037c3c6827593f0 /drivers | |
parent | bb9e44d0d0f45da356c39e485edacff6e14ba961 (diff) |
e1000e: Guarantee descriptor writeback flush success.
In rare circumstances, a descriptor writeback flush may not work if it
arrives on a specific clock cycle as a writeback request is going out.
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/netdev.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 6878601f20c5..19ab2154802c 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
@@ -1059,6 +1059,13 @@ static void e1000_print_hw_hang(struct work_struct *work) | |||
1059 | ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD); | 1059 | ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD); |
1060 | /* execute the writes immediately */ | 1060 | /* execute the writes immediately */ |
1061 | e1e_flush(); | 1061 | e1e_flush(); |
1062 | /* | ||
1063 | * Due to rare timing issues, write to TIDV again to ensure | ||
1064 | * the write is successful | ||
1065 | */ | ||
1066 | ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD); | ||
1067 | /* execute the writes immediately */ | ||
1068 | e1e_flush(); | ||
1062 | adapter->tx_hang_recheck = true; | 1069 | adapter->tx_hang_recheck = true; |
1063 | return; | 1070 | return; |
1064 | } | 1071 | } |
@@ -3616,6 +3623,16 @@ static void e1000e_flush_descriptors(struct e1000_adapter *adapter) | |||
3616 | 3623 | ||
3617 | /* execute the writes immediately */ | 3624 | /* execute the writes immediately */ |
3618 | e1e_flush(); | 3625 | e1e_flush(); |
3626 | |||
3627 | /* | ||
3628 | * due to rare timing issues, write to TIDV/RDTR again to ensure the | ||
3629 | * write is successful | ||
3630 | */ | ||
3631 | ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD); | ||
3632 | ew32(RDTR, adapter->rx_int_delay | E1000_RDTR_FPD); | ||
3633 | |||
3634 | /* execute the writes immediately */ | ||
3635 | e1e_flush(); | ||
3619 | } | 3636 | } |
3620 | 3637 | ||
3621 | static void e1000e_update_stats(struct e1000_adapter *adapter); | 3638 | static void e1000e_update_stats(struct e1000_adapter *adapter); |