From: "Markus Stockhausen" <markus.stockhausen@gmx.de>
To: "'Andrew Lunn'" <andrew@lunn.ch>
Cc: "'Daniel Golle'" <daniel@makrotopia.org>, <hkallweit1@gmail.com>,
<linux@armlinux.org.uk>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <chris.packham@alliedtelesis.co.nz>
Subject: AW: [PATCH 3/9] net: mdio: realtek-rtl9300: Add ports to info structure
Date: Tue, 19 May 2026 22:36:34 +0200 [thread overview]
Message-ID: <029f01dce7cf$34595af0$9d0c10d0$@gmx.de> (raw)
In-Reply-To: <fff19211-a41a-481d-a6a6-4429a6901129@lunn.ch>
> Von: Andrew Lunn <andrew@lunn.ch>
> Gesendet: Dienstag, 19. Mai 2026 22:14
> An: Markus Stockhausen <markus.stockhausen@gmx.de>
> Betreff: Re: [PATCH 3/9] net: mdio: realtek-rtl9300: Add ports to info
structure
> .
> > Where does this come from?
> >
> > - The hardware has 1-4 SMI busses
> > - Each bus serves up to 32 addresses
> > - A switch has X physical ports
> > - The mdio controller can only be fed with "physical port"
>
> So in general, the MDIO API uses an address in the range 0-31, as
> defined in C22/C45. I would try to do any sort of mapping of ports to
> MDIO addresses in a layer above MDIO. Maybe that is not possible, i
> only partially remember the discussion about this hardware. But if it
> is going to get more complex, i really would suggest pulling it out
> into a layer above, and let the MDIO driver simply do MDIO.
Having spent a few months to get all this sorted out I can
say that the port concept is quite easy to understand and
is already quite simple implemented. One only needs to know
the chain
bus/address -> port -> bus/address
Current upstream codes uses 220 lines of code for only one
target. Downstream serves 4 devices with same quality and
error handling with the following metrics:
- 80 lines of code for central command runner
- 160 lines for all 16 SOC specific read/read_c45/write/write_c45 functions
- 80 lines of code for 4 generic command feeder functions
I finally want to add myself as maintainer for the driver.
Just in case that helps for the descision.
Markus
next prev parent reply other threads:[~2026-05-19 20:37 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 16:57 [PATCH 0/9] mdio: realtek-rtl9300: Groundwork for multi SOC support Markus Stockhausen
2026-05-19 16:57 ` [PATCH 1/9] net: mdio: realtek-rtl9300: Convert to generic prefix Markus Stockhausen
2026-05-19 17:51 ` Andrew Lunn
2026-05-19 16:57 ` [PATCH 2/9] net: mdio: realtek-rtl9300: Add device specific info structure Markus Stockhausen
2026-05-19 16:57 ` [PATCH 3/9] net: mdio: realtek-rtl9300: Add ports to " Markus Stockhausen
2026-05-19 17:27 ` Daniel Golle
2026-05-19 17:59 ` Andrew Lunn
2026-05-19 19:06 ` AW: " Markus Stockhausen
2026-05-19 20:14 ` Andrew Lunn
2026-05-19 20:36 ` Markus Stockhausen [this message]
2026-05-19 22:47 ` Daniel Golle
2026-05-20 1:09 ` Andrew Lunn
2026-05-19 16:57 ` [PATCH 4/9] net: mdio: realtek-rtl9300: Add pages " Markus Stockhausen
2026-05-19 17:29 ` Daniel Golle
2026-05-19 18:07 ` Andrew Lunn
2026-05-19 16:57 ` [PATCH 5/9] net: mdio: realtek-rtl9300: Add register structure Markus Stockhausen
2026-05-19 16:57 ` [PATCH 6/9] net: mdio: realtek-rtl9300: Add command/C22 register Markus Stockhausen
2026-05-19 16:57 ` [PATCH 7/9] net: mdio: realtek-rtl9300: Add I/O register Markus Stockhausen
2026-05-19 16:57 ` [PATCH 8/9] net: mdio: realtek-rtl9300: Add mask register Markus Stockhausen
2026-05-19 18:43 ` Andrew Lunn
2026-05-19 16:57 ` [PATCH 9/9] net: mdio: realtek-rtl9300: Link I/O functions in info structure Markus Stockhausen
2026-05-19 18:46 ` Andrew Lunn
2026-05-19 19:25 ` AW: " Markus Stockhausen
2026-05-19 20:16 ` Andrew Lunn
2026-05-19 20:40 ` AW: " Markus Stockhausen
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='029f01dce7cf$34595af0$9d0c10d0$@gmx.de' \
--to=markus.stockhausen@gmx.de \
--cc=andrew@lunn.ch \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--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