From: Francois Romieu <romieu@fr.zoreil.com>
To: Ondrej Zary <linux@rainbow-software.org>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3 v2] dl2k: Implement suspend
Date: Thu, 19 Nov 2015 01:55:56 +0100 [thread overview]
Message-ID: <20151119005556.GA4882@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <1447882589-11264-3-git-send-email-linux@rainbow-software.org>
Ondrej Zary <linux@rainbow-software.org> :
[...]
> diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
> index 9e9baa0..28a96d3 100644
> --- a/drivers/net/ethernet/dlink/dl2k.c
> +++ b/drivers/net/ethernet/dlink/dl2k.c
[...]
> @@ -1824,11 +1831,55 @@ rio_remove1 (struct pci_dev *pdev)
> }
> }
>
> +#ifdef CONFIG_PM_SLEEP
> +static int rio_suspend(struct device *device)
> +{
> + struct net_device *dev = dev_get_drvdata(device);
> + struct netdev_private *np = netdev_priv(dev);
> +
> + if (!netif_running(dev))
> + return 0;
> +
> + netif_device_detach(dev);
> + del_timer_sync(&np->timer);
> + rio_hw_stop(dev);
> +
> + return 0;
> +}
> +
> +static int rio_resume(struct device *device)
> +{
> + struct net_device *dev = dev_get_drvdata(device);
> + struct netdev_private *np = netdev_priv(dev);
> +
> + if (!netif_running(dev))
> + return 0;
> +
> + rio_reset_ring(np);
Almost. You should give the Rx/Tx descriptor 'status' word some love.
--
Ueimor
prev parent reply other threads:[~2015-11-19 0:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 21:36 [PATCH 1/3 v2] dl2k: Handle memory allocation errors in alloc_list Ondrej Zary
2015-11-18 21:36 ` [PATCH 2/3] dl2k: Reorder and cleanup initialization Ondrej Zary
2015-11-18 21:36 ` [PATCH 3/3 v2] dl2k: Implement suspend Ondrej Zary
2015-11-19 0:55 ` Francois Romieu [this message]
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=20151119005556.GA4882@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rainbow-software.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®