Skip to content

Commit

Permalink
Merge branch 'davem-next.r8169' of git://violet.fr.zoreil.com/romieu/…
Browse files Browse the repository at this point in the history
…linux

Francois Romieu says:

====================
Francois Romieu (1):
      r8169: verbose error message.

Hayes Wang (1):
      r8169: remove rtl_ocpdr_cond.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 18, 2012
2 parents 54399a7 + 82e316e commit 1c65296
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,8 @@ static bool rtl_loop_wait(struct rtl8169_private *tp, const struct rtl_cond *c,
if (c->check(tp) == high)
return true;
}
netif_err(tp, drv, tp->dev, c->msg);
netif_err(tp, drv, tp->dev, "%s == %d (loop: %d, delay: %d).\n",
c->msg, !high, n, d);
return false;
}

Expand Down Expand Up @@ -1043,13 +1044,6 @@ static void rtl_w1w0_phy_ocp(struct rtl8169_private *tp, int reg, int p, int m)
r8168_phy_ocp_write(tp, reg, (val | p) & ~m);
}

DECLARE_RTL_COND(rtl_ocpdr_cond)
{
void __iomem *ioaddr = tp->mmio_addr;

return RTL_R32(OCPDR) & OCPAR_FLAG;
}

static void r8168_mac_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data)
{
void __iomem *ioaddr = tp->mmio_addr;
Expand All @@ -1058,8 +1052,6 @@ static void r8168_mac_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data)
return;

RTL_W32(OCPDR, OCPAR_FLAG | (reg << 15) | data);

rtl_udelay_loop_wait_low(tp, &rtl_ocpdr_cond, 25, 10);
}

static u16 r8168_mac_ocp_read(struct rtl8169_private *tp, u32 reg)
Expand All @@ -1071,8 +1063,7 @@ static u16 r8168_mac_ocp_read(struct rtl8169_private *tp, u32 reg)

RTL_W32(OCPDR, reg << 15);

return rtl_udelay_loop_wait_high(tp, &rtl_ocpdr_cond, 25, 10) ?
RTL_R32(OCPDR) : ~0;
return RTL_R32(OCPDR);
}

#define OCP_STD_PHY_BASE 0xa400
Expand Down

0 comments on commit 1c65296

Please sign in to comment.