Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112257
b: refs/heads/master
c: 219a1e9
h: refs/heads/master
i:
  112255: 1ae6b84
v: v3
  • Loading branch information
Francois Romieu committed Oct 10, 2008
1 parent f498d4d commit c3b514c
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8363901596f64ef74db906df0c4a95daea47464
refs/heads/master: 219a1e9d46dcc21f279c428941ded2328f1a5ee5
66 changes: 61 additions & 5 deletions trunk/drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ static void rtl8168cp_hw_phy_config(void __iomem *ioaddr)
rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
}

static void rtl8168c_hw_phy_config(void __iomem *ioaddr)
static void rtl8168c_1_hw_phy_config(void __iomem *ioaddr)
{
struct phy_reg phy_reg_init[] = {
{ 0x1f, 0x0001 },
Expand Down Expand Up @@ -1416,7 +1416,7 @@ static void rtl8168c_hw_phy_config(void __iomem *ioaddr)
mdio_write(ioaddr, 0x1f, 0x0000);
}

static void rtl8168cx_hw_phy_config(void __iomem *ioaddr)
static void rtl8168c_2_hw_phy_config(void __iomem *ioaddr)
{
struct phy_reg phy_reg_init[] = {
{ 0x1f, 0x0001 },
Expand Down Expand Up @@ -1495,10 +1495,10 @@ static void rtl_hw_phy_config(struct net_device *dev)
rtl8168cp_hw_phy_config(ioaddr);
break;
case RTL_GIGA_MAC_VER_19:
rtl8168c_hw_phy_config(ioaddr);
rtl8168c_1_hw_phy_config(ioaddr);
break;
case RTL_GIGA_MAC_VER_20:
rtl8168cx_hw_phy_config(ioaddr);
rtl8168c_2_hw_phy_config(ioaddr);
break;
default:
break;
Expand Down Expand Up @@ -2384,6 +2384,36 @@ static void rtl_ephy_init(void __iomem *ioaddr, struct ephy_info *e, int len)
}
}

static void rtl_hw_start_8168bb(void __iomem *ioaddr, struct pci_dev *pdev)
{
rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);
}

static void rtl_hw_start_8168bef(void __iomem *ioaddr, struct pci_dev *pdev)
{
rtl_hw_start_8168bb(ioaddr, pdev);
}

static void __rtl_hw_start_8168cp(void __iomem *ioaddr, struct pci_dev *pdev)
{
rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);
}

static void rtl_hw_start_8168cp(void __iomem *ioaddr, struct pci_dev *pdev)
{
__rtl_hw_start_8168cp(ioaddr, pdev);
}

static void rtl_hw_start_8168c_1(void __iomem *ioaddr, struct pci_dev *pdev)
{
__rtl_hw_start_8168cp(ioaddr, pdev);
}

static void rtl_hw_start_8168c_2(void __iomem *ioaddr, struct pci_dev *pdev)
{
__rtl_hw_start_8168cp(ioaddr, pdev);
}

static void rtl_hw_start_8168(struct net_device *dev)
{
struct rtl8169_private *tp = netdev_priv(dev);
Expand Down Expand Up @@ -2417,7 +2447,33 @@ static void rtl_hw_start_8168(struct net_device *dev)

RTL_R8(IntrMask);

rtl_tx_performance_tweak(pdev, 0x5 << MAX_READ_REQUEST_SHIFT);
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_11:
rtl_hw_start_8168bb(ioaddr, pdev);
break;

case RTL_GIGA_MAC_VER_12:
case RTL_GIGA_MAC_VER_17:
rtl_hw_start_8168bef(ioaddr, pdev);
break;

case RTL_GIGA_MAC_VER_18:
rtl_hw_start_8168cp(ioaddr, pdev);
break;

case RTL_GIGA_MAC_VER_19:
rtl_hw_start_8168c_1(ioaddr, pdev);
break;

case RTL_GIGA_MAC_VER_20:
rtl_hw_start_8168c_2(ioaddr, pdev);
break;

default:
printk(KERN_ERR PFX "%s: unknown chipset (mac_version = %d).\n",
dev->name, tp->mac_version);
break;
}

RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);

Expand Down

0 comments on commit c3b514c

Please sign in to comment.