From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Robert Hancock <hancock@sedsystems.ca>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: sfp: Stop SFP polling during shutdown
Date: Fri, 31 May 2019 21:12:41 +0100 [thread overview]
Message-ID: <20190531201241.k7aqz3axhkpdro5e@shell.armlinux.org.uk> (raw)
In-Reply-To: <1559330285-30246-2-git-send-email-hancock@sedsystems.ca>
On Fri, May 31, 2019 at 01:18:02PM -0600, Robert Hancock wrote:
> SFP device polling can cause problems during the shutdown process if the
> parent devices of the network controller have been shut down already.
> This problem was seen on the iMX6 platform with PCIe devices, where
> accessing the device after the bus is shut down causes a hang.
>
> Stop all delayed work in the SFP driver during the shutdown process to
> avoid this problem.
What about interrupts?
>
> Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
> ---
> drivers/net/phy/sfp.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
> index 554acc8..6b6c83d 100644
> --- a/drivers/net/phy/sfp.c
> +++ b/drivers/net/phy/sfp.c
> @@ -1928,9 +1928,18 @@ static int sfp_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static void sfp_shutdown(struct platform_device *pdev)
> +{
> + struct sfp *sfp = platform_get_drvdata(pdev);
> +
> + cancel_delayed_work_sync(&sfp->poll);
> + cancel_delayed_work_sync(&sfp->timeout);
> +}
> +
> static struct platform_driver sfp_driver = {
> .probe = sfp_probe,
> .remove = sfp_remove,
> + .shutdown = sfp_shutdown,
> .driver = {
> .name = "sfp",
> .of_match_table = sfp_of_match,
> --
> 1.8.3.1
>
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
next prev parent reply other threads:[~2019-05-31 20:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 19:18 [PATCH net-next] net: sfp: Set 1000BaseX support flag for 1000BaseT modules Robert Hancock
2019-05-31 19:18 ` [PATCH net-next] net: sfp: Stop SFP polling during shutdown Robert Hancock
2019-05-31 20:12 ` Russell King - ARM Linux admin [this message]
2019-05-31 22:40 ` Robert Hancock
2019-05-31 19:18 ` [PATCH net-next] net: sfp: Use smaller chunk size when reading I2C data Robert Hancock
2019-05-31 20:13 ` Russell King - ARM Linux admin
2019-05-31 19:18 ` [PATCH net-next] net: phy: phylink: add fallback from SGMII to 1000BaseX Robert Hancock
2019-05-31 20:18 ` Russell King - ARM Linux admin
2019-06-01 0:17 ` Robert Hancock
2019-06-02 15:15 ` Russell King - ARM Linux admin
2019-06-07 18:10 ` Robert Hancock
2019-06-07 18:34 ` Russell King - ARM Linux admin
2019-06-01 9:46 ` Sergei Shtylyov
2019-05-31 19:18 ` [PATCH net-next] net: phy: phylink: support using device PHY in fixed or 802.3z mode Robert Hancock
2019-05-31 19:29 ` David Miller
2019-05-31 19:41 ` Robert Hancock
2019-05-31 19:42 ` David Miller
2019-05-31 20:31 ` Russell King - ARM Linux admin
2019-06-01 0:33 ` Robert Hancock
2019-06-01 20:10 ` Russell King - ARM Linux admin
2019-06-07 18:15 ` Robert Hancock
2019-05-31 20:11 ` [PATCH net-next] net: sfp: Set 1000BaseX support flag for 1000BaseT modules Russell King - ARM Linux admin
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=20190531201241.k7aqz3axhkpdro5e@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=hancock@sedsystems.ca \
--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).