From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Ondrej Zary <linux@rainbow-software.org>,
Samuel Chessman <chessman@tux.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/9] tlan: Restart autonegotiation on link loss
Date: Wed, 28 May 2014 18:08:13 +0400 [thread overview]
Message-ID: <5385EDCD.5030001@cogentembedded.com> (raw)
In-Reply-To: <1401226727-5508-6-git-send-email-linux@rainbow-software.org>
Hello.
On 05/28/2014 01:38 AM, 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 | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
> diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
> index 31d4a96..1047b3f 100644
> --- a/drivers/net/ethernet/ti/tlan.c
> +++ b/drivers/net/ethernet/ti/tlan.c
[...]
> @@ -2788,6 +2789,19 @@ 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, leave | on the previosu line.
> + tlan_mii_sync(dev->base_addr);
> + tlan_mii_write_reg(dev, priv->phy[0],
> + MII_GEN_CTL, data);
Please start this line right under 'dev' on the previous one.
> + /* set to external PHY */
> + priv->phy_num = 1;
> + /* restart autonegotiation */
> + tlan_set_timer(dev, (4*HZ/10), TLAN_TIMER_PHY_PDOWN);
Spaces around * and / wouldn't hurt for consistency.
> + return;
> + }
> }
> }
WBR, Sergei
next prev parent reply other threads:[~2014-05-28 14:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 21:38 [PATCH 0/9] tlan: Link handling improvements and Olicom fixes Ondrej Zary
2014-05-27 21:38 ` [PATCH 1/9] tlan: Enable activity LED on Olicom OC-2325 and OC-2326 Ondrej Zary
2014-05-27 21:38 ` [PATCH 2/9] tlan: Enable link monitoring Ondrej Zary
2014-05-27 21:38 ` [PATCH 3/9] tlan: Add ethtool support Ondrej Zary
2014-05-27 21:38 ` [PATCH 4/9] tlan: Fix MAC address byte order on OC-2325/OC-2326 Ondrej Zary
2014-05-27 21:38 ` [PATCH 5/9] tlan: Restart autonegotiation on link loss Ondrej Zary
2014-05-27 22:29 ` Florian Fainelli
2014-05-28 6:39 ` Ondrej Zary
2014-05-28 17:26 ` Florian Fainelli
2014-05-28 14:08 ` Sergei Shtylyov [this message]
2014-05-27 21:38 ` [PATCH 6/9] tlan: Don't scream if no link Ondrej Zary
2014-05-27 21:38 ` [PATCH 7/9] tlan: Make autonegotiation faster Ondrej Zary
2014-05-28 14:11 ` Sergei Shtylyov
2014-05-27 21:38 ` [PATCH 8/9] tlan: Add PHY reset timeout Ondrej Zary
2014-05-27 21:38 ` [PATCH 9/9] tlan: Don't disable internal PHY on cards that use it in 10 Mbps mode Ondrej Zary
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5385EDCD.5030001@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=chessman@tux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rainbow-software.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.