Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ben Hutchings <ben.hutchings@essensium.com>
To: Steve Bennett <steveb@workware.net.au>
Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: phy: micrel: Fix detection of ksz87xx switch
Date: Sat, 7 Aug 2021 02:01:24 +0200	[thread overview]
Message-ID: <20210807000123.GA4898@cephalopod> (raw)
In-Reply-To: <74BE3A85-61E2-45C9-BA77-242B1014A820@workware.net.au>

On Sat, Jul 31, 2021 at 08:19:17AM +1000, Steve Bennett wrote:
> > On 31 Jul 2021, at 2:59 am, Jakub Kicinski <kuba@kernel.org> wrote:
> > 
> > Please extend the CC list to the maintainers, and people who
> > worked on this driver in the past, especially Marek.
> 
> Sure, I can do that in a v2 of the patch along with the more detailed
> explanation below.
> 
> > 
> > On Fri, 30 Jul 2021 20:51:20 +1000 Steve Bennett wrote:
> >> The previous logic was wrong such that the ksz87xx
> >> switch was not identified correctly.
> > 
> > Any more details of what is happening? Which extact device do you see
> > this problem on?
> 
> I have a ksz8795 switch.
> 
> Without the patch:
> 
> ksz8795-switch spi3.1 ade1 (uninitialized): PHY [dsa-0.1:03] driver [Generic PHY]
> ksz8795-switch spi3.1 ade2 (uninitialized): PHY [dsa-0.1:04] driver [Generic PHY]
> 
> With the patch:
> 
> ksz8795-switch spi3.1 ade1 (uninitialized): PHY [dsa-0.1:03] driver [Micrel KSZ87XX Switch]
> ksz8795-switch spi3.1 ade2 (uninitialized): PHY [dsa-0.1:04] driver [Micrel KSZ87XX Switch]
[...]

And do the external ports work for you after this?

I have a development board with a KSZ8795.  All ports worked before
this patch.  After this patch, when I bring up the external ports they
are reported as having link up at 10M half duplex, when the link is
actually down.

The ksz8873mll_read_status() function is trying to read a non-standard
MDIO register that is not handled by the ksz8795 driver's MDIO
emulation (and is not documented as existing on the KSZ8873MLL,
either!).  It also also reports link up, which is obviously not
correct for an external port.

I'll post a patch as a reply to this.

Ben.

-- 
Ben Hutchings · Senior Embedded Software Engineer, Essensium-Mind · mind.be

  reply	other threads:[~2021-08-07  0:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 10:51 Steve Bennett
2021-07-30 16:59 ` Jakub Kicinski
2021-07-30 22:19   ` Steve Bennett
2021-08-07  0:01     ` Ben Hutchings [this message]
2021-08-07  0:06       ` [PATCH net] net: phy: micrel: Fix link detection on ksz87xx switch" Ben Hutchings
2021-08-08 11:10         ` patchwork-bot+netdevbpf
2021-08-08 22:18       ` [PATCH] net: phy: micrel: Fix detection of ksz87xx switch Steve Bennett
2021-07-30 22:57 ` [PATCH v2] " Steve Bennett
2021-07-30 23:08   ` Marek Vasut
2021-08-02 14:10   ` patchwork-bot+netdevbpf

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=20210807000123.GA4898@cephalopod \
    --to=ben.hutchings@essensium.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=steveb@workware.net.au \
    --subject='Re: [PATCH] net: phy: micrel: Fix detection of ksz87xx switch' \
    /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

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).