CHROMIUM: r8169.c: Re-enable MSI to fix D3 wake for RTL8111e.
authorTodd Broch <tbroch@chromium.org>
Sat, 26 May 2012 00:41:44 +0000 (17:41 -0700)
committerOlof Johansson <olof@lixom.net>
Fri, 1 Jun 2012 06:56:44 +0000 (23:56 -0700)
In 3.0, kernel function, rtl_try_msi, unconditionally wrote config2
(0x53) register regardless of device version.

In 3.2, this write was made conditional based off dialog found in
https://lkml.org/lkml/2011/12/14/19.  That dialog states that MSI is
only supported for r8169 series devices.  Datasheets I have state MSI
support is available for the RTL81111e device I'm testing.
Additionally, I'm able to see the correct reporting of the MSI by
interrogating the PMCSR and /proc/interrupts.

This temporary patch returns the driver to its 3.0 functionality of
unconditionally writing config2 register while I begin a dialog with
maintainer/vendor to resolve the larger issue.

BUG=chromium-os:27991
TEST=manual
1. boot kernel w/o LAN connected and goto shell.
2. lspci -vvv -s 02:0 | grep "Status: D"
  Status: D3 NoSoftRst+ PME-Enable+ DSel=0 DScale=0 PME-
3. connect LAN and repeat 2.
  Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-

Change-Id: Ifbef2a63ab68a25954910a613ccc9def542fe612
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/19399
Reviewed-by: Sameer Nanda <snanda@chromium.org>
drivers/net/ethernet/realtek/r8169.c

index 7122e77..5f8ba57 100644 (file)
@@ -6069,8 +6069,7 @@ static unsigned rtl_try_msi(struct rtl8169_private *tp,
                        msi = RTL_FEATURE_MSI;
                }
        }
-       if (tp->mac_version <= RTL_GIGA_MAC_VER_06)
-               RTL_W8(Config2, cfg2);
+       RTL_W8(Config2, cfg2);
        return msi;
 }