lkml.org 
[lkml]   [2014]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/11] tlan: Restart autonegotiation on link loss
Hello.

On 06/21/2014 06:47 PM, Ondrej Zary wrote:

> When link is lost on a card which uses internal PHY for 10 Mbit speeds,
> restart autonegotiation to allow switching between 10 and 100 Mbps speeds.
>
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> ---
> drivers/net/ethernet/ti/tlan.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)

> diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
> index 31d4a96..47eb30e 100644
> --- a/drivers/net/ethernet/ti/tlan.c
> +++ b/drivers/net/ethernet/ti/tlan.c
[...]
> @@ -2788,6 +2789,20 @@ static void tlan_phy_monitor(unsigned long data)
> dev->name);
> tlan_dio_write8(dev->base_addr, TLAN_LED_REG, 0);
> netif_carrier_off(dev);
> + if (priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10) {
> + /* power down internal PHY */
> + u16 data = MII_GC_PDOWN | MII_GC_LOOPBK |
> + MII_GC_ISOLATE;

Please insert empty line here, after declaration.

> + tlan_mii_sync(dev->base_addr);
> + tlan_mii_write_reg(dev, priv->phy[0],
> + MII_GEN_CTL, data);
> + /* set to external PHY */
> + priv->phy_num = 1;
> + /* restart autonegotiation */
> + tlan_set_timer(dev, 4 * HZ / 10,
> + TLAN_TIMER_PHY_PDOWN);
> + return;
> + }
> }
> }

WBR, Sergei



\
 
 \ /
  Last update: 2014-06-21 19:41    [W:0.057 / U:4.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site