[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130330124319.GB19236@electric-eye.fr.zoreil.com>
Date: Sat, 30 Mar 2013 13:43:19 +0100
From: Francois Romieu <romieu@...zoreil.com>
To: Hayes Wang <hayeswang@...ltek.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
bowgotsai@...gle.com
Subject: Re: [PATCH] r8169: fix auto speed down issue
Hayes Wang <hayeswang@...ltek.com> :
[...]
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 28fb50a..a9eedf7 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -3818,6 +3818,21 @@ static void rtl_init_mdio_ops(struct rtl8169_private *tp)
> }
> }
>
> +static void rtl_speed_down(struct rtl8169_private *tp)
> +{
> + u32 adv;
> + int lpa;
> +
> + rtl_writephy(tp, 0x1f, 0x0000);
> + lpa = rtl_readphy(tp, MII_LPA);
> +
> + adv = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full;
> + if (!(lpa & (ADVERTISE_10HALF | ADVERTISE_10FULL)))
You may use the LPA_* #defines here.
--
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists