From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andy Duan <fugang.duan@nxp.com>, Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 2/2] net: fec: remove workaround to restart state machine on MDIO error
Date: Mon, 17 Dec 2018 07:42:32 +0100 [thread overview]
Message-ID: <ecd2ecbd-799a-12be-874f-133ec72fdbba@gmail.com> (raw)
In-Reply-To: <VI1PR0402MB36008364E61ED82B821C8672FFBC0@VI1PR0402MB3600.eurprd04.prod.outlook.com>
On 17.12.2018 03:05, Andy Duan wrote:
> From: Heiner Kallweit <hkallweit1@gmail.com> Sent: 2018年12月16日 0:20
>> Now that the PHY isn't stopped any longer by phylib in case of a MDIO error,
>> we can remove this workaround.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>
> The old workaround can be removed NOW, thanks.
>
This patch series has been superseded. After few more discussions we'll
keep the current behavior and just use a WARN() to facilitate debugging
in case of MDIO error.
However for fec it should be safe anyway to remove the old workaround,
see description of my subsequent patch.
> Acked-by: Fugang Duan <fugang.duan@nxp.com>
>> ---
>> drivers/net/ethernet/freescale/fec.h | 1 -
>> drivers/net/ethernet/freescale/fec_main.c | 12 ------------
>> 2 files changed, 13 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/freescale/fec.h
>> b/drivers/net/ethernet/freescale/fec.h
>> index bf80855dd..f79e57f73 100644
>> --- a/drivers/net/ethernet/freescale/fec.h
>> +++ b/drivers/net/ethernet/freescale/fec.h
>> @@ -531,7 +531,6 @@ struct fec_enet_private {
>>
>> /* Phylib and MDIO interface */
>> struct mii_bus *mii_bus;
>> - int mii_timeout;
>> uint phy_speed;
>> phy_interface_t phy_interface;
>> struct device_node *phy_node;
>> diff --git a/drivers/net/ethernet/freescale/fec_main.c
>> b/drivers/net/ethernet/freescale/fec_main.c
>> index 6db69ba30..ae0f88bce 100644
>> --- a/drivers/net/ethernet/freescale/fec_main.c
>> +++ b/drivers/net/ethernet/freescale/fec_main.c
>> @@ -1714,12 +1714,6 @@ static void fec_enet_adjust_link(struct net_device
>> *ndev)
>> struct phy_device *phy_dev = ndev->phydev;
>> int status_change = 0;
>>
>> - /* Prevent a state halted on mii error */
>> - if (fep->mii_timeout && phy_dev->state == PHY_HALTED) {
>> - phy_dev->state = PHY_RESUMING;
>> - return;
>> - }
>> -
>> /*
>> * If the netdev is down, or is going down, we're not interested
>> * in link state events, so just mark our idea of the link as down @@
>> -1779,7 +1773,6 @@ static int fec_enet_mdio_read(struct mii_bus *bus, int
>> mii_id, int regnum)
>> if (ret < 0)
>> return ret;
>>
>> - fep->mii_timeout = 0;
>> reinit_completion(&fep->mdio_done);
>>
>> /* start a read op */
>> @@ -1791,7 +1784,6 @@ static int fec_enet_mdio_read(struct mii_bus *bus,
>> int mii_id, int regnum)
>> time_left = wait_for_completion_timeout(&fep->mdio_done,
>> usecs_to_jiffies(FEC_MII_TIMEOUT));
>> if (time_left == 0) {
>> - fep->mii_timeout = 1;
>> netdev_err(fep->netdev, "MDIO read timeout\n");
>> ret = -ETIMEDOUT;
>> goto out;
>> @@ -1820,7 +1812,6 @@ static int fec_enet_mdio_write(struct mii_bus *bus,
>> int mii_id, int regnum,
>> else
>> ret = 0;
>>
>> - fep->mii_timeout = 0;
>> reinit_completion(&fep->mdio_done);
>>
>> /* start a write op */
>> @@ -1833,7 +1824,6 @@ static int fec_enet_mdio_write(struct mii_bus *bus,
>> int mii_id, int regnum,
>> time_left = wait_for_completion_timeout(&fep->mdio_done,
>> usecs_to_jiffies(FEC_MII_TIMEOUT));
>> if (time_left == 0) {
>> - fep->mii_timeout = 1;
>> netdev_err(fep->netdev, "MDIO write timeout\n");
>> ret = -ETIMEDOUT;
>> }
>> @@ -2001,8 +1991,6 @@ static int fec_enet_mii_init(struct platform_device
>> *pdev)
>> return -ENOENT;
>> }
>>
>> - fep->mii_timeout = 0;
>> -
>> /*
>> * Set MII speed to 2.5 MHz (= clk_get_rate() / 2 * phy_speed)
>> *
>> --
>> 2.20.0
>>
>
next prev parent reply other threads:[~2018-12-17 6:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-15 16:17 [PATCH net-next 0/2] net: phy: don't stop state machine in case of MDIO error Heiner Kallweit
2018-12-15 16:18 ` [PATCH net-next 1/2] " Heiner Kallweit
2018-12-16 8:42 ` Andrew Lunn
2018-12-16 9:40 ` Heiner Kallweit
2018-12-16 15:30 ` Andrew Lunn
2018-12-17 2:14 ` Andy Duan
2018-12-15 16:19 ` [PATCH net-next 2/2] net: fec: remove workaround to restart state machine on " Heiner Kallweit
2018-12-17 2:05 ` Andy Duan
2018-12-17 6:42 ` Heiner Kallweit [this message]
2018-12-16 8:29 ` [PATCH net-next 0/2] net: phy: don't stop state machine in case of " Heiner Kallweit
2018-12-16 18:43 ` David Miller
2018-12-16 14:00 ` [PATCH net-next] net: fec: remove workaround to restart phylib state machine on MDIO timeout Heiner Kallweit
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=ecd2ecbd-799a-12be-874f-133ec72fdbba@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=fugang.duan@nxp.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.