linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: fix amd-xgbe flow-control issue
@ 2018-07-26  6:45 tli012345
  2018-07-26 13:13 ` Tom Lendacky
  2018-07-26 16:30 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: tli012345 @ 2018-07-26  6:45 UTC (permalink / raw)
  To: thomas.lendacky; +Cc: davem, netdev, linux-kernel, tangpengpeng

From: tangpengpeng <tangpengpeng@higon.com>

If we enable or disable xgbe flow-control by ethtool ,
it does't work.Because the parameter is not properly
assigned,so we need to adjust the assignment order
of the parameters.

Signed-off-by: tangpengpeng <tangpengpeng@higon.com>
---
 drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
index 4b5d625de8f0..8a3a60bb2688 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
@@ -1111,14 +1111,14 @@ static void xgbe_phy_adjust_link(struct xgbe_prv_data *pdata)
 
 		if (pdata->tx_pause != pdata->phy.tx_pause) {
 			new_state = 1;
-			pdata->hw_if.config_tx_flow_control(pdata);
 			pdata->tx_pause = pdata->phy.tx_pause;
+			pdata->hw_if.config_tx_flow_control(pdata);
 		}
 
 		if (pdata->rx_pause != pdata->phy.rx_pause) {
 			new_state = 1;
-			pdata->hw_if.config_rx_flow_control(pdata);
 			pdata->rx_pause = pdata->phy.rx_pause;
+			pdata->hw_if.config_rx_flow_control(pdata);
 		}
 
 		/* Speed support */
-- 
2.14.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: fix amd-xgbe flow-control issue
  2018-07-26  6:45 [PATCH] net: fix amd-xgbe flow-control issue tli012345
@ 2018-07-26 13:13 ` Tom Lendacky
  2018-07-26 16:30 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Lendacky @ 2018-07-26 13:13 UTC (permalink / raw)
  To: tli012345; +Cc: davem, netdev, linux-kernel, tangpengpeng

On 7/26/2018 1:45 AM, tli012345@163.com wrote:
> From: tangpengpeng <tangpengpeng@higon.com>
> 
> If we enable or disable xgbe flow-control by ethtool ,
> it does't work.Because the parameter is not properly
> assigned,so we need to adjust the assignment order
> of the parameters.
> 
> Signed-off-by: tangpengpeng <tangpengpeng@higon.com>

You should add a Fixes tag as this bug was introduced with commit:

  c1ce2f77366b ("amd-xgbe: Fix flow control setting logic")

And since that commit was introduced in 4.2, you'll want to ask David to
push this to stable (4.4 and higher).

With that,

Acked-by: Tom Lendacky <thomas.lendacky@amd.com>

> ---
>  drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
> index 4b5d625de8f0..8a3a60bb2688 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
> @@ -1111,14 +1111,14 @@ static void xgbe_phy_adjust_link(struct xgbe_prv_data *pdata)
>  
>  		if (pdata->tx_pause != pdata->phy.tx_pause) {
>  			new_state = 1;
> -			pdata->hw_if.config_tx_flow_control(pdata);
>  			pdata->tx_pause = pdata->phy.tx_pause;
> +			pdata->hw_if.config_tx_flow_control(pdata);
>  		}
>  
>  		if (pdata->rx_pause != pdata->phy.rx_pause) {
>  			new_state = 1;
> -			pdata->hw_if.config_rx_flow_control(pdata);
>  			pdata->rx_pause = pdata->phy.rx_pause;
> +			pdata->hw_if.config_rx_flow_control(pdata);
>  		}
>  
>  		/* Speed support */
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: fix amd-xgbe flow-control issue
  2018-07-26  6:45 [PATCH] net: fix amd-xgbe flow-control issue tli012345
  2018-07-26 13:13 ` Tom Lendacky
@ 2018-07-26 16:30 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-07-26 16:30 UTC (permalink / raw)
  To: tli012345; +Cc: thomas.lendacky, netdev, linux-kernel, tangpengpeng

From: tli012345@163.com
Date: Thu, 26 Jul 2018 14:45:16 +0800

> From: tangpengpeng <tangpengpeng@higon.com>
> 
> If we enable or disable xgbe flow-control by ethtool ,
> it does't work.Because the parameter is not properly
> assigned,so we need to adjust the assignment order
> of the parameters.
> 
> Signed-off-by: tangpengpeng <tangpengpeng@higon.com>

Applied with -fixes tag added and queued up for -stable.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-26 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26  6:45 [PATCH] net: fix amd-xgbe flow-control issue tli012345
2018-07-26 13:13 ` Tom Lendacky
2018-07-26 16:30 ` David Miller

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).