Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233631
b: refs/heads/master
c: 5d2e195
h: refs/heads/master
i:
  233629: 5af0780
  233627: 7ae4bd3
  233623: 387a15d
  233615: c0354e5
  233599: f946e4c
v: v3
  • Loading branch information
Hayes Wang authored and Francois Romieu committed Feb 23, 2011
1 parent ee3e80f commit 55df1d4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 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: d24e9aafe5d5dfdf6d114b29e67f8afd5fae5ef0
refs/heads/master: 5d2e19572a66be1e349faba289b7bd049b85bc98
17 changes: 14 additions & 3 deletions trunk/drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -2869,8 +2869,11 @@ static void r8168_pll_power_down(struct rtl8169_private *tp)
{
void __iomem *ioaddr = tp->mmio_addr;

if (tp->mac_version == RTL_GIGA_MAC_VER_27)
if (((tp->mac_version == RTL_GIGA_MAC_VER_27) ||
(tp->mac_version == RTL_GIGA_MAC_VER_28)) &&
(ocp_read(tp, 0x0f, 0x0010) & 0x00008000)) {
return;
}

if (((tp->mac_version == RTL_GIGA_MAC_VER_23) ||
(tp->mac_version == RTL_GIGA_MAC_VER_24)) &&
Expand All @@ -2892,6 +2895,8 @@ static void r8168_pll_power_down(struct rtl8169_private *tp)
switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_25:
case RTL_GIGA_MAC_VER_26:
case RTL_GIGA_MAC_VER_27:
case RTL_GIGA_MAC_VER_28:
RTL_W8(PMCH, RTL_R8(PMCH) & ~0x80);
break;
}
Expand All @@ -2901,12 +2906,17 @@ static void r8168_pll_power_up(struct rtl8169_private *tp)
{
void __iomem *ioaddr = tp->mmio_addr;

if (tp->mac_version == RTL_GIGA_MAC_VER_27)
if (((tp->mac_version == RTL_GIGA_MAC_VER_27) ||
(tp->mac_version == RTL_GIGA_MAC_VER_28)) &&
(ocp_read(tp, 0x0f, 0x0010) & 0x00008000)) {
return;
}

switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_25:
case RTL_GIGA_MAC_VER_26:
case RTL_GIGA_MAC_VER_27:
case RTL_GIGA_MAC_VER_28:
RTL_W8(PMCH, RTL_R8(PMCH) | 0x80);
break;
}
Expand Down Expand Up @@ -3319,7 +3329,8 @@ static void rtl8169_hw_reset(struct rtl8169_private *tp)
/* Disable interrupts */
rtl8169_irq_mask_and_ack(ioaddr);

if (tp->mac_version == RTL_GIGA_MAC_VER_28) {
if (tp->mac_version == RTL_GIGA_MAC_VER_27 ||
tp->mac_version == RTL_GIGA_MAC_VER_28) {
while (RTL_R8(TxPoll) & NPQ)
udelay(20);

Expand Down

0 comments on commit 55df1d4

Please sign in to comment.