* [PATCH net] net: phy: Document phydev::dev_flags bits allocation
@ 2021-05-26 18:46 Florian Fainelli
2021-05-26 18:53 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Florian Fainelli @ 2021-05-26 18:46 UTC (permalink / raw)
To: netdev
Cc: olteanv, Florian Fainelli, Andrew Lunn, Heiner Kallweit,
Russell King, open list
Document the phydev::dev_flags bit allocation to allow bits 15:0 to
define PHY driver specific behavior, bits 23:16 to be reserved for now,
and bits 31:24 to hold generic PHY driver flags.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
include/linux/phy.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 60d2b26026a2..852743f07e3e 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -496,6 +496,11 @@ struct macsec_ops;
* @mac_managed_pm: Set true if MAC driver takes of suspending/resuming PHY
* @state: State of the PHY for management purposes
* @dev_flags: Device-specific flags used by the PHY driver.
+ * Bits [15:0] are free to use by the PHY driver to communicate
+ * driver specific behavior.
+ * Bits [23:16] are currently reserved for future use.
+ * Bits [31:24] are reserved for defining generic
+ * PHY driver behavior.
* @irq: IRQ number of the PHY's interrupt (-1 if none)
* @phy_timer: The timer for handling the state machine
* @phylink: Pointer to phylink instance for this PHY
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: phy: Document phydev::dev_flags bits allocation
2021-05-26 18:46 [PATCH net] net: phy: Document phydev::dev_flags bits allocation Florian Fainelli
@ 2021-05-26 18:53 ` Andrew Lunn
2021-05-26 19:01 ` Russell King (Oracle)
2021-05-26 18:59 ` Russell King (Oracle)
2021-05-26 20:30 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2021-05-26 18:53 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, olteanv, Heiner Kallweit, Russell King, open list
On Wed, May 26, 2021 at 11:46:17AM -0700, Florian Fainelli wrote:
> Document the phydev::dev_flags bit allocation to allow bits 15:0 to
> define PHY driver specific behavior, bits 23:16 to be reserved for now,
> and bits 31:24 to hold generic PHY driver flags.
Hi Florian
This is good as far as it goes. But do we want to give a hint that if
the MAC driver sets bits in [15:0] it should first verify the PHY has
the ID which is expected?
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: phy: Document phydev::dev_flags bits allocation
2021-05-26 18:46 [PATCH net] net: phy: Document phydev::dev_flags bits allocation Florian Fainelli
2021-05-26 18:53 ` Andrew Lunn
@ 2021-05-26 18:59 ` Russell King (Oracle)
2021-05-26 20:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: Russell King (Oracle) @ 2021-05-26 18:59 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, olteanv, Andrew Lunn, Heiner Kallweit, open list
On Wed, May 26, 2021 at 11:46:17AM -0700, Florian Fainelli wrote:
> Document the phydev::dev_flags bit allocation to allow bits 15:0 to
> define PHY driver specific behavior, bits 23:16 to be reserved for now,
> and bits 31:24 to hold generic PHY driver flags.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Yay!
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: phy: Document phydev::dev_flags bits allocation
2021-05-26 18:53 ` Andrew Lunn
@ 2021-05-26 19:01 ` Russell King (Oracle)
0 siblings, 0 replies; 5+ messages in thread
From: Russell King (Oracle) @ 2021-05-26 19:01 UTC (permalink / raw)
To: Andrew Lunn; +Cc: Florian Fainelli, netdev, olteanv, Heiner Kallweit, open list
On Wed, May 26, 2021 at 08:53:41PM +0200, Andrew Lunn wrote:
> On Wed, May 26, 2021 at 11:46:17AM -0700, Florian Fainelli wrote:
> > Document the phydev::dev_flags bit allocation to allow bits 15:0 to
> > define PHY driver specific behavior, bits 23:16 to be reserved for now,
> > and bits 31:24 to hold generic PHY driver flags.
>
> This is good as far as it goes. But do we want to give a hint that if
> the MAC driver sets bits in [15:0] it should first verify the PHY has
> the ID which is expected?
Hi Andrew,
I think we probably need a helper for that - while we can match
phydev->phy_id, that only works for C22 PHYs. Matching the C45
IDs is much more painful. So, I think a helper would be good,
even if initially it just checks the C22 ID.
Thoughts?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: phy: Document phydev::dev_flags bits allocation
2021-05-26 18:46 [PATCH net] net: phy: Document phydev::dev_flags bits allocation Florian Fainelli
2021-05-26 18:53 ` Andrew Lunn
2021-05-26 18:59 ` Russell King (Oracle)
@ 2021-05-26 20:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-26 20:30 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, olteanv, andrew, hkallweit1, linux, linux-kernel
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Wed, 26 May 2021 11:46:17 -0700 you wrote:
> Document the phydev::dev_flags bit allocation to allow bits 15:0 to
> define PHY driver specific behavior, bits 23:16 to be reserved for now,
> and bits 31:24 to hold generic PHY driver flags.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> include/linux/phy.h | 5 +++++
> 1 file changed, 5 insertions(+)
Here is the summary with links:
- [net] net: phy: Document phydev::dev_flags bits allocation
https://git.kernel.org/netdev/net/c/62f3415db237
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] 5+ messages in thread
end of thread, other threads:[~2021-05-26 20:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 18:46 [PATCH net] net: phy: Document phydev::dev_flags bits allocation Florian Fainelli
2021-05-26 18:53 ` Andrew Lunn
2021-05-26 19:01 ` Russell King (Oracle)
2021-05-26 18:59 ` Russell King (Oracle)
2021-05-26 20: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.