]> www.infradead.org Git - users/jedix/linux-maple.git/commit
e1000e: fix logical error in flush_desc_rings
authorYanir Lubetkin <yanirx.lubetkin@intel.com>
Wed, 22 Apr 2015 16:25:17 +0000 (19:25 +0300)
committerBrian Maly <brian.maly@oracle.com>
Fri, 4 Sep 2015 17:58:13 +0000 (13:58 -0400)
commite57dc9faa7d724d4f1d02e3ef537de56e9e29094
tree7505a0e6b90b019c599e1d39c1362347214466f1
parent7a0e48bc9d10a98ad30f1429c8670dec1096c927
e1000e: fix logical error in flush_desc_rings

Orabug: 21792108

The condition under which the flush should occur was reversed.  The fix
should be applied before any HW reset (unless followed by bus reset)
and before any power state transition from D0.

If E1000_FEXTNVM7_NEED_DESCRING_FLUSH bit is set in FEXTNVM7 and TDLEN > 0
the Tx ring should be flushed. (fixes ~95% of the hang states).
If the E1000_FEXTNVM7_NEED_DESCRING_FLUSH did not clear, we should also
flush the RX ring. Bug was caught by Alexander Duyck during a code review
when examining this fix.

Signed-off-by: Yanir Lubetkin <yanirx.lubetkin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 95f0d950467f1228d4e326c11150e1750a6dd1ef)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/e1000e/netdev.c