netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net] net: phy: ensure PHY is powered up when reading ID registers
Date: Sat, 5 Jan 2019 23:04:12 +0100	[thread overview]
Message-ID: <20190105220412.GC30438@lunn.ch> (raw)
In-Reply-To: <6da69e2c-2090-a598-c601-6ce926f69872@gmail.com>

> Quite a few of the latest net commits don't meet the strict criteria
> for a fix (as documented). Means: The risk that a problem could
> occur isn't sufficient, at least one user has to actually face a
> problem. So it seems net vs. net-next criteria is somewhat flexible.
> Therefore I wasn't sure in this case.

Hi Heiner

I tend to be more paranoid after listening to recent discussions about
this. At LPC and online, there have been comments that patches to
stable are more likely to break something than patches going via the
normal merge window. Normal patches get a lot more testing, are in -rc
kernels for 6 or more weeks, etc, where as stable patches go live
after a week or less of testing.

> > Is this potentially slowing the scan down to 100ms * 32, if the read
> > of MII_BMCR always returns 0xffff?
> > 
> Indeed, in a worst case scenario this could happen, provided that:
> - there's no mask of MDIO addresses to probe

Which is pretty normal

> - the MDIO bus read operation returns 0xffff in case of an error instead
>   of a proper errno.

The bus driver cannot easily return an proper errno. The MDIO protocol
mostly has no way to indicate if there is a device on the bus. There
is the TA bit, but many PHYs are broken, so most bus drivers just
ignore it. And the bus is wired with a pull-up. So a read on an
address with no device will return 0xffff.

	Andrew

  parent reply	other threads:[~2019-01-05 22:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-05 13:21 [PATCH net] net: phy: ensure PHY is powered up when reading ID registers Heiner Kallweit
2019-01-05 13:37 ` Heiner Kallweit
2019-01-05 17:33 ` Andrew Lunn
2019-01-05 21:07   ` Heiner Kallweit
2019-01-05 21:47     ` David Miller
2019-01-05 22:04     ` Andrew Lunn [this message]
2019-01-05 22:06       ` David Miller
2019-01-06  0:12 ` Florian Fainelli
2019-01-06 12:03   ` Heiner Kallweit
2019-01-07 15:18 ` David Miller

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=20190105220412.GC30438@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.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).