r8169: don't use MSI-X on RTL8106e
[muen/linux.git] / drivers / net / ethernet / realtek / r8169.c
index 0d9c3831838fe0dc366bfa9ab2105e83b493a1bd..0efa977c422dd5a32a8a241a5c32b6fc2cd71664 100644 (file)
@@ -7071,17 +7071,20 @@ static int rtl_alloc_irq(struct rtl8169_private *tp)
 {
        unsigned int flags;
 
-       if (tp->mac_version <= RTL_GIGA_MAC_VER_06) {
+       switch (tp->mac_version) {
+       case RTL_GIGA_MAC_VER_01 ... RTL_GIGA_MAC_VER_06:
                RTL_W8(tp, Cfg9346, Cfg9346_Unlock);
                RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~MSIEnable);
                RTL_W8(tp, Cfg9346, Cfg9346_Lock);
                flags = PCI_IRQ_LEGACY;
-       } else if (tp->mac_version == RTL_GIGA_MAC_VER_40) {
+               break;
+       case RTL_GIGA_MAC_VER_39 ... 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;
-       } else {
+               break;
+       default:
                flags = PCI_IRQ_ALL_TYPES;
        }