mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Philippe Reynes <tremyfr@gmail.com>,
	fugang.duan@nxp.com, davem@davemloft.net, kan.liang@intel.com,
	decot@googlers.com, aduyck@mirantis.com, jiri@mellanox.com,
	jacob.e.keller@intel.com, tom@herbertland.com, andrew@lunn.ch
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] net: ethernet: fec: use phydev from struct net_device
Date: Sun, 08 May 2016 23:22:17 +0100	[thread overview]
Message-ID: <1462746137.2634.67.camel@decadent.org.uk> (raw)
In-Reply-To: <1462743877-31738-3-git-send-email-tremyfr@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 936 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-05-08 22:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-08 21:44 [PATCH v2 0/3] net: ethtool: add ethtool_op_{get|set}_link_ksettings Philippe Reynes
2016-05-08 21:44 ` [PATCH v2 1/3] net: core: " Philippe Reynes
2016-05-09 16:44   ` David Decotigny
2016-05-08 21:44 ` [PATCH v2 2/3] net: ethernet: fec: use phydev from struct net_device Philippe Reynes
2016-05-08 22:22   ` Ben Hutchings [this message]
2016-05-08 22:47     ` Philippe Reynes
2016-05-08 23:01       ` Ben Hutchings
2016-05-08 21:44 ` [PATCH v2 3/3] net: ethernet: fec: use ethtool_op_{get|set}_link_ksettings Philippe Reynes
2016-05-09  1:57 ` [PATCH v2 0/3] net: ethtool: add ethtool_op_{get|set}_link_ksettings Fugang Duan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462746137.2634.67.camel@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=aduyck@mirantis.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=decot@googlers.com \
    --cc=fugang.duan@nxp.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jiri@mellanox.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    --cc=tremyfr@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome