Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1272725

Re: [PATCH 3/3 v2] dl2k: Implement suspend

From Francois Romieu <romieu@fr.zoreil.com>
Newsgroups linux.kernel
Subject Re: [PATCH 3/3 v2] dl2k: Implement suspend
Date 2015-11-19 02:00 +0100
Message-ID <qwlJU-2a0-11@gated-at.bofh.it> (permalink)
References <qwiCm-f0-17@gated-at.bofh.it> <qwiCm-f0-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 3/3 v2] dl2k: Implement suspend Ondrej Zary <linux@rainbow-software.org> - 2015-11-18 22:40 +0100
  Re: [PATCH 3/3 v2] dl2k: Implement suspend Francois Romieu <romieu@fr.zoreil.com> - 2015-11-19 02:00 +0100

csiph-web