diff mbox series

[net-next] Documentation: net: phy: reflect latest changes to phylib API

Message ID 27b5d4a5-4939-54d9-baed-6dd2ae743511@gmail.com
State Accepted
Delegated to: David Miller
Headers show
Series [net-next] Documentation: net: phy: reflect latest changes to phylib API | expand

Commit Message

Heiner Kallweit Jan. 25, 2019, 8:08 p.m. UTC
Recent changes to the phylib API
- removed phy_stop_interrupts
- replaced phy_start_interrupts with phy_request_interrupt
- moved some functionality from phy_connect() and phy_disconnect()
  to phy_start() and phy_stop() respectively.
Reflect these changes in the documentation.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 Documentation/networking/phy.txt | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

Comments

David Miller Jan. 26, 2019, 5:22 a.m. UTC | #1
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Fri, 25 Jan 2019 21:08:24 +0100

> Recent changes to the phylib API
> - removed phy_stop_interrupts
> - replaced phy_start_interrupts with phy_request_interrupt
> - moved some functionality from phy_connect() and phy_disconnect()
>   to phy_start() and phy_stop() respectively.
> Reflect these changes in the documentation.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Applied.
diff mbox series

Patch

diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt
index bdec0f700..7ecba4fd6 100644
--- a/Documentation/networking/phy.txt
+++ b/Documentation/networking/phy.txt
@@ -210,12 +210,16 @@  Letting the PHY Abstraction Layer do Everything
 
  Lastly, once the controller is ready to handle network traffic, you call
  phy_start(phydev).  This tells the PAL that you are ready, and configures the
- PHY to connect to the network.  If you want to handle your own interrupts,
- just set phydev->irq to PHY_IGNORE_INTERRUPT before you call phy_start.
- Similarly, if you don't want to use interrupts, set phydev->irq to PHY_POLL.
+ PHY to connect to the network. If the MAC interrupt of your network driver
+ also handles PHY status changes, just set phydev->irq to PHY_IGNORE_INTERRUPT
+ before you call phy_start and use phy_mac_interrupt() from the network
+ driver. If you don't want to use interrupts, set phydev->irq to PHY_POLL.
+ phy_start() enables the PHY interrupts (if applicable) and starts the
+ phylib state machine.
 
  When you want to disconnect from the network (even if just briefly), you call
- phy_stop(phydev).
+ phy_stop(phydev). This function also stops the phylib state machine and
+ disables PHY interrupts.
 
 Pause frames / flow control
 
@@ -271,11 +275,9 @@  Doing it all yourself
  
    A convenience function to print out the PHY status neatly.
 
- int phy_start_interrupts(struct phy_device *phydev);
- int phy_stop_interrupts(struct phy_device *phydev);
+ void phy_request_interrupt(struct phy_device *phydev);
 
-   Requests the IRQ for the PHY interrupts, then enables them for
-   start, or disables then frees them for stop.
+   Requests the IRQ for the PHY interrupts.
 
  struct phy_device * phy_attach(struct net_device *dev, const char *phy_id,
 		 phy_interface_t interface);