r8169: remove hardcoded PCIe registers accesses.
authorFrancois Romieu <romieu@fr.zoreil.com>
Thu, 22 Dec 2011 17:59:37 +0000 (18:59 +0100)
committerFrancois Romieu <romieu@fr.zoreil.com>
Fri, 27 Jan 2012 08:57:44 +0000 (09:57 +0100)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
drivers/net/ethernet/realtek/r8169.c

index 7a0c800b50adc90051ed008548a754f1af6b5695..ca86e67a33a860185f61b1669b3e925dc31430b7 100644 (file)
@@ -3824,23 +3824,21 @@ static void r8168dp_hw_jumbo_disable(struct rtl8169_private *tp)
 static void r8168e_hw_jumbo_enable(struct rtl8169_private *tp)
 {
        void __iomem *ioaddr = tp->mmio_addr;
-       struct pci_dev *pdev = tp->pci_dev;
 
        RTL_W8(MaxTxPacketSize, 0x3f);
        RTL_W8(Config3, RTL_R8(Config3) | Jumbo_En0);
        RTL_W8(Config4, RTL_R8(Config4) | 0x01);
-       pci_write_config_byte(pdev, 0x79, 0x20);
+       rtl_tx_performance_tweak(tp->pci_dev, 0x2 << MAX_READ_REQUEST_SHIFT);
 }
 
 static void r8168e_hw_jumbo_disable(struct rtl8169_private *tp)
 {
        void __iomem *ioaddr = tp->mmio_addr;
-       struct pci_dev *pdev = tp->pci_dev;
 
        RTL_W8(MaxTxPacketSize, 0x0c);
        RTL_W8(Config3, RTL_R8(Config3) & ~Jumbo_En0);
        RTL_W8(Config4, RTL_R8(Config4) & ~0x01);
-       pci_write_config_byte(pdev, 0x79, 0x50);
+       rtl_tx_performance_tweak(tp->pci_dev, 0x5 << MAX_READ_REQUEST_SHIFT);
 }
 
 static void r8168b_0_hw_jumbo_enable(struct rtl8169_private *tp)