netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Max Filippov <jcmvbkbc@gmail.com>,
	linux-xtensa@linux-xtensa.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Chris Zankel <chris@zankel.net>, Marc Gauthier <marc@cadence.com>,
	"David S. Miller" <davem@davemloft.net>,
	Ben Hutchings <ben@decadent.org.uk>
Subject: Re: [PATCH v2 2/4] net: ethoc: don't advertise gigabit speed on attached PHY
Date: Tue, 28 Jan 2014 22:47:35 -0800	[thread overview]
Message-ID: <52E8A407.1020809@gmail.com> (raw)
In-Reply-To: <1390975218-13863-3-git-send-email-jcmvbkbc@gmail.com>

Hi Max,

Le 28/01/2014 22:00, Max Filippov a écrit :
> OpenCores 10/100 Mbps MAC does not support speeds above 100 Mbps, but does
> not disable advertisement when PHY supports them. This results in
> non-functioning network when the MAC is connected to a gigabit PHY connected
> to a gigabit switch.
>
> The fix is to disable gigabit speed advertisement on attached PHY
> unconditionally.
>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
> Changes v1->v2:
> - disable both gigabit advertisement and support.
>
>   drivers/net/ethernet/ethoc.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c
> index 4de8cfd..5643b2d 100644
> --- a/drivers/net/ethernet/ethoc.c
> +++ b/drivers/net/ethernet/ethoc.c
> @@ -688,6 +688,14 @@ static int ethoc_mdio_probe(struct net_device *dev)
>   	}
>
>   	priv->phy = phy;
> +	phy_update_advert(phy,
> +			  ADVERTISED_1000baseT_Full |
> +			  ADVERTISED_1000baseT_Half, 0);
> +	phy_start_aneg(phy);

This does not look necessary, you should not have to call 
phy_start_aneg() because the PHY state machine is not yet started, at 
best this calls does nothing.

> +	phy_update_supported(phy,
> +			     SUPPORTED_1000baseT_Full |
> +			     SUPPORTED_1000baseT_Half, 0);
> +
>   	return 0;
>   }
>
>

  reply	other threads:[~2014-01-29  6:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29  6:00 [PATCH v2 0/4] Max Filippov
2014-01-29  6:00 ` [PATCH v2 1/4] phy: provide accessors for 'advertising' and 'supported' fields Max Filippov
2014-01-29 17:14   ` Florian Fainelli
2014-01-29  6:00 ` [PATCH v2 2/4] net: ethoc: don't advertise gigabit speed on attached PHY Max Filippov
2014-01-29  6:47   ` Florian Fainelli [this message]
2014-01-29  7:01     ` Max Filippov
     [not found]       ` <CAGVrzcboHp8-qHZseGOVm14u1-cTcOjRZGExFxNu_nbK__XCSA@mail.gmail.com>
2014-01-29 18:32         ` Max Filippov
2014-01-31  6:07           ` Max Filippov
2014-02-01  0:40             ` Florian Fainelli
2014-02-01  0:54               ` Florian Fainelli
2014-02-01  1:10                 ` Max Filippov
2014-02-01  1:36                   ` Florian Fainelli
2014-01-29  6:00 ` [PATCH v2 3/4] net: ethoc: set up MII management bus clock Max Filippov
2014-01-29  7:01   ` Florian Fainelli
2014-01-30  0:14     ` Max Filippov
2014-01-29  6:00 ` [PATCH v2 4/4] net: ethoc: implement ethtool operations Max Filippov
2014-01-29  6:52   ` Florian Fainelli
2014-01-30  1:59   ` Ben Hutchings
2014-01-30  3:04     ` Max Filippov
2014-01-30 14:04       ` Ben Hutchings

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=52E8A407.1020809@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=ben@decadent.org.uk \
    --cc=chris@zankel.net \
    --cc=davem@davemloft.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=marc@cadence.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).