diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2011-12-22 12:59:37 -0500 |
---|---|---|
committer | Francois Romieu <romieu@fr.zoreil.com> | 2012-01-27 03:57:44 -0500 |
commit | 4512ff9f361a2786a18cb805d1f64b8d8719f121 (patch) | |
tree | 15166fadad9995da4077e7ff9ece5c349778bf76 /drivers/net/ethernet/realtek/r8169.c | |
parent | a7563f342db6490e66dbf2c8a50577a72a158c9a (diff) |
r8169: remove hardcoded PCIe registers accesses.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers/net/ethernet/realtek/r8169.c')
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 7a0c800b50ad..ca86e67a33a8 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
@@ -3824,23 +3824,21 @@ static void r8168dp_hw_jumbo_disable(struct rtl8169_private *tp) | |||
3824 | static void r8168e_hw_jumbo_enable(struct rtl8169_private *tp) | 3824 | static void r8168e_hw_jumbo_enable(struct rtl8169_private *tp) |
3825 | { | 3825 | { |
3826 | void __iomem *ioaddr = tp->mmio_addr; | 3826 | void __iomem *ioaddr = tp->mmio_addr; |
3827 | struct pci_dev *pdev = tp->pci_dev; | ||
3828 | 3827 | ||
3829 | RTL_W8(MaxTxPacketSize, 0x3f); | 3828 | RTL_W8(MaxTxPacketSize, 0x3f); |
3830 | RTL_W8(Config3, RTL_R8(Config3) | Jumbo_En0); | 3829 | RTL_W8(Config3, RTL_R8(Config3) | Jumbo_En0); |
3831 | RTL_W8(Config4, RTL_R8(Config4) | 0x01); | 3830 | RTL_W8(Config4, RTL_R8(Config4) | 0x01); |
3832 | pci_write_config_byte(pdev, 0x79, 0x20); | 3831 | rtl_tx_performance_tweak(tp->pci_dev, 0x2 << MAX_READ_REQUEST_SHIFT); |
3833 | } | 3832 | } |
3834 | 3833 | ||
3835 | static void r8168e_hw_jumbo_disable(struct rtl8169_private *tp) | 3834 | static void r8168e_hw_jumbo_disable(struct rtl8169_private *tp) |
3836 | { | 3835 | { |
3837 | void __iomem *ioaddr = tp->mmio_addr; | 3836 | void __iomem *ioaddr = tp->mmio_addr; |
3838 | struct pci_dev *pdev = tp->pci_dev; | ||
3839 | 3837 | ||
3840 | RTL_W8(MaxTxPacketSize, 0x0c); | 3838 | RTL_W8(MaxTxPacketSize, 0x0c); |
3841 | RTL_W8(Config3, RTL_R8(Config3) & ~Jumbo_En0); | 3839 | RTL_W8(Config3, RTL_R8(Config3) & ~Jumbo_En0); |
3842 | RTL_W8(Config4, RTL_R8(Config4) & ~0x01); | 3840 | RTL_W8(Config4, RTL_R8(Config4) & ~0x01); |
3843 | pci_write_config_byte(pdev, 0x79, 0x50); | 3841 | rtl_tx_performance_tweak(tp->pci_dev, 0x5 << MAX_READ_REQUEST_SHIFT); |
3844 | } | 3842 | } |
3845 | 3843 | ||
3846 | static void r8168b_0_hw_jumbo_enable(struct rtl8169_private *tp) | 3844 | static void r8168b_0_hw_jumbo_enable(struct rtl8169_private *tp) |