From: Jakub Kicinski <kuba@kernel.org>
To: Pawel Dembicki <paweldembicki@gmail.com>
Cc: netdev@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 3/5] net: dsa: vsc73xx: check busy flag in MDIO operations
Date: Wed, 7 Aug 2024 20:09:19 -0700 [thread overview]
Message-ID: <20240807200919.5444d131@kernel.org> (raw)
In-Reply-To: <20240805211031.1689134-4-paweldembicki@gmail.com>
On Mon, 5 Aug 2024 23:10:29 +0200 Pawel Dembicki wrote:
> - msleep(2);
> +
> + ret = vsc73xx_mdio_busy_check(vsc);
> + if (ret)
> + return ret;
> +
> ret = vsc73xx_read(vsc, VSC73XX_BLOCK_MII, 0, 2, &val);
> +
> if (ret)
nit: why the empty line between call and error check?
> return ret;
> if (val & BIT(16)) {
> @@ -561,7 +593,11 @@ static int vsc73xx_phy_write(struct dsa_switch *ds, int phy, int regnum,
> {
> struct vsc73xx *vsc = ds->priv;
> u32 cmd;
> - int ret;
> + int ret = 0;
> +
> + ret = vsc73xx_mdio_busy_check(vsc);
nit: why init ret to 0 ?
next prev parent reply other threads:[~2024-08-08 3:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 21:10 [PATCH net v2 0/5] net: dsa: vsc73xx: fix MDIO bus access and PHY operations Pawel Dembicki
2024-08-05 21:10 ` [PATCH net v2 1/5] net: dsa: vsc73xx: fix port MAC configuration in full duplex mode Pawel Dembicki
2024-08-05 21:10 ` [PATCH net v2 2/5] net: dsa: vsc73xx: pass value in phy_write operation Pawel Dembicki
2024-08-05 21:10 ` [PATCH net v2 3/5] net: dsa: vsc73xx: check busy flag in MDIO operations Pawel Dembicki
2024-08-08 3:09 ` Jakub Kicinski [this message]
2024-08-05 21:10 ` [PATCH net v2 4/5] net: dsa: vsc73xx: allow phy resetting Pawel Dembicki
2024-08-05 21:10 ` [PATCH net v2 5/5] net: phy: vitesse: repair vsc73xx autonegotiation Pawel Dembicki
2024-08-08 3:09 ` Jakub Kicinski
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=20240807200919.5444d131@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=paweldembicki@gmail.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;
as well as URLs for NNTP newsgroup(s).