From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: "Marek Behún" <kabel@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH net-next v2 3/5] net: sfp: create/destroy I2C mdiobus before PHY probe/after PHY release
Date: Fri, 30 Oct 2020 16:31:58 +0000 [thread overview]
Message-ID: <20201030163158.GE1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <20201029222509.27201-4-kabel@kernel.org>
On Thu, Oct 29, 2020 at 11:25:07PM +0100, Marek Behún wrote:
> @@ -1936,8 +1950,10 @@ static void sfp_sm_main(struct sfp *sfp, unsigned int event)
> sfp_sm_link_down(sfp);
> if (sfp->sm_state > SFP_S_INIT)
> sfp_module_stop(sfp->sfp_bus);
> - if (sfp->mod_phy)
> + if (sfp->mod_phy) {
> sfp_sm_phy_detach(sfp);
> + sfp_i2c_mdiobus_destroy(sfp);
> + }
if (sfp->mod_phy)
sfp_sm_phy_detach(sfp);
if (sfp->i2c_mii)
sfp_i2c_mdiobus_destroy(sfp);
would be better IMHO, in case we end up with the MDIO bus registered
but don't discover a PHY. (which is entirely possible with Mikrotik
SFPs where the PHY is not accessible.)
Other than that, I don't see any obvious issues.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2020-10-30 16:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 22:25 [PATCH net-next v2 0/5] Support for RollBall 10G copper SFP modules Marek Behún
2020-10-29 22:25 ` [PATCH net-next v2 1/5] net: phy: mdio-i2c: support I2C MDIO protocol for RollBall " Marek Behún
2020-10-30 15:20 ` Russell King - ARM Linux admin
2020-10-29 22:25 ` [PATCH net-next v2 2/5] net: phylink: allow attaching phy for SFP modules on 802.3z mode Marek Behún
2020-10-30 16:29 ` Russell King - ARM Linux admin
2020-10-29 22:25 ` [PATCH net-next v2 3/5] net: sfp: create/destroy I2C mdiobus before PHY probe/after PHY release Marek Behún
2020-10-30 16:31 ` Russell King - ARM Linux admin [this message]
2020-10-29 22:25 ` [PATCH net-next v2 4/5] net: phy: marvell10g: change MACTYPE if underlying MAC does not support it Marek Behún
2020-10-29 22:25 ` [PATCH net-next v2 5/5] net: sfp: add support for multigig RollBall transceivers Marek Behún
2020-10-30 16:33 ` Russell King - ARM Linux admin
2020-10-30 15:01 ` [PATCH net-next v2 0/5] Support for RollBall 10G copper SFP modules Russell King - ARM Linux admin
2020-10-30 15:29 ` Vladimir Oltean
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=20201030163158.GE1551@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kabel@kernel.org \
--cc=netdev@vger.kernel.org \
/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).