netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: xiaofeis@codeaurora.org
To: Andrew Lunn <andrew@lunn.ch>
Cc: davem@davemloft.net, vkoul@kernel.org, netdev@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org,
	vivien.didelot@gmail.com, f.fainelli@gmail.com,
	niklas.cassel@linaro.org, xiazha@codeaurora.org
Subject: Re: [PATCH v3] net: dsa: qca8k: enable port flow control
Date: Mon, 29 Jul 2019 13:01:24 +0800	[thread overview]
Message-ID: <fa444b03b42a2cb72037bc73a62f1976@codeaurora.org> (raw)
In-Reply-To: <20190728223114.GD23125@lunn.ch>

On 2019-07-29 06:31, Andrew Lunn wrote:
> On Sun, Jul 28, 2019 at 08:57:50AM +0800, xiaofeis wrote:
>> Set phy device advertising to enable MAC flow control.
> 
> Hi Xiaofei.
> 
> This is half of the needed change for MAC flow control.
> 
> phy_support_asym_pause(phy) is used by the MAC to tell the PHY layer
> that the MAC supports flow control. The PHY will then advertise
> this. When auto-negotiation is completed, the PHY layer will call
> qca8k_adjust_link() with the results. It could be that the peer does
> not support flow control, or only supports symmetric flow control.  So
> in that function, you need to program the MAC with the results of the
> auto-neg. This is currently missing. You need to look at phydev->pause
> and phydev->asym_pause to decide how to configure the MAC.
> 
>        Andrew
Hi Andrew

You are correct. With the change, the auto-negotiation result still 
depends on the peer.

But our qca8k HW can auto sync the pause status to MAC from phy with the 
auto-negotiated result.
So no need to set in qca8k_adjust_link, since there is one setting in 
qca8k_port_set_status: mask |= QCA8K_PORT_STATUS_LINK_AUTO;

This change's purpose is to keep enable advertise on our side.

Thanks
Xiaofeis

  reply	other threads:[~2019-07-29  5:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-28  0:57 [PATCH v3] net: dsa: qca8k: enable port flow control xiaofeis
2019-07-28 22:31 ` Andrew Lunn
2019-07-29  5:01   ` xiaofeis [this message]
2019-07-29 13:23     ` Andrew Lunn
2019-07-30  3:01       ` xiaofeis
2019-07-30 22:08 ` David Miller

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=fa444b03b42a2cb72037bc73a62f1976@codeaurora.org \
    --to=xiaofeis@codeaurora.org \
    --cc=andrew@lunn.ch \
    --cc=bjorn.andersson@linaro.org \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.cassel@linaro.org \
    --cc=vivien.didelot@gmail.com \
    --cc=vkoul@kernel.org \
    --cc=xiazha@codeaurora.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).