All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Claudiu Manoil <claudiu.manoil@freescale.com>
Cc: <netdev@vger.kernel.org>, "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 2/2][net-next] gianfar: Add ethtool -A support for pause frame
Date: Thu, 8 Aug 2013 20:45:49 +0200	[thread overview]
Message-ID: <1375987549.2853.67.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <5203D0E8.8050809@freescale.com>

On Thu, 2013-08-08 at 20:10 +0300, Claudiu Manoil wrote:
> Hi Ben,
> 
> On 8/7/2013 10:12 PM, Ben Hutchings wrote:
> > On Wed, 2013-08-07 at 13:24 +0300, Claudiu Manoil wrote:
> >> Allow Rx/Tx pause frame configuration via ethtool.
> >> The gfar devices feature link autonegotioation by default.
> >
> > So the MAC configuration bits are actually copied to the PHY autoneg
> > basic page, and then the PHY autoneg result is automatically used by the
> > MAC?
> >
> > This is of course possible to do in hardware, but... since this MAC is
> > not smart enough to ignore pause settings when running in half-duplex
> > mode, I seriously doubt it is doing all this by itself.
> >
> 
> I just wanted to say actually that the pause->autoneg parameter is not
> needed by the gianfar driver, but I didn't know what to do with it in
> get_pauseparam(), apparently pause->autoneg needs a value (or can
> simply ignore this param?).
> 
> I don't see what autonegotiation has to do with enabling/disabling
> pause frame generation in this case. My understanding is that link
> autonegotiation is taken care somewhere else, by the phy state machine.
> Each time this happens, the gianfar driver gets notified via the
> adjust_link() hook that it implements and makes the necessary configs
> in the mac registers.

That's what it *should* be doing.  But it's not; it's using
priv->rx_pause and priv->tx_pause, not phydev->pause and
phydev->asym_pause.  I.e. pause autoneg is really always *disabled*.

> Besides, autoneg info is already being displayed by ethtool (see
> print below).
> So I don't understand the use of pause->autoneg. What should I do with
> it?
[...]

Pause frame generation may be forced even though autonegotiation is
enabled.  I don't think this is a good idea but many drivers do support
it.

And gianfar does appear to allow autonegotiation to be disabled, anyway,
so in any case you have to support both forced and autonegotiated cases.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

  reply	other threads:[~2013-08-08 18:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 10:24 [PATCH 1/2][net-next] gianfar: Fix pause frame handling for half duplex links Claudiu Manoil
2013-08-07 10:24 ` [PATCH 2/2][net-next] gianfar: Add ethtool -A support for pause frame Claudiu Manoil
2013-08-07 19:12   ` Ben Hutchings
2013-08-08 17:10     ` Claudiu Manoil
2013-08-08 18:45       ` Ben Hutchings [this message]
2013-08-09  8:26         ` Lutz Jaenicke
2013-08-09  8:26           ` [PATCH] gianfar: implement flow control handling Lutz Jaenicke
2013-08-09 17:19             ` [PATCH][net-next v1] gianfar: Add flow control support Claudiu Manoil
2013-08-09 17:36               ` Fabio Estevam
2013-08-12  7:09                 ` Claudiu Manoil
2013-08-09 19:09               ` Joe Perches
2013-08-12  7:08                 ` Claudiu Manoil
2013-08-12 10:53               ` [PATCH][net-next v2] " Claudiu Manoil
2013-08-13 22:29                 ` David Miller
2013-08-09  8:26           ` [PATCH] gianfar: add support for LFC (Lossless Flow Control) Lutz Jaenicke
2013-08-09  8:39             ` Joe Perches
2013-08-09 10:12           ` [PATCH 2/2][net-next] gianfar: Add ethtool -A support for pause frame Claudiu Manoil
2013-08-09 10:15             ` Lutz Jaenicke

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=1375987549.2853.67.camel@deadeye.wl.decadent.org.uk \
    --to=bhutchings@solarflare.com \
    --cc=claudiu.manoil@freescale.com \
    --cc=davem@davemloft.net \
    --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.