netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Asmaa Mnebhi <Asmaa@mellanox.com>
Cc: David Thompson <dthompson@mellanox.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	Jiri Pirko <jiri@mellanox.com>
Subject: Re: [PATCH net-next] Add Mellanox BlueField Gigabit Ethernet driver
Date: Fri, 31 Jul 2020 21:54:58 +0200	[thread overview]
Message-ID: <20200731195458.GA1843538@lunn.ch> (raw)
In-Reply-To: <VI1PR05MB4110070900CF42CB3E18983EDA4E0@VI1PR05MB4110.eurprd05.prod.outlook.com>

On Fri, Jul 31, 2020 at 06:54:04PM +0000, Asmaa Mnebhi wrote:

Hi Asmaa

Please don't send HTML obfusticated emails to mailing lists.

> > +static int mlxbf_gige_mdio_read(struct mii_bus *bus, int phy_add, int
> 
> > +phy_reg) {
> 
> > +         struct mlxbf_gige *priv = bus->priv;
> 
> > +         u32 cmd;
> 
> > +         u32 ret;
> 
> > +
> 
> > +         /* If the lock is held by something else, drop the request.
> 
> > +         * If the lock is cleared, that means the busy bit was cleared.
> 
> > +         */
> 
>  
> 
> How can this happen? The mdio core has a mutex which prevents parallel access?
> 
>  
> 
> This is a HW Lock. It is an actual register. So another HW entity can be
> holding that lock and reading/changing the values in the HW registers.

You have not explains how that can happen? Is there something in the
driver i missed which takes a backdoor to read/write MDIO
transactions?

> > +         ret = mlxbf_gige_mdio_poll_bit(priv, MLXBF_GIGE_MDIO_GW_LOCK_MASK);
> 
> > +         if (ret)
> 
> > +                       return -EBUSY;
> 
>  
> 
> PHY drivers are not going to like that. They are not going to retry. What is
> likely to happen is that phylib moves into the ERROR state, and the PHY driver
> grinds to a halt.
> 
>  
> 
> This is a fairly quick HW transaction. So I don’t think it would cause and
> issue for the PHY drivers. In this case, we use the micrel KSZ9031. We haven’t
> seen issues.

So you have happy to debug hard to find and reproduce issues when it
does happen? Or would you like to spend a little bit of time now and
just prevent it happening at all?

     Andrew

  parent reply	other threads:[~2020-07-31 19:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 18:29 [PATCH net-next] Add Mellanox BlueField Gigabit Ethernet driver David Thompson
2020-07-29 19:41 ` David Thompson
2020-07-29 20:31   ` David Miller
2020-07-29 20:49 ` Jakub Kicinski
2020-07-30  4:03 ` kernel test robot
2020-07-31 17:42 ` Andrew Lunn
     [not found]   ` <VI1PR05MB4110070900CF42CB3E18983EDA4E0@VI1PR05MB4110.eurprd05.prod.outlook.com>
2020-07-31 19:54     ` Andrew Lunn [this message]
2020-07-31 21:38       ` Asmaa Mnebhi
2020-08-01  1:14         ` Andrew Lunn
2020-08-03 14:23           ` Asmaa Mnebhi
2020-08-11 19:53   ` Asmaa Mnebhi
2020-08-11 20:06     ` Andrew Lunn
2020-08-12 20:37       ` Asmaa Mnebhi
2020-08-12 21:34         ` Andrew Lunn
2020-07-31 18:37 ` Andrew Lunn
2020-08-28 14:29   ` Asmaa Mnebhi
2020-07-31 18:38 ` Andrew Lunn
2020-08-28 14:24   ` Asmaa Mnebhi
2020-08-28 14:36     ` Andrew Lunn
2020-07-31 18:41 ` 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=20200731195458.GA1843538@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Asmaa@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=dthompson@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=kuba@kernel.org \
    --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).