From: Yanir Lubetkin Date: Wed, 22 Apr 2015 16:25:17 +0000 (+0300) Subject: e1000e: fix logical error in flush_desc_rings X-Git-Tag: omap-for-v4.2/fixes-rc1^2~134^2~143^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95f0d950467f1228d4e326c11150e1750a6dd1ef;p=pandora-kernel.git e1000e: fix logical error in flush_desc_rings 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 Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- Reading git-diff-tree failed