Skip to content

Commit c9280f9

Browse files
oleremNipaLocal
authored andcommitted
net: usb: lan78xx: Rename EVENT_LINK_RESET to EVENT_PHY_INT_ACK
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 <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent ad39473 commit c9280f9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/net/usb/lan78xx.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ struct skb_data { /* skb->cb is one of these */
385385
#define EVENT_RX_HALT 1
386386
#define EVENT_RX_MEMORY 2
387387
#define EVENT_STS_SPLIT 3
388-
#define EVENT_LINK_RESET 4
388+
#define EVENT_PHY_INT_ACK 4
389389
#define EVENT_RX_PAUSED 5
390390
#define EVENT_DEV_WAKING 6
391391
#define EVENT_DEV_ASLEEP 7
@@ -1642,7 +1642,7 @@ static void lan78xx_status(struct lan78xx_net *dev, struct urb *urb)
16421642

16431643
if (intdata & INT_ENP_PHY_INT) {
16441644
netif_dbg(dev, link, dev->net, "PHY INTR: 0x%08x\n", intdata);
1645-
lan78xx_defer_kevent(dev, EVENT_LINK_RESET);
1645+
lan78xx_defer_kevent(dev, EVENT_PHY_INT_ACK);
16461646

16471647
if (dev->domain_data.phyirq > 0)
16481648
generic_handle_irq_safe(dev->domain_data.phyirq);
@@ -3524,7 +3524,7 @@ static int lan78xx_stop(struct net_device *net)
35243524
*/
35253525
clear_bit(EVENT_TX_HALT, &dev->flags);
35263526
clear_bit(EVENT_RX_HALT, &dev->flags);
3527-
clear_bit(EVENT_LINK_RESET, &dev->flags);
3527+
clear_bit(EVENT_PHY_INT_ACK, &dev->flags);
35283528
clear_bit(EVENT_STAT_UPDATE, &dev->flags);
35293529

35303530
cancel_delayed_work_sync(&dev->wq);
@@ -4448,10 +4448,10 @@ static void lan78xx_delayedwork(struct work_struct *work)
44484448
}
44494449
}
44504450

4451-
if (test_bit(EVENT_LINK_RESET, &dev->flags)) {
4451+
if (test_bit(EVENT_PHY_INT_ACK, &dev->flags)) {
44524452
int ret = 0;
44534453

4454-
clear_bit(EVENT_LINK_RESET, &dev->flags);
4454+
clear_bit(EVENT_PHY_INT_ACK, &dev->flags);
44554455
ret = lan78xx_phy_int_ack(dev);
44564456
if (ret)
44574457
netdev_info(dev->net, "PHY INT ack failed (%pe)\n",

0 commit comments

Comments
 (0)