From: Rengarajan S <rengarajan.s@microchip.com>
To: <woojung.huh@microchip.com>, <UNGLinuxDriver@microchip.com>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <netdev@vger.kernel.org>,
<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <rengarajan.s@microchip.com>
Subject: [PATCH v1 net-next] lan78xx: Refactor interrupt handling and redundant messages
Date: Tue, 16 Jul 2024 10:28:18 +0530 [thread overview]
Message-ID: <20240716045818.1257906-1-rengarajan.s@microchip.com> (raw)
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
next reply other threads:[~2024-07-16 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 4:58 Rengarajan S [this message]
2024-07-16 13:14 ` Paolo Abeni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240716045818.1257906-1-rengarajan.s@microchip.com \
--to=rengarajan.s@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=woojung.huh@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®