From: Doug Berger <opendmb@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
"open list:BROADCOM GENET ETHERNET DRIVER"
<bcm-kernel-feedback-list@broadcom.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: bcmgenet: Add a shutdown callback
Date: Tue, 15 Oct 2019 10:45:35 -0700 [thread overview]
Message-ID: <81a0edb7-efa9-2abd-6158-52504efab913@gmail.com> (raw)
In-Reply-To: <20191015173624.10452-1-f.fainelli@gmail.com>
On 10/15/19 10:36 AM, Florian Fainelli wrote:
> Make sure that we completely quiesce the network device, including its
> DMA to avoid having it continue to receive packets while there is no
> software alive to service those.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> index 12cb77ef1081..ecbb1e7353ba 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> @@ -3597,6 +3597,11 @@ static int bcmgenet_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static void bcmgenet_shutdown(struct platform_device *pdev)
> +{
> + bcmgenet_remove(pdev);
> +}
> +
> #ifdef CONFIG_PM_SLEEP
> static int bcmgenet_resume(struct device *d)
> {
> @@ -3715,6 +3720,7 @@ static SIMPLE_DEV_PM_OPS(bcmgenet_pm_ops, bcmgenet_suspend, bcmgenet_resume);
> static struct platform_driver bcmgenet_driver = {
> .probe = bcmgenet_probe,
> .remove = bcmgenet_remove,
> + .shutdown = bcmgenet_shutdown,
> .driver = {
> .name = "bcmgenet",
> .of_match_table = bcmgenet_match,
>
Acked-by: Doug Berger <opendmb@gmail.com>
next prev parent reply other threads:[~2019-10-15 17:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 17:36 Florian Fainelli
2019-10-15 17:45 ` Doug Berger [this message]
2019-10-16 3:59 ` David Miller
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=81a0edb7-efa9-2abd-6158-52504efab913@gmail.com \
--to=opendmb@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®