r8169: read common register for PCI commit
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 28 Aug 2019 20:26:51 +0000 (22:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Aug 2019 00:47:27 +0000 (17:47 -0700)
RTL8125 uses a different register number for IntrMask.
To net have side effects by reading a random register let's
use a register that is the same on all supported chip families.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c

index dc799528f8e22b575c7f73121be4333c000c0b1e..652bacf62de9aa0ea918e0e59883afd89bf2a5ef 100644 (file)
@@ -5135,7 +5135,7 @@ static void rtl_hw_start(struct  rtl8169_private *tp)
        rtl_lock_config_regs(tp);
 
        /* Initially a 10 us delay. Turned it into a PCI commit. - FR */
-       RTL_R8(tp, IntrMask);
+       RTL_R16(tp, CPlusCmd);
        RTL_W8(tp, ChipCmd, CmdTxEnb | CmdRxEnb);
        rtl_init_rxcfg(tp);
        rtl_set_tx_config_registers(tp);