From: Andrew Lunn <andrew@lunn.ch>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: micrel: Fix lan8841_config_intr after getting out of sleep mode
Date: Thu, 23 May 2024 16:32:26 +0200 [thread overview]
Message-ID: <f73778fe-ef01-44b4-9a8d-cd2a978c1a3d@lunn.ch> (raw)
In-Reply-To: <20240523074226.3540332-1-horatiu.vultur@microchip.com>
On Thu, May 23, 2024 at 09:42:26AM +0200, Horatiu Vultur wrote:
> When the interrupt is enabled, the function lan8841_config_intr tries to
> clear any pending interrupts by reading the interrupt status, then
> checks the return value for errors and then continue to enable the
> interrupt. It has been seen that once the system gets out of sleep mode,
> the interrupt status has the value 0x400 meaning that the PHY detected
> that the link was in low power. That is correct value but the problem is
> that the check is wrong. We try to check for errors but we return an
> error also in this case which is not an error. Therefore fix this by
> returning only when there is an error.
Is the second case also broken in the same way?
} else {
err = phy_write(phydev, LAN8814_INTC, 0);
if (err)
return err;
err = phy_read(phydev, LAN8814_INTS);
}
return err;
e.g. there was an outstanding interrupt as interrupts are
disabled. This will cause the return value of the function to be not
0?
Andrew
next prev parent reply other threads:[~2024-05-23 14:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-23 7:42 Horatiu Vultur
2024-05-23 14:32 ` Andrew Lunn [this message]
2024-05-23 18:28 ` Horatiu Vultur
2024-05-23 16:35 ` [EXTERNAL] " Suman Ghosh
2024-05-24 6:45 ` Horatiu Vultur
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=f73778fe-ef01-44b4-9a8d-cd2a978c1a3d@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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®