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: <CAGVrzcZVTHE4v4ckPqY3QcAWOffTmME+2vQX5PH3toggOE9fkg@mail.gmail.com>
Date:	Thu, 5 Dec 2013 17:06:06 -0800
From:	Florian Fainelli <f.fainelli@...il.com>
To:	netdev <netdev@...r.kernel.org>
Cc:	David Miller <davem@...emloft.net>,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	Andy Fleming <afleming@...il.com>,
	Kyle Moffett <kyle@...fetthome.net>,
	Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH 7/9] net: pxa168_eth: use phy_init_hw for PHY reset

2013/12/5 Florian Fainelli <f.fainelli@...il.com>:
> Instead of open-coding a PHY reset through the MII BMCR register, use
> phy_init_hw() which does this for us and ensures that PHY device fixups
> are also applied.
>
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
>  drivers/net/ethernet/marvell/pxa168_eth.c | 19 +------------------
>  1 file changed, 1 insertion(+), 18 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
> index fff6246..b3642a0 100644
> --- a/drivers/net/ethernet/marvell/pxa168_eth.c
> +++ b/drivers/net/ethernet/marvell/pxa168_eth.c
> @@ -321,23 +321,6 @@ static void ethernet_phy_set_addr(struct pxa168_eth_private *pep, int phy_addr)
>         wrl(pep, PHY_ADDRESS, reg_data);
>  }
>
> -static void ethernet_phy_reset(struct pxa168_eth_private *pep)
> -{
> -       int data;
> -
> -       data = phy_read(pep->phy, MII_BMCR);
> -       if (data < 0)
> -               return;
> -
> -       data |= BMCR_RESET;
> -       if (phy_write(pep->phy, MII_BMCR, data) < 0)
> -               return;
> -
> -       do {
> -               data = phy_read(pep->phy, MII_BMCR);
> -       } while (data >= 0 && data & BMCR_RESET);
> -}

I forgot a reference to ethernet_phy_reset() somewhere later in the
driver. Will wait for comments until I issue a respin of these
patches.
-- 
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