mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Gatis Peisenieks <gatis@mikrotik.com>
Cc: chris.snook@gmail.com, davem@davemloft.net, kuba@kernel.org,
	hkallweit1@gmail.com, jesse.brandeburg@intel.com,
	dchickles@marvell.com, tully@mikrotik.com,
	eric.dumazet@gmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] atl1c: improve reliability of mdio ops on Mikrotik 10/25G NIC
Date: Thu, 17 Jun 2021 16:35:23 +0200	[thread overview]
Message-ID: <YMtdq1SbLqM65vBq@lunn.ch> (raw)
In-Reply-To: <20210617122553.2970190-1-gatis@mikrotik.com>

On Thu, Jun 17, 2021 at 03:25:53PM +0300, Gatis Peisenieks wrote:
> MDIO ops on Mikrotik 10/25G NIC can occasionally take longer
> to complete. This increases the timeout from 1.2 to 12ms.

That seems a very long time. A C22 transaction is 64 bits, and it is
clocked out at 2.5MHz. So it should take (1/2.5*1000*1000)*64 =
0.0000256s, i.e. 0.0256ms. 1.2ms is already 50 times longer than
needed, and now you are suggesting to make it 500 times longer than
needed?

Are you sure there is not something else going on here?  I notice
atl1c_stop_phy_polling() does not check the return from
atl1c_wait_mdio_idle(). Maybe this is your problem, you are not
waiting long enough for the MAC to stop directly accessing the PHY?

	Andrew

      reply	other threads:[~2021-06-17 14:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 12:25 Gatis Peisenieks
2021-06-17 14:35 ` Andrew Lunn [this message]

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=YMtdq1SbLqM65vBq@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=chris.snook@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dchickles@marvell.com \
    --cc=eric.dumazet@gmail.com \
    --cc=gatis@mikrotik.com \
    --cc=hkallweit1@gmail.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tully@mikrotik.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

all inboxes | Powered by JetHome®