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:	Sun, 08 May 2016 23:22:17 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Philippe Reynes <tremyfr@...il.com>, fugang.duan@....com,
	davem@...emloft.net, kan.liang@...el.com, decot@...glers.com,
	aduyck@...antis.com, jiri@...lanox.com, jacob.e.keller@...el.com,
	tom@...bertland.com, andrew@...n.ch
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] net: ethernet: fec: use phydev from struct
 net_device

On Sun, 2016-05-08 at 23:44 +0200, Philippe Reynes wrote:
> The private structure contain a pointer to phydev, but the structure
> net_device already contain such pointer. So we can remove the pointer
> phydev in the private structure, and update the driver to use the one
> contained in struct net_device.

But there is no central code that updates the pointer, so:

[...]
> @@ -1928,7 +1926,6 @@ static int fec_enet_mii_probe(struct net_device *ndev)
>  
>  	phy_dev->advertising = phy_dev->supported;
>  
> -	fep->phy_dev = phy_dev;

you need to assign ndev->phydev here

[...]
> @@ -2875,8 +2869,7 @@ fec_enet_close(struct net_device *ndev)
>  		fec_stop(ndev);
>  	}
>  
> -	phy_disconnect(fep->phy_dev);
> -	fep->phy_dev = NULL;
> +	phy_disconnect(ndev->phydev);
[...]

and you need to set it to NULL here.

Ben.
 
-- 
Ben Hutchings
I haven't lost my mind; it's backed up on tape somewhere.
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ