Linux-ARM-MSM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] qca8k: enable port flow control
@ 2019-07-19  2:53 xiaofeis
  2019-07-19  4:18 ` Vinod Koul
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: xiaofeis @ 2019-07-19  2:53 UTC (permalink / raw)
  To: davem
  Cc: vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha, xiaofeis

Set phy device advertising to enable MAC flow control.

Change-Id: Ibf0f554b072fc73136ec9f7ffb90c20b25a4faae
Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
---
 drivers/net/dsa/qca8k.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index d93be14..95ac081 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2009 Felix Fietkau <nbd@nbd.name>
  * Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015, 2019, The Linux Foundation. All rights reserved.
  * Copyright (c) 2016 John Crispin <john@phrozen.org>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -800,6 +800,8 @@
 	qca8k_port_set_status(priv, port, 1);
 	priv->port_sts[port].enabled = 1;
 
+	phy->advertising |= (ADVERTISED_Pause | ADVERTISED_Asym_Pause);
+
 	return 0;
 }
 
-- 
1.9.1


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

* Re: [PATCH] qca8k: enable port flow control
  2019-07-19  2:53 [PATCH] qca8k: enable port flow control xiaofeis
@ 2019-07-19  4:18 ` Vinod Koul
  2019-07-19  9:31 ` Niklas Cassel
  2019-07-19 13:13 ` Andrew Lunn
  2 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2019-07-19  4:18 UTC (permalink / raw)
  To: xiaofeis
  Cc: davem, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha

On 19-07-19, 10:53, xiaofeis wrote:
> Set phy device advertising to enable MAC flow control.

How about:

to Pause for enabling MAC flow control 
> 
> Change-Id: Ibf0f554b072fc73136ec9f7ffb90c20b25a4faae

Please remove this

> Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
> ---
>  drivers/net/dsa/qca8k.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
> index d93be14..95ac081 100644
> --- a/drivers/net/dsa/qca8k.c
> +++ b/drivers/net/dsa/qca8k.c
> @@ -1,7 +1,7 @@
>  /*
>   * Copyright (C) 2009 Felix Fietkau <nbd@nbd.name>
>   * Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
> - * Copyright (c) 2015, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2015, 2019, The Linux Foundation. All rights reserved.
>   * Copyright (c) 2016 John Crispin <john@phrozen.org>
>   *
>   * This program is free software; you can redistribute it and/or modify
> @@ -800,6 +800,8 @@
>  	qca8k_port_set_status(priv, port, 1);
>  	priv->port_sts[port].enabled = 1;
>  
> +	phy->advertising |= (ADVERTISED_Pause | ADVERTISED_Asym_Pause);
> +
>  	return 0;
>  }
>  
> -- 
> 1.9.1

-- 
~Vinod

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

* Re: [PATCH] qca8k: enable port flow control
  2019-07-19  2:53 [PATCH] qca8k: enable port flow control xiaofeis
  2019-07-19  4:18 ` Vinod Koul
@ 2019-07-19  9:31 ` Niklas Cassel
  2019-07-19 13:14   ` Andrew Lunn
  2019-07-19 13:13 ` Andrew Lunn
  2 siblings, 1 reply; 6+ messages in thread
From: Niklas Cassel @ 2019-07-19  9:31 UTC (permalink / raw)
  To: xiaofeis
  Cc: davem, vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, xiazha

On Fri, Jul 19, 2019 at 10:53:11AM +0800, xiaofeis wrote:
> Set phy device advertising to enable MAC flow control.
> 
> Change-Id: Ibf0f554b072fc73136ec9f7ffb90c20b25a4faae
> Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
> ---
>  drivers/net/dsa/qca8k.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
> index d93be14..95ac081 100644
> --- a/drivers/net/dsa/qca8k.c
> +++ b/drivers/net/dsa/qca8k.c
> @@ -1,7 +1,7 @@
>  /*
>   * Copyright (C) 2009 Felix Fietkau <nbd@nbd.name>
>   * Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
> - * Copyright (c) 2015, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2015, 2019, The Linux Foundation. All rights reserved.
>   * Copyright (c) 2016 John Crispin <john@phrozen.org>
>   *
>   * This program is free software; you can redistribute it and/or modify
> @@ -800,6 +800,8 @@
>  	qca8k_port_set_status(priv, port, 1);
>  	priv->port_sts[port].enabled = 1;
>  
> +	phy->advertising |= (ADVERTISED_Pause | ADVERTISED_Asym_Pause);

Drop the unnecessary parentheses.

Question for DSA maintainers: shouldn't this be implemented in the
dsa_switch_ops phylink_validate callback, like it's done for other
dsa drivers?


Kind regards,
Niklas

> +
>  	return 0;
>  }
>  
> -- 
> 1.9.1
> 

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

* Re: [PATCH] qca8k: enable port flow control
  2019-07-19  2:53 [PATCH] qca8k: enable port flow control xiaofeis
  2019-07-19  4:18 ` Vinod Koul
  2019-07-19  9:31 ` Niklas Cassel
@ 2019-07-19 13:13 ` Andrew Lunn
  2019-07-24  5:09   ` xiaofeis
  2 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2019-07-19 13:13 UTC (permalink / raw)
  To: xiaofeis
  Cc: davem, vkoul, netdev, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha

On Fri, Jul 19, 2019 at 10:53:11AM +0800, xiaofeis wrote:
> Set phy device advertising to enable MAC flow control.
> 
> Change-Id: Ibf0f554b072fc73136ec9f7ffb90c20b25a4faae
> Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>

Hi Xiaofei

What tree is this patch against? I don't think it is net-next. It
actually looks to be an old tree. Please rebase to David Millers
net-next. Patches to that tree are closed at the moment, due to the
merge window. You can post an RFC, or wait until it opens again.

Thanks
	Andrew

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

* Re: [PATCH] qca8k: enable port flow control
  2019-07-19  9:31 ` Niklas Cassel
@ 2019-07-19 13:14   ` Andrew Lunn
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2019-07-19 13:14 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: xiaofeis, davem, vkoul, netdev, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, xiazha

> Question for DSA maintainers: shouldn't this be implemented in the
> dsa_switch_ops phylink_validate callback, like it's done for other
> dsa drivers?

Hi Niklas

qca8K is still using phylib, not phylink. So the validate callback
cannot be used.

       Andrew

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

* Re: [PATCH] qca8k: enable port flow control
  2019-07-19 13:13 ` Andrew Lunn
@ 2019-07-24  5:09   ` xiaofeis
  0 siblings, 0 replies; 6+ messages in thread
From: xiaofeis @ 2019-07-24  5:09 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: davem, vkoul, netdev, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha

Hi Andrew

Thanks for your comments. I have sent a new patch based on net-next 
tree.

Thanks
Xiaofeis

On 2019-07-19 21:13, Andrew Lunn wrote:
> On Fri, Jul 19, 2019 at 10:53:11AM +0800, xiaofeis wrote:
>> Set phy device advertising to enable MAC flow control.
>> 
>> Change-Id: Ibf0f554b072fc73136ec9f7ffb90c20b25a4faae
>> Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
> 
> Hi Xiaofei
> 
> What tree is this patch against? I don't think it is net-next. It
> actually looks to be an old tree. Please rebase to David Millers
> net-next. Patches to that tree are closed at the moment, due to the
> merge window. You can post an RFC, or wait until it opens again.
> 
> Thanks
> 	Andrew

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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19  2:53 [PATCH] qca8k: enable port flow control xiaofeis
2019-07-19  4:18 ` Vinod Koul
2019-07-19  9:31 ` Niklas Cassel
2019-07-19 13:14   ` Andrew Lunn
2019-07-19 13:13 ` Andrew Lunn
2019-07-24  5:09   ` xiaofeis

Linux-ARM-MSM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-msm/0 linux-arm-msm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-msm linux-arm-msm/ https://lore.kernel.org/linux-arm-msm \
		linux-arm-msm@vger.kernel.org linux-arm-msm@archiver.kernel.org
	public-inbox-index linux-arm-msm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-arm-msm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox