]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: usb: lan78xx: Rename EVENT_LINK_RESET to EVENT_PHY_INT_ACK
authorOleksij Rempel <o.rempel@pengutronix.de>
Wed, 18 Jun 2025 12:25:58 +0000 (14:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Jun 2025 22:37:06 +0000 (15:37 -0700)
The EVENT_LINK_RESET macro currently triggers deferred work after a PHY
interrupt. Prior to PHYLINK conversion, this work included reconfiguring
the MAC and PHY, effectively performing a 'link reset'.

However, after porting the driver to the PHYLINK framework, the logic
associated with this event now solely handles the acknowledgment of
the PHY interrupt. The MAC and PHY reconfiguration is now managed by
PHYLINK's dedicated callbacks.

To accurately reflect its current, narrowed functionality, rename
EVENT_LINK_RESET to EVENT_PHY_INT_ACK.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20250618122602.3156678-3-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/lan78xx.c

index 61b2a7c26f606d3814b4b272fe61728fba4f43b8..18402a3922a64262344f2a3c4aeae321002c1235 100644 (file)
@@ -385,7 +385,7 @@ struct skb_data {           /* skb->cb is one of these */
 #define EVENT_RX_HALT                  1
 #define EVENT_RX_MEMORY                        2
 #define EVENT_STS_SPLIT                        3
-#define EVENT_LINK_RESET               4
+#define EVENT_PHY_INT_ACK              4
 #define EVENT_RX_PAUSED                        5
 #define EVENT_DEV_WAKING               6
 #define EVENT_DEV_ASLEEP               7
@@ -1642,7 +1642,7 @@ static void lan78xx_status(struct lan78xx_net *dev, struct urb *urb)
 
        if (intdata & INT_ENP_PHY_INT) {
                netif_dbg(dev, link, dev->net, "PHY INTR: 0x%08x\n", intdata);
-               lan78xx_defer_kevent(dev, EVENT_LINK_RESET);
+               lan78xx_defer_kevent(dev, EVENT_PHY_INT_ACK);
 
                if (dev->domain_data.phyirq > 0)
                        generic_handle_irq_safe(dev->domain_data.phyirq);
@@ -3524,7 +3524,7 @@ static int lan78xx_stop(struct net_device *net)
         */
        clear_bit(EVENT_TX_HALT, &dev->flags);
        clear_bit(EVENT_RX_HALT, &dev->flags);
-       clear_bit(EVENT_LINK_RESET, &dev->flags);
+       clear_bit(EVENT_PHY_INT_ACK, &dev->flags);
        clear_bit(EVENT_STAT_UPDATE, &dev->flags);
 
        cancel_delayed_work_sync(&dev->wq);
@@ -4448,10 +4448,10 @@ static void lan78xx_delayedwork(struct work_struct *work)
                }
        }
 
-       if (test_bit(EVENT_LINK_RESET, &dev->flags)) {
+       if (test_bit(EVENT_PHY_INT_ACK, &dev->flags)) {
                int ret = 0;
 
-               clear_bit(EVENT_LINK_RESET, &dev->flags);
+               clear_bit(EVENT_PHY_INT_ACK, &dev->flags);
                ret = lan78xx_phy_int_ack(dev);
                if (ret)
                        netdev_info(dev->net, "PHY INT ack failed (%pe)\n",