Skip to contentSkip to conversation

qca8k: enable port flow control

PATCH Superseded xiaofeis 4 participants 6 messages Jul 19, 2019 – Jul 24, 2019

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

xiaofeis

author
#0 lore raw

PATCH 1/1 qca8k: enable port flow control

Set phy device advertising to enable MAC flow control.

Change-Id Ibf0f554b072fc73136ec9f7ffb90c20b25a4faae
---
 drivers/net/dsa/qca8k.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/dsa/qca8k.c +3 -1
index d93be14..95ac081 100644
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2009 Felix Fietkau <[email protected]>
  * Copyright (C) 2011-2012 Gabor Juhos <[email protected]>
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015, 2019, The Linux Foundation. All rights reserved.
  * Copyright (c) 2016 John Crispin <[email protected]>
  *
  * 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;
 }
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 1 line · xiaofeis

Set phy device advertising to enable MAC flow control.

How about:

to Pause for enabling MAC flow control

Quoted 2 lines

Change-Id: Ibf0f554b072fc73136ec9f7ffb90c20b25a4faae

Please remove this

Quoted 29 lines
---
 drivers/net/dsa/qca8k.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/dsa/qca8k.c +3 -1
index d93be14..95ac081 100644
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2009 Felix Fietkau <[email protected]>
  * Copyright (C) 2011-2012 Gabor Juhos <[email protected]>
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015, 2019, The Linux Foundation. All rights reserved.
  * Copyright (c) 2016 John Crispin <[email protected]>
  *
  * 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;
 }
 
Signature · 1 line
1.9.1
Signature · 1 line
~Vinod
#2 lore raw
In reply to xiaofeis
Quoted 22 lines · xiaofeis

Set phy device advertising to enable MAC flow control.

Change-Id Ibf0f554b072fc73136ec9f7ffb90c20b25a4faae
---
 drivers/net/dsa/qca8k.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/dsa/qca8k.c +1 -1
index d93be14..95ac081 100644
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2009 Felix Fietkau <[email protected]>
  * Copyright (C) 2011-2012 Gabor Juhos <[email protected]>
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015, 2019, The Linux Foundation. All rights reserved.
  * Copyright (c) 2016 John Crispin <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify

drivers/net/dsa/qca8k.c line 803

Quoted 4 lines
drivers/net/dsa/qca8k.c +1 -0
@@ -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

Quoted 7 lines
drivers/net/dsa/qca8k.c +1 -0
+
 	return 0;
 }
 
Signature · 1 line
1.9.1
maintainer
#4 lore raw
In reply to xiaofeis
Quoted 4 lines · xiaofeis

Set phy device advertising to enable MAC flow control.

Change-Id Ibf0f554b072fc73136ec9f7ffb90c20b25a4faae

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

maintainer
#3 lore raw
In reply to Niklas Cassel
Quoted 3 lines

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

#5 lore raw
In reply to Andrew Lunn

Hi Andrew

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

Thanks
Xiaofeis

Quoted 15 lines · Andrew Lunn
Quoted 4 lines · xiaofeis

Set phy device advertising to enable MAC flow control.

Change-Id Ibf0f554b072fc73136ec9f7ffb90c20b25a4faae

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