[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151119005556.GA4882@electric-eye.fr.zoreil.com>
Date: Thu, 19 Nov 2015 01:55:56 +0100
From: Francois Romieu <romieu@...zoreil.com>
To: Ondrej Zary <linux@...nbow-software.org>
Cc: netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3 v2] dl2k: Implement suspend
Ondrej Zary <linux@...nbow-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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists