[PATCH 1/2][SRU][B] UBUNTU: SAUCE: Revert "r8169: don't use MSI-X on RTL8106e"

AceLan Kao acelan.kao at canonical.com
Thu Dec 27 03:17:01 UTC 2018


BugLink: https://bugs.launchpad.net/bugs/1809847

This reverts commit 9d4efdc5adc3e20762af5de5a5b1c11a762e84d7.

We backported this commit, and can't clean cherry-pick the reverted
commit from upstream, so revert it directly. This equivalent to upstream
commit.
   d49c88d7677b r8169: Enable MSI-X on RTL8106e

Signed-off-by: AceLan Kao <acelan.kao at canonical.com>
---
 drivers/net/ethernet/realtek/r8169.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 64826f4f23bc..9c6e65896108 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -8300,20 +8300,17 @@ static int rtl_alloc_irq(struct rtl8169_private *tp)
 	void __iomem *ioaddr = tp->mmio_addr;
 	unsigned int flags;
 
-	switch (tp->mac_version) {
-	case RTL_GIGA_MAC_VER_01 ... RTL_GIGA_MAC_VER_06:
+	if (tp->mac_version <= RTL_GIGA_MAC_VER_06) {
 		RTL_W8(Cfg9346, Cfg9346_Unlock);
 		RTL_W8(Config2, RTL_R8(Config2) & ~MSIEnable);
 		RTL_W8(Cfg9346, Cfg9346_Lock);
 		flags = PCI_IRQ_LEGACY;
-		break;
-	case RTL_GIGA_MAC_VER_39 ... RTL_GIGA_MAC_VER_40:
+	} else if (tp->mac_version == RTL_GIGA_MAC_VER_40) {
 		/* This version was reported to have issues with resume
 		 * from suspend when using MSI-X
 		 */
 		flags = PCI_IRQ_LEGACY | PCI_IRQ_MSI;
-		break;
-	default:
+	} else {
 		flags = PCI_IRQ_ALL_TYPES;
 	}
 
-- 
2.17.1




More information about the kernel-team mailing list