All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: document SMII and correct phylink's new validation mechanism
@ 2021-11-15 17:11 Russell King (Oracle)
  2021-11-15 17:18 ` Andrew Lunn
  2021-11-17  3:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2021-11-15 17:11 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: David S. Miller, netdev, Jakub Kicinski, Jonathan Corbet, linux-doc

SMII has not been documented in the kernel, but information on this PHY
interface mode has been recently found. Document it, and correct the
recently introduced phylink handling for this interface mode.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 Documentation/networking/phy.rst | 5 +++++
 drivers/net/phy/phylink.c        | 2 +-
 include/linux/phy.h              | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/networking/phy.rst b/Documentation/networking/phy.rst
index 571ba08386e7..d43da709bf40 100644
--- a/Documentation/networking/phy.rst
+++ b/Documentation/networking/phy.rst
@@ -237,6 +237,11 @@ negotiation results.
 
 Some of the interface modes are described below:
 
+``PHY_INTERFACE_MODE_SMII``
+    This is serial MII, clocked at 125MHz, supporting 100M and 10M speeds.
+    Some details can be found in
+    https://opencores.org/ocsvn/smii/smii/trunk/doc/SMII.pdf
+
 ``PHY_INTERFACE_MODE_1000BASEX``
     This defines the 1000BASE-X single-lane serdes link as defined by the
     802.3 standard section 36.  The link operates at a fixed bit rate of
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 33462fdc7add..f7156b6868e7 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -336,6 +336,7 @@ void phylink_get_linkmodes(unsigned long *linkmodes, phy_interface_t interface,
 
 	case PHY_INTERFACE_MODE_REVRMII:
 	case PHY_INTERFACE_MODE_RMII:
+	case PHY_INTERFACE_MODE_SMII:
 	case PHY_INTERFACE_MODE_REVMII:
 	case PHY_INTERFACE_MODE_MII:
 		caps |= MAC_10HD | MAC_10FD;
@@ -385,7 +386,6 @@ void phylink_get_linkmodes(unsigned long *linkmodes, phy_interface_t interface,
 
 	case PHY_INTERFACE_MODE_NA:
 	case PHY_INTERFACE_MODE_MAX:
-	case PHY_INTERFACE_MODE_SMII:
 		break;
 	}
 
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 96e43fbb2dd8..1e57cdd95da3 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -99,7 +99,7 @@ extern const int phy_10gbit_features_array[1];
  * @PHY_INTERFACE_MODE_RGMII_RXID: RGMII with Internal RX delay
  * @PHY_INTERFACE_MODE_RGMII_TXID: RGMII with Internal RX delay
  * @PHY_INTERFACE_MODE_RTBI: Reduced TBI
- * @PHY_INTERFACE_MODE_SMII: ??? MII
+ * @PHY_INTERFACE_MODE_SMII: Serial MII
  * @PHY_INTERFACE_MODE_XGMII: 10 gigabit media-independent interface
  * @PHY_INTERFACE_MODE_XLGMII:40 gigabit media-independent interface
  * @PHY_INTERFACE_MODE_MOCA: Multimedia over Coax
-- 
2.30.2


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

* Re: [PATCH net-next] net: document SMII and correct phylink's new validation mechanism
  2021-11-15 17:11 [PATCH net-next] net: document SMII and correct phylink's new validation mechanism Russell King (Oracle)
@ 2021-11-15 17:18 ` Andrew Lunn
  2021-11-17  3:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2021-11-15 17:18 UTC (permalink / raw)
  To: Russell King (Oracle)
  Cc: Heiner Kallweit, David S. Miller, netdev, Jakub Kicinski,
	Jonathan Corbet, linux-doc

On Mon, Nov 15, 2021 at 05:11:17PM +0000, Russell King (Oracle) wrote:
> SMII has not been documented in the kernel, but information on this PHY
> interface mode has been recently found. Document it, and correct the
> recently introduced phylink handling for this interface mode.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next] net: document SMII and correct phylink's new validation mechanism
  2021-11-15 17:11 [PATCH net-next] net: document SMII and correct phylink's new validation mechanism Russell King (Oracle)
  2021-11-15 17:18 ` Andrew Lunn
@ 2021-11-17  3:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-17  3:30 UTC (permalink / raw)
  To: Russell King; +Cc: andrew, hkallweit1, davem, netdev, kuba, corbet, linux-doc

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 15 Nov 2021 17:11:17 +0000 you wrote:
> SMII has not been documented in the kernel, but information on this PHY
> interface mode has been recently found. Document it, and correct the
> recently introduced phylink handling for this interface mode.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
>  Documentation/networking/phy.rst | 5 +++++
>  drivers/net/phy/phylink.c        | 2 +-
>  include/linux/phy.h              | 2 +-
>  3 files changed, 7 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [net-next] net: document SMII and correct phylink's new validation mechanism
    https://git.kernel.org/netdev/net-next/c/b9241f54138c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-11-17  3:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 17:11 [PATCH net-next] net: document SMII and correct phylink's new validation mechanism Russell King (Oracle)
2021-11-15 17:18 ` Andrew Lunn
2021-11-17  3:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.