mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: gerlando.falauto@keymile.com
Cc: netdev@vger.kernel.org, timur@tabi.org,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	ogabbay@advaoptical.com, bigeasy@linutronix.de,
	galak@kernel.crashing.org
Subject: Re: [PATCH v2 2/2] net/fsl_pq_mdio: fix computed address for the TBI register
Date: Tue, 13 Oct 2015 04:30:22 -0700 (PDT)	[thread overview]
Message-ID: <20151013.043022.342257265586096881.davem@davemloft.net> (raw)
In-Reply-To: <1444634321-14902-2-git-send-email-gerlando.falauto@keymile.com>

From: Gerlando Falauto <gerlando.falauto@keymile.com>
Date: Mon, 12 Oct 2015 09:18:41 +0200

> commit afae5ad78b342f401c28b0bb1adb3cd494cb125a
>   "net/fsl_pq_mdio: streamline probing of MDIO nodes"
> 
> added support for different types of MDIO devices:
> 1) Gianfar MDIO nodes that only map the MII registers
> 2) Gianfar MDIO nodes that map the full MDIO register set
> 3) eTSEC2 MDIO nodes (which map the full MDIO register set)
> 4) QE MDIO nodes (which map only the MII registers)
> 
> However, the implementation for types 1 and 4 would mistakenly assume
> a mapping of the full MDIO register set, thereby computing the address
> for the TBI register starting from the containing structure.
> The TBI register would therefore be accessed at a wrong (much bigger)
> address, not giving the expected result at all.
> This patch restores the correct behavior we had prior to the above one.
> 
> The consequences of this bug are apparent when trying to access a PHY
> with the same address as the value contained in the initial value of
> the TBI register (normally 0); in that case you'll get answers from the
> internal TBI device (even though MDIO/MDC pins are actually *also*
> toggling on the physical bus!).
> Beware that you also need to add a fake tbi node to your device tree
> with an unused address.
> 
> Notice how this fix is related to commit
> 220669495bf8b68130a8218607147c7b74c28d2b
>   "powerpc: Add TBI PHY node to first MDIO bus"
> 
> which fixed the behavior in kernel 3.3, which was later broken by the
> above commit on kernel 3.7.
> 
> Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>

Applied.

  reply	other threads:[~2015-10-13 11:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 12:47 [PATCH] MDIO: FSL_PQ_MDIO: Fix bug on incorrect offset of tbipa register Oded Gabbay
2013-06-12 13:04 ` Timur Tabi
2013-06-12 13:09   ` Oded Gabbay
2013-06-12 15:08 ` Sebastian Andrzej Siewior
2013-06-12 18:31   ` Scott Wood
2013-06-13  6:44     ` Oded Gabbay
2013-06-15 22:57     ` Timur Tabi
2015-10-09 15:15 ` [PATCH 1/2] net/fsl_pq_mdio: check TBI address for consistency with mapped range Gerlando Falauto
2015-10-09 15:15   ` [PATCH 2/2] net/fsl_pq_mdio: fix computed address for the TBI register Gerlando Falauto
2015-10-09 17:39   ` [PATCH 1/2] net/fsl_pq_mdio: check TBI address for consistency with mapped range kbuild test robot
2015-10-11 12:41   ` Timur Tabi
2015-10-12  7:18 ` [PATCH v2 " Gerlando Falauto
2015-10-12  7:18   ` [PATCH v2 2/2] net/fsl_pq_mdio: fix computed address for the TBI register Gerlando Falauto
2015-10-13 11:30     ` David Miller [this message]
2015-10-13 11:30   ` [PATCH v2 1/2] net/fsl_pq_mdio: check TBI address for consistency with mapped range 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=20151013.043022.342257265586096881.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=bigeasy@linutronix.de \
    --cc=galak@kernel.crashing.org \
    --cc=gerlando.falauto@keymile.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=ogabbay@advaoptical.com \
    --cc=timur@tabi.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

all inboxes | Powered by JetHome®