lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51D19122.6030409@cogentembedded.com>
Date:	Mon, 01 Jul 2013 18:24:34 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Simon Horman <horms+renesas@...ge.net.au>
CC:	netdev@...r.kernel.org, linux-sh@...r.kernel.org,
	Magnus Damm <magnus.damm@...il.com>
Subject: Re: [PATCH net-next v3 1/3] sh_eth: add support for gpio reset

Hello.

On 01-07-2013 8:24, Simon Horman wrote:

> Allow reset using a GPIO. In order to use this set the following
> in the device's platform data:

> 	needs_gpio_reset = 1
> 	reset_gpio = GPIO pin to use

> This patch is motivated by the lager board which uses the r8a7790 SoC
> which has a GPIO pin to reset its sh_eth device.

> Signed-off-by: Simon Horman <horms+renesas@...ge.net.au>

> --

> v2
> * First post
> ---
>   drivers/net/ethernet/renesas/sh_eth.c | 4 ++++
>   include/linux/sh_eth.h                | 3 +++
>   2 files changed, 7 insertions(+)

> diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> index 7732f11..0253f61 100644
> --- a/drivers/net/ethernet/renesas/sh_eth.c
> +++ b/drivers/net/ethernet/renesas/sh_eth.c
[...]
> @@ -2652,6 +2653,9 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
>   		ndev->features = NETIF_F_HW_VLAN_CTAG_FILTER;
>   	}
>
> +	if (pd->needs_gpio_reset)
> +		gpio_request_one(pd->reset_gpio, GPIOF_OUT_INIT_HIGH, NULL);

    Is reset signal active low or active high? Are you asserting or 
releasing it?

> diff --git a/include/linux/sh_eth.h b/include/linux/sh_eth.h
> index fc30571..b3f1550 100644
> --- a/include/linux/sh_eth.h
> +++ b/include/linux/sh_eth.h
> @@ -22,6 +22,9 @@ struct sh_eth_plat_data {
>   	unsigned no_ether_link:1;
>   	unsigned ether_link_active_low:1;
>   	unsigned needs_init:1;
> +	unsigned needs_gpio_reset:1;
> +
> +	unsigned reset_gpio;	/* Used if needs_gpio_reset is true */

    s/true/1/.

WBR, Sergei

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ