* [PATCH v1 net-next] lan78xx: Refactor interrupt handling and redundant messages
@ 2024-07-16 4:58 Rengarajan S
2024-07-16 13:14 ` Paolo Abeni
0 siblings, 1 reply; 2+ messages in thread
From: Rengarajan S @ 2024-07-16 4:58 UTC (permalink / raw)
To: woojung.huh, UNGLinuxDriver, davem, edumazet, kuba, pabeni,
netdev, linux-usb, linux-kernel
Cc: rengarajan.s
The MAC and PHY interrupt are not synchronized. When multiple phy
interrupt occur while the MAC interrupt is cleared, the phy handle
will not be called which causes the PHY interrupt to remain set
throughout. This is avoided by not clearing the MAC interrupt each
time. When the PHY interrupt is set, the MAC calls the PHY handle
and after processing the timestamp the PHY interrupt is cleared.
Also, avoided repetitive debug messages by replacing netdev_err
with netif_dbg.
Signed-off-by: Rengarajan S <rengarajan.s@microchip.com>
---
drivers/net/usb/lan78xx.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 62dbfff8dad4..5f4e167ceeb0 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -1421,11 +1421,6 @@ static int lan78xx_link_reset(struct lan78xx_net *dev)
int ladv, radv, ret, link;
u32 buf;
- /* clear LAN78xx interrupt status */
- ret = lan78xx_write_reg(dev, INT_STS, INT_STS_PHY_INT_);
- if (unlikely(ret < 0))
- return ret;
-
mutex_lock(&phydev->lock);
phy_read_status(phydev);
link = phydev->link;
@@ -1518,7 +1513,7 @@ static void lan78xx_defer_kevent(struct lan78xx_net *dev, int work)
{
set_bit(work, &dev->flags);
if (!schedule_delayed_work(&dev->wq, 0))
- netdev_err(dev->net, "kevent %d may have been dropped\n", work);
+ netif_dbg(dev, intr, dev->net, "kevent %d may have been dropped\n", work);
}
static void lan78xx_status(struct lan78xx_net *dev, struct urb *urb)
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1 net-next] lan78xx: Refactor interrupt handling and redundant messages
2024-07-16 4:58 [PATCH v1 net-next] lan78xx: Refactor interrupt handling and redundant messages Rengarajan S
@ 2024-07-16 13:14 ` Paolo Abeni
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Abeni @ 2024-07-16 13:14 UTC (permalink / raw)
To: Rengarajan S, woojung.huh, UNGLinuxDriver, davem, edumazet, kuba,
netdev, linux-usb, linux-kernel
On 7/16/24 06:58, Rengarajan S wrote:
> The MAC and PHY interrupt are not synchronized. When multiple phy
> interrupt occur while the MAC interrupt is cleared, the phy handle
> will not be called which causes the PHY interrupt to remain set
> throughout. This is avoided by not clearing the MAC interrupt each
> time. When the PHY interrupt is set, the MAC calls the PHY handle
> and after processing the timestamp the PHY interrupt is cleared.
> Also, avoided repetitive debug messages by replacing netdev_err
> with netif_dbg.
>
> Signed-off-by: Rengarajan S <rengarajan.s@microchip.com>
## Form letter - net-next-closed
The merge window for v6.11 and therefore net-next is closed for new
drivers, features, code refactoring and optimizations. We are currently
accepting bug fixes only.
Please repost when net-next reopens after July 29th.
RFC patches sent for review only are obviously welcome at any time.
See:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
--
pw-bot: defer
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-16 13:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-16 4:58 [PATCH v1 net-next] lan78xx: Refactor interrupt handling and redundant messages Rengarajan S
2024-07-16 13:14 ` Paolo Abeni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®