diff mbox series

[net] net: ethernet: ave: Add capability of rgmii-id mode

Message ID 1580954376-27283-1-git-send-email-hayashi.kunihiko@socionext.com
State Changes Requested
Delegated to: David Miller
Headers show
Series [net] net: ethernet: ave: Add capability of rgmii-id mode | expand

Commit Message

Kunihiko Hayashi Feb. 6, 2020, 1:59 a.m. UTC
This allows you to specify the type of rgmii-id that will enable phy
internal delay in ethernet phy-mode.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
 drivers/net/ethernet/socionext/sni_ave.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

David Miller Feb. 7, 2020, 10:16 a.m. UTC | #1
From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Date: Thu,  6 Feb 2020 10:59:36 +0900

> This allows you to specify the type of rgmii-id that will enable phy
> internal delay in ethernet phy-mode.
> 
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>

I do not understand this change at all.

At a minimum you must explain things more clearly and completely in your
commit message.

Are you just adding all of the RGMII cases to the code that only currently
mentions PHY_INTERFACE_MODE_RGMII?  If so, why did you only do this for
some but not all of the get_pinmode() methods in this driver?

Thank you.
Kunihiko Hayashi Feb. 7, 2020, 11:59 a.m. UTC | #2
Hi David, 
Thank you for your comment.

On Fri, 7 Feb 2020 11:16:48 +0100 <davem@davemloft.net> wrote:

> From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> Date: Thu,  6 Feb 2020 10:59:36 +0900
> 
> > This allows you to specify the type of rgmii-id that will enable phy
> > internal delay in ethernet phy-mode.
> > 
> > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> 
> I do not understand this change at all.
> 
> At a minimum you must explain things more clearly and completely in your
> commit message.
> 
> Are you just adding all of the RGMII cases to the code that only currently
> mentions PHY_INTERFACE_MODE_RGMII?  If so, why did you only do this for
> some but not all of the get_pinmode() methods in this driver?

Yes, this is intended to add all of RGMII cases to the code.
I add the cases to all of get_pinmode() except LD11, because LD11 doesn't
support RGMII due to the constraint of the hardware.

When RGMII phy mode is specified in the devicetree for LD11, the driver
will abort with the message "invalid phy-mode setting".

If it is clear, I'll add this to the next commit message.

Thank you,

---
Best Regards,
Kunihiko Hayashi
David Miller Feb. 7, 2020, 12:27 p.m. UTC | #3
From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Date: Fri, 07 Feb 2020 20:59:01 +0900

> If it is clear, I'll add this to the next commit message.

Please do, thank you.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c
index 3b4c7e6..7c574f2 100644
--- a/drivers/net/ethernet/socionext/sni_ave.c
+++ b/drivers/net/ethernet/socionext/sni_ave.c
@@ -1857,6 +1857,9 @@  static int ave_pro4_get_pinmode(struct ave_private *priv,
 		break;
 	case PHY_INTERFACE_MODE_MII:
 	case PHY_INTERFACE_MODE_RGMII:
+	case PHY_INTERFACE_MODE_RGMII_ID:
+	case PHY_INTERFACE_MODE_RGMII_RXID:
+	case PHY_INTERFACE_MODE_RGMII_TXID:
 		priv->pinmode_val = 0;
 		break;
 	default:
@@ -1901,6 +1904,9 @@  static int ave_ld20_get_pinmode(struct ave_private *priv,
 		priv->pinmode_val = SG_ETPINMODE_RMII(0);
 		break;
 	case PHY_INTERFACE_MODE_RGMII:
+	case PHY_INTERFACE_MODE_RGMII_ID:
+	case PHY_INTERFACE_MODE_RGMII_RXID:
+	case PHY_INTERFACE_MODE_RGMII_TXID:
 		priv->pinmode_val = 0;
 		break;
 	default:
@@ -1923,6 +1929,9 @@  static int ave_pxs3_get_pinmode(struct ave_private *priv,
 		priv->pinmode_val = SG_ETPINMODE_RMII(arg);
 		break;
 	case PHY_INTERFACE_MODE_RGMII:
+	case PHY_INTERFACE_MODE_RGMII_ID:
+	case PHY_INTERFACE_MODE_RGMII_RXID:
+	case PHY_INTERFACE_MODE_RGMII_TXID:
 		priv->pinmode_val = 0;
 		break;
 	default: