e1000e: i219 fix unit hang on reset and runtime D3
authorYanir Lubetkin <yanirx.lubetkin@intel.com>
Mon, 13 Apr 2015 23:20:21 +0000 (02:20 +0300)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 3 Jun 2015 10:10:20 +0000 (03:10 -0700)
Unit hang may occur if multiple descriptors are available in the rings
during reset or runtime suspend. This state can be detected by testing
bit 8 in the FEXTNVM7 register. If this bit is set and there are pending
descriptors in one of the rings, we must flush them prior to reset. Same
applies entering runtime suspend.

Signed-off-by: Yanir Lubetkin <yanirx.lubetkin@intel.com>
Reviewed-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/ich8lan.h
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/e1000e/regs.h

index 770a573..bf72ef8 100644 (file)
 #define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
 
 #define E1000_FEXTNVM7_DISABLE_SMB_PERST       0x00000020
+#define E1000_FEXTNVM7_NEED_DESCRING_FLUSH     0x00000100
+#define E1000_FEXTNVM11_DISABLE_MULR_FIX       0x00002000
+
+/* bit24: RXDCTL thresholds granularity: 0 - cache lines, 1 - descriptors */
+#define E1000_RXDCTL_THRESH_UNIT_DESC 0x01000000
 
 #define K1_ENTRY_LATENCY       0
 #define K1_MIN_TIME            1