[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220905170026.ddiosfweckkwklhf@skbuf>
Date: Mon, 5 Sep 2022 17:00:27 +0000
From: Ioana Ciornei <ioana.ciornei@....com>
To: "davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "andrew@...n.ch" <andrew@...n.ch>,
"hkallweit1@...il.com" <hkallweit1@...il.com>,
"linux@...linux.org.uk" <linux@...linux.org.uk>,
"f.fainelli@...il.com" <f.fainelli@...il.com>
Subject: Re: [PATCH net] net: phy: aquantia: wait for the suspend/resume
operations to finish
On Mon, Sep 05, 2022 at 04:58:33PM +0300, Ioana Ciornei wrote:
> The Aquantia datasheet notes that after issuing a Processor-Intensive
> MDIO operation, like changing the low-power state of the device, the
> driver should wait for the operation to finish before issuing a new MDIO
> command.
>
> The new aqr107_wait_processor_intensive_op() function is added which can
> be used after these kind of MDIO operations. At the moment, we are only
> adding it at the end of the suspend/resume calls.
>
> The issue was identified on a board featuring the AQR113C PHY, on
> which commands like 'ip link (..) up / down' issued without any delays
> between them would render the link on the PHY to remain down.
> The issue was easy to reproduce with a one-liner:
> $ ip link set dev ethX down; ip link set dev ethX up; \
> ip link set dev ethX down; ip link set dev ethX up;
>
> Fixes: ac9e81c230eb ("net: phy: aquantia: add suspend / resume callbacks for AQR107 family")
> Signed-off-by: Ioana Ciornei <ioana.ciornei@....com>
I just stumbled upon the phy_read_mmd_poll_timeout() API which takes
care of polling on an MDIO register without having to declare a separate
read function.
I'll send a v2 on this with the change later today or tomorrow.
Ioana
Powered by blists - more mailing lists