netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: "Álvaro Fernández Rojas" <noltari@gmail.com>,
	jonas.gorski@gmail.com, andrew@lunn.ch, olteanv@gmail.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, linux@armlinux.org.uk, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/1] net: dsa: b53: mmap: add dsa switch ops
Date: Thu, 23 Mar 2023 11:19:12 -0700	[thread overview]
Message-ID: <95eb709c-a91f-4390-30b2-9e81e4534e20@gmail.com> (raw)
In-Reply-To: <20230323170238.210687-1-noltari@gmail.com>

On 3/23/23 10:02, Álvaro Fernández Rojas wrote:
> B53 MMAP switches have a MDIO Mux bus controller which should be used instead
> of the default phy_read/phy_write ops used in the rest of the B53 controllers.
> Therefore, in order to use the proper MDIO Mux bus controller we need to
> replicate the default B53 DSA switch ops removing the phy_read/phy_write
> entries.

Did you try to implement b53_mmap_ops::phy_read16/phy_write16 and have 
them return -EIO such that you do not fallback to the else path:

                   ret = b53_read16(priv, B53_PORT_MII_PAGE(addr),
                                    reg * 2, &value);

The reason for the hang I believe is because the B53_PORT_MII_PAGE is 
simply not mapped into the switch register space, and there is no logic 
within the switch block to return an error when you read at that invalid 
location.

Re-implementing dsa_switch_ops is usually done when you have a very 
different switch integration logic, ala bcm_sf2, here it seems a bit of 
a tall order for simply not using the phy_read16/phy_write16 functions.
-- 
Florian


  parent reply	other threads:[~2023-03-23 18:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 17:02 [PATCH 0/1] net: dsa: b53: mmap: add dsa switch ops Álvaro Fernández Rojas
2023-03-23 17:02 ` [PATCH 1/1] " Álvaro Fernández Rojas
2023-03-23 18:19 ` Florian Fainelli [this message]
2023-03-23 19:42   ` [PATCH 0/1] " Álvaro Fernández Rojas
2023-03-23 19:45     ` Florian Fainelli

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=95eb709c-a91f-4390-30b2-9e81e4534e20@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jonas.gorski@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=noltari@gmail.com \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).