netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@linux-m68k.org>
To: Andy Duan <fugang.duan@nxp.com>, Andrew Lunn <andrew@lunn.ch>,
	Dave Karr <dkarr@vyex.com>,
	Clemens Gruber <clemens.gruber@pqgruber.com>
Cc: Chris Heally <cphealy@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [EXT] Re: [PATCH] net: ethernet: fec: Replace interrupt driven MDIO with polled IO
Date: Tue, 27 Oct 2020 10:17:30 +1000	[thread overview]
Message-ID: <a1f62ee2-3013-50fe-4069-e63f87a984ce@linux-m68k.org> (raw)
In-Reply-To: <AM8PR04MB731512CC1B16C307C4543B90FF1D0@AM8PR04MB7315.eurprd04.prod.outlook.com>

Hi Andy,

On 22/10/20 7:04 pm, Andy Duan wrote:
> From: Greg Ungerer <gerg@linux-m68k.org> Sent: Thursday, October 22, 2020 9:14 AM
>> Hi Andrew,
>>
>> On 21/10/20 11:37 pm, Andrew Lunn wrote:
>>>> +    if (fep->quirks & FEC_QUIRK_CLEAR_SETUP_MII) {
>>>> +            /* Clear MMFR to avoid to generate MII event by writing
>> MSCR.
>>>> +             * MII event generation condition:
>>>> +             * - writing MSCR:
>>>> +             *      - mmfr[31:0]_not_zero & mscr[7:0]_is_zero &
>>>> +             *        mscr_reg_data_in[7:0] != 0
>>>> +             * - writing MMFR:
>>>> +             *      - mscr[7:0]_not_zero
>>>> +             */
>>>> +            writel(0, fep->hwp + FEC_MII_DATA);
>>>> +    }
>>>
>>> Hi Greg
>>>
>>> The last time we discussed this, we decided that if you cannot do the
>>> quirk, you need to wait around for an MDIO interrupt, e.g. call
>>> fec_enet_mdio_wait() after setting FEC_MII_SPEED register.
>>>
>>>>
>>>>       writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
>>
>> The code following this is:
>>
>>           writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
>>
>>           /* Clear any pending transaction complete indication */
>>           writel(FEC_ENET_MII, fep->hwp + FEC_IEVENT);
>>
>>
>> So this is forcing a clear of the event here. Is that not good enough?
>>
>> For me on my ColdFire test target I always get a timeout if I wait for a
>> FEC_IEVENT after the FEC_MII_SPEED write.
>>
>> Regards
>> Greg
> 
> Dave Karr's last patch can fix the issue, but it may introduce 30ms delay during boot.
> Greg's patch is to add quirk flag to distinguish platform before clearing mmfr operation,
> which also can fix the issue.

Do you mean that we can use either fix - and that is ok for all hardware 
types?

Regards
Greg


  reply	other threads:[~2020-10-27  0:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  2:14 [PATCH] net: ethernet: fec: Replace interrupt driven MDIO with polled IO Greg Ungerer
2020-10-20  2:40 ` Andrew Lunn
2020-10-20  3:02   ` [EXT] " Andy Duan
2020-10-20 13:06     ` Chris Healy
2020-10-20 13:52       ` Andy Duan
2020-10-20 13:08     ` Andrew Lunn
2020-10-21  1:51   ` Greg Ungerer
2020-10-21  2:19     ` [EXT] " Andy Duan
2020-10-21  2:37       ` Greg Ungerer
2020-10-21 13:37     ` Andrew Lunn
2020-10-22  1:14       ` Greg Ungerer
2020-10-22  2:39         ` [EXT] " Andy Duan
2020-10-22  9:04         ` Andy Duan
2020-10-27  0:17           ` Greg Ungerer [this message]
2020-10-27  1:33             ` Andy Duan
  -- strict thread matches above, loose matches on Subject: below --
2020-04-14  0:45 Andrew Lunn
2020-04-27 15:19 ` Leonard Crestez
2020-04-27 16:46   ` Andrew Lunn
2020-04-27 17:48     ` [EXT] " Andy Duan
2020-04-27 20:00     ` Leonard Crestez
2020-04-27 20:13       ` Andrew Lunn
2020-04-28  7:50         ` [EXT] " Andy Duan
2020-04-28 13:34           ` Andrew Lunn
2020-04-28 13:50             ` Andy Duan
2020-04-28 14:29               ` Andrew Lunn

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=a1f62ee2-3013-50fe-4069-e63f87a984ce@linux-m68k.org \
    --to=gerg@linux-m68k.org \
    --cc=andrew@lunn.ch \
    --cc=clemens.gruber@pqgruber.com \
    --cc=cphealy@gmail.com \
    --cc=dkarr@vyex.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).