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]
Date:	Tue, 10 Dec 2013 09:10:36 -0800
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Rafał Miłecki <zajec5@...il.com>
Cc:	netdev <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Hauke Mehrtens <hauke@...ke-m.de>
Subject: Re: [PATCH 1/2] bgmac: drop duplicated PHY defines

Hello Rafal

2013/12/10 Rafał Miłecki <zajec5@...il.com>:
> Signed-off-by: Rafał Miłecki <zajec5@...il.com>
> ---
>  drivers/net/ethernet/broadcom/bgmac.c |    6 ++----
>  drivers/net/ethernet/broadcom/bgmac.h |   21 ---------------------
>  2 files changed, 2 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
> index 0452937..ad4b2f1 100644
> --- a/drivers/net/ethernet/broadcom/bgmac.c
> +++ b/drivers/net/ethernet/broadcom/bgmac.c
> @@ -725,11 +725,9 @@ static void bgmac_phy_reset(struct bgmac *bgmac)
>         if (bgmac->phyaddr == BGMAC_PHY_NOREGS)
>                 return;
>
> -       bgmac_phy_write(bgmac, bgmac->phyaddr, BGMAC_PHY_CTL,
> -                       BGMAC_PHY_CTL_RESET);
> +       bgmac_phy_write(bgmac, bgmac->phyaddr, MII_BMCR, BMCR_RESET);
>         udelay(100);
> -       if (bgmac_phy_read(bgmac, bgmac->phyaddr, BGMAC_PHY_CTL) &
> -           BGMAC_PHY_CTL_RESET)
> +       if (bgmac_phy_read(bgmac, bgmac->phyaddr, MII_BMCR) & BMCR_RESET)
>                 bgmac_err(bgmac, "PHY reset failed\n");
>         bgmac_phy_init(bgmac);

phy_init_hw() now issues a PHY reset through BMCR_RESET, you might
want to use it instead of this here:

- the 100 microseconds delay might not be sufficient for all PHYs out there
- any PHY fixup (although there are none for BCM47xx yet) would be
wiped out by this "wild" PHY reset

This is quite new, so I do not expect you knew about this.
--
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