From: Andrew Lunn <andrew@lunn.ch>
To: Camel Guo <camelg@axis.com>
Cc: Camel Guo <Camel.Guo@axis.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>,
Russell King <linux@armlinux.org.uk>,
Vivien Didelot <vivien.didelot@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Rob Herring <robh@kernel.org>, kernel <kernel@axis.com>
Subject: Re: [RFC net-next 2/2] net: dsa: Add driver for Maxlinear GSW1XX switch
Date: Thu, 27 Oct 2022 14:20:43 +0200 [thread overview]
Message-ID: <Y1p3m9lEMuJg1pUe@lunn.ch> (raw)
In-Reply-To: <a04fc8bd-e18e-c300-8300-7cba8fe33557@axis.com>
> >> +}
> >> +
> >> +static int gsw1xx_mdio_wr(struct mii_bus *bus, int addr, int reg, u16 val)
> >> +{
> >> + struct gsw1xx_priv *priv = bus->priv;
> >> + int err;
> >
> > Please check for C45 and return -EOPNOTSUPP.
>
> Maybe not need. According to the datasheet of gsw145 "The interface uses the
> serial protocol defined by IEEE 802.3, clause 22.", I think it is enough to
> add "ds->slave_mii_bus->probe_capabilities = MDIOBUS_C22" into gsw1xx_mdio. It
> probe_capabilities is static and never changes.
probe_capabilities only limits probing the bus when it is
registered. It does not prevent C45 transfers from being requested by
PHY drivers. And there are some funky PHY drivers which mix C22 and
C45. They can probe via C22 and then use C45. So it is much better to
check and return an error if requested to do something which the
hardware cannot do. Also, if you don't check, and convert a C45
request into a C22 request, you often end up with really odd accesses,
depending on the hardware, reads could become writes, etc.
> > I noticed there is no tagging protocol defined. How are frames
> > direction out a specific port?
>
> Yes, this chip supports Special Tags which should be enabled, but unfortunately
> I have no make it work.
You need to make this work. You added support to set the port spanning
tree status. But that makes no sense if you cannot send/receive bridge
PDUs out specific ports, etc.
> The chip in my dev board works in self-start, managed switch mode. So far, it
> works fine on this board.
>
> >
> > I've also not yet looked at the overlap with lantiq_gswip.c.
>
> The version of GSWIP changes and also the management interface of
> it is memory-mapped io. I tried to use the same logic in my gsw145 chip
> (with mdio interface update), lots of parts (e.g: fdb, vlan) don't work
> at all.
There has been past attempts at a driver for this hardware and it was
argued that they are sufficiently different that a new driver was
needed. As i said, i've not compared the code yet, so i cannot comment
on that yet.
Andrew
next prev parent reply other threads:[~2022-10-27 12:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 13:52 [RFC net-next 0/2] DSA driver draft for MaxLinear's gsw1xx series switch Camel Guo
2022-10-25 13:52 ` [RFC net-next 1/2] dt-bindings: net: dsa: add bindings for GSW Series switches Camel Guo
2022-10-25 14:27 ` Krzysztof Kozlowski
2022-10-25 15:01 ` Andrew Lunn
2022-10-25 19:00 ` Krzysztof Kozlowski
[not found] ` <d0179725-0730-5826-caa4-228469d3bad4@axis.com>
2022-10-27 12:46 ` Krzysztof Kozlowski
2022-10-27 13:57 ` Vladimir Oltean
2022-10-27 16:08 ` Krzysztof Kozlowski
2022-10-27 16:12 ` Vladimir Oltean
2022-10-25 20:05 ` Rob Herring
2022-10-27 15:41 ` Vladimir Oltean
2022-10-25 13:52 ` [RFC net-next 2/2] net: dsa: Add driver for Maxlinear GSW1XX switch Camel Guo
2022-10-25 14:23 ` Krzysztof Kozlowski
2022-10-25 14:56 ` Andrew Lunn
2022-10-27 6:35 ` Camel Guo
2022-10-27 12:09 ` Andrew Lunn
[not found] ` <55da4718-4422-745a-8880-95adc8e0abd9@axis.com>
2022-10-27 12:48 ` Krzysztof Kozlowski
2022-10-25 14:53 ` Andrew Lunn
[not found] ` <a04fc8bd-e18e-c300-8300-7cba8fe33557@axis.com>
2022-10-27 12:20 ` Andrew Lunn [this message]
2022-10-27 16:00 ` Vladimir Oltean
2022-10-28 4:41 ` Arun.Ramadoss
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=Y1p3m9lEMuJg1pUe@lunn.ch \
--to=andrew@lunn.ch \
--cc=Camel.Guo@axis.com \
--cc=camelg@axis.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kernel@axis.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=vivien.didelot@gmail.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