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] [day] [month] [year] [list]
Message-ID: <20150521215700.GN18303@xsjsorenbubuntu>
Date:	Thu, 21 May 2015 14:57:00 -0700
From:	Sören Brinkmann <soren.brinkmann@...inx.com>
To:	Nathan Sullivan <nathan.sullivan@...com>
CC:	<nicolas.ferre@...el.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: macb: Disable half duplex gigabit on Zynq

On Thu, 2015-05-21 at 04:47PM -0500, Nathan Sullivan wrote:
> According to the Zynq TRM, gigabit half duplex is not supported.  Add a
> new cap and compatible string so Zynq can avoid advertising that mode.
> 
> Signed-off-by: Nathan Sullivan <nathan.sullivan@...com>
> ---
>  drivers/net/ethernet/cadence/macb.c |   12 ++++++++++++
>  drivers/net/ethernet/cadence/macb.h |    1 +
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index 61aa570..e7c0ef6 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -350,6 +350,9 @@ static int macb_mii_probe(struct net_device *dev)
>  	else
>  		phydev->supported &= PHY_BASIC_FEATURES;
>  
> +	if (bp->caps & MACB_CAPS_NO_GIGABIT_HALF)
> +		phydev->supported &= ~SUPPORTED_1000baseT_Half;
> +
>  	phydev->advertising = phydev->supported;
>  
>  	bp->link = 0;
> @@ -2693,6 +2696,14 @@ static const struct macb_config emac_config = {
>  	.init = at91ether_init,
>  };
>  
> +static const struct macb_config zynq_config = {
> +	.caps = MACB_CAPS_SG_DISABLED | MACB_CAPS_GIGABIT_MODE_AVAILABLE |
> +		MACB_CAPS_NO_GIGABIT_HALF,
> +	.dma_burst_length = 16,
> +	.clk_init = macb_clk_init,
> +	.init = macb_init,
> +};
> +
>  static const struct of_device_id macb_dt_ids[] = {
>  	{ .compatible = "cdns,at32ap7000-macb" },
>  	{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
> @@ -2703,6 +2714,7 @@ static const struct of_device_id macb_dt_ids[] = {
>  	{ .compatible = "atmel,sama5d4-gem", .data = &sama5d4_config },
>  	{ .compatible = "cdns,at91rm9200-emac", .data = &emac_config },
>  	{ .compatible = "cdns,emac", .data = &emac_config },
> +	{ .compatible = "cdns,zynq-gem", .data = &zynq_config },

I wanted to add something like that already to sort out the clocks in a
better way, but never got to it. So, ACK at least for this part, but it
needs to be documented in the binding documentation.

	Sören
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ