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]
Date:	Wed, 10 Jun 2015 12:17:49 -0700
From:	Florian Fainelli <f.fainelli@...il.com>
To:	netdev@...r.kernel.org
CC:	davem@...emloft.net, pgynther@...gle.com, jaedon.shin@...il.com
Subject: Re: [PATCH net-next 2/2] net: phy: mdio-bcm-unimac: handle broken
 turn-around for specific PHYs

On 10/06/15 12:14, Florian Fainelli wrote:
> Some Ethernet PHYs/switches such as Broadcom's BCM53125 have a hardware bug
> which makes them not release the MDIO line during turn-around time.  This gets
> flagged by the UniMAC MDIO controller as a read failure, and we fail the read
> transaction.
> 
> Check the MDIO bus phy_ignore_ta_mask bitmask for the PHY we are reading
> from and if it is listed in this bitmask, ignore the read failure and
> proceed with returning the data we read out of the controller.

Scratch that version, it contains an unnecessary include and does not
have the same comment as the GENET version, let me resubmit that.

> 
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
>  drivers/net/phy/mdio-bcm-unimac.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/mdio-bcm-unimac.c b/drivers/net/phy/mdio-bcm-unimac.c
> index 414fdf1f343f..2237d5554e02 100644
> --- a/drivers/net/phy/mdio-bcm-unimac.c
> +++ b/drivers/net/phy/mdio-bcm-unimac.c
> @@ -16,6 +16,7 @@
>  #include <linux/module.h>
>  #include <linux/io.h>
>  #include <linux/delay.h>
> +#include <linux/brcmphy.h>
>  
>  #include <linux/of.h>
>  #include <linux/of_platform.h>
> @@ -81,7 +82,7 @@ static int unimac_mdio_read(struct mii_bus *bus, int phy_id, int reg)
>  		return -ETIMEDOUT;
>  
>  	cmd = __raw_readl(priv->base + MDIO_CMD);
> -	if (cmd & MDIO_READ_FAIL)
> +	if (!(bus->phy_ignore_ta_mask & 1 << phy_id) && (cmd & MDIO_READ_FAIL))
>  		return -EIO;
>  
>  	return cmd & 0xffff;
> 


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