<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/dsa/ocelot, branch linux-5.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-04-20T07:36:18Z</updated>
<entry>
<title>net: dsa: felix: fix tagging protocol changes with multiple CPU ports</title>
<updated>2022-04-20T07:36:18Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2022-04-12T17:22:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e6224d9bcf3dca22a267e7c8e9ea9d42c06e74a5'/>
<id>urn:sha1:e6224d9bcf3dca22a267e7c8e9ea9d42c06e74a5</id>
<content type='text'>
[ Upstream commit 00fa91bc9cc2a9d340f963af5e457610ad4b2f9c ]

When the device tree has 2 CPU ports defined, a single one is active
(has any dp-&gt;cpu_dp pointers point to it). Yet the second one is still a
CPU port, and DSA still calls -&gt;change_tag_protocol on it.

On the NXP LS1028A, the CPU ports are ports 4 and 5. Port 4 is the
active CPU port and port 5 is inactive.

After the following commands:

 # Initial setting
 cat /sys/class/net/eno2/dsa/tagging
 ocelot
 echo ocelot-8021q &gt; /sys/class/net/eno2/dsa/tagging
 echo ocelot &gt; /sys/class/net/eno2/dsa/tagging

traffic is now broken, because the driver has moved the NPI port from
port 4 to port 5, unbeknown to DSA.

The problem can be avoided by detecting that the second CPU port is
unused, and not doing anything for it. Further rework will be needed
when proper support for multiple CPU ports is added.

Treat this as a bug and prepare current kernels to work in single-CPU
mode with multiple-CPU DT blobs.

Fixes: adb3dccf090b ("net: dsa: felix: convert to the new .change_tag_protocol DSA API")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Link: https://lore.kernel.org/r/20220412172209.2531865-1-vladimir.oltean@nxp.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: felix: suppress -EPROBE_DEFER errors</title>
<updated>2022-04-20T07:36:13Z</updated>
<author>
<name>Michael Walle</name>
</author>
<published>2022-04-08T10:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f884cdfdb7f9dcc0873ac21c50f62303170825de'/>
<id>urn:sha1:f884cdfdb7f9dcc0873ac21c50f62303170825de</id>
<content type='text'>
[ Upstream commit e6934e4048c91502efcb21da92b7ae37cd8fa741 ]

The DSA master might not have been probed yet in which case the probe of
the felix switch fails with -EPROBE_DEFER:
[    4.435305] mscc_felix 0000:00:00.5: Failed to register DSA switch: -517

It is not an error. Use dev_err_probe() to demote this particular error
to a debug message.

Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family")
Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Reviewed-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Link: https://lore.kernel.org/r/20220408101521.281886-1-michael@walle.cc
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: felix: fix possible NULL pointer dereference</title>
<updated>2022-04-13T17:27:06Z</updated>
<author>
<name>Zheng Yongjun</name>
</author>
<published>2022-03-29T09:08:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7ff8b5e75d4e91ec8c62d621aac8dfb84c57aa9'/>
<id>urn:sha1:b7ff8b5e75d4e91ec8c62d621aac8dfb84c57aa9</id>
<content type='text'>
[ Upstream commit 866b7a278cdb51eb158cd8513bc7438fc857804a ]

As the possible failure of the allocation, kzalloc() may return NULL
pointer.
Therefore, it should be better to check the 'sgi' in order to prevent
the dereference of NULL pointer.

Fixes: 23ae3a7877718 ("net: dsa: felix: add stream gate settings for psfp").
Signed-off-by: Zheng Yongjun &lt;zhengyongjun3@huawei.com&gt;
Reviewed-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Link: https://lore.kernel.org/r/20220329090800.130106-1-zhengyongjun3@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: seville: register the mdiobus under devres</title>
<updated>2022-02-09T04:30:35Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2022-02-07T16:15:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd488afc3b39e045ba71aab472233f2a78726e7b'/>
<id>urn:sha1:bd488afc3b39e045ba71aab472233f2a78726e7b</id>
<content type='text'>
As explained in commits:
74b6d7d13307 ("net: dsa: realtek: register the MDIO bus under devres")
5135e96a3dd2 ("net: dsa: don't allocate the slave_mii_bus using devres")

mdiobus_free() will panic when called from devm_mdiobus_free() &lt;-
devres_release_all() &lt;- __device_release_driver(), and that mdiobus was
not previously unregistered.

The Seville VSC9959 switch is a platform device, so the initial set of
constraints that I thought would cause this (I2C or SPI buses which call
-&gt;remove on -&gt;shutdown) do not apply. But there is one more which
applies here.

If the DSA master itself is on a bus that calls -&gt;remove from -&gt;shutdown
(like dpaa2-eth, which is on the fsl-mc bus), there is a device link
between the switch and the DSA master, and device_links_unbind_consumers()
will unbind the seville switch driver on shutdown.

So the same treatment must be applied to all DSA switch drivers, which
is: either use devres for both the mdiobus allocation and registration,
or don't use devres at all.

The seville driver has a code structure that could accommodate both the
mdiobus_unregister and mdiobus_free calls, but it has an external
dependency upon mscc_miim_setup() from mdio-mscc-miim.c, which calls
devm_mdiobus_alloc_size() on its behalf. So rather than restructuring
that, and exporting yet one more symbol mscc_miim_teardown(), let's work
with devres and replace of_mdiobus_register with the devres variant.
When we use all-devres, we can ensure that devres doesn't free a
still-registered bus (it either runs both callbacks, or none).

Fixes: ac3a68d56651 ("net: phy: don't abuse devres in devm_mdiobus_register()")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: felix: don't use devres for mdiobus</title>
<updated>2022-02-09T04:30:34Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2022-02-07T16:15:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=209bdb7ec6a28c7cdf580a0a98afbc9fc3b98932'/>
<id>urn:sha1:209bdb7ec6a28c7cdf580a0a98afbc9fc3b98932</id>
<content type='text'>
As explained in commits:
74b6d7d13307 ("net: dsa: realtek: register the MDIO bus under devres")
5135e96a3dd2 ("net: dsa: don't allocate the slave_mii_bus using devres")

mdiobus_free() will panic when called from devm_mdiobus_free() &lt;-
devres_release_all() &lt;- __device_release_driver(), and that mdiobus was
not previously unregistered.

The Felix VSC9959 switch is a PCI device, so the initial set of
constraints that I thought would cause this (I2C or SPI buses which call
-&gt;remove on -&gt;shutdown) do not apply. But there is one more which
applies here.

If the DSA master itself is on a bus that calls -&gt;remove from -&gt;shutdown
(like dpaa2-eth, which is on the fsl-mc bus), there is a device link
between the switch and the DSA master, and device_links_unbind_consumers()
will unbind the felix switch driver on shutdown.

So the same treatment must be applied to all DSA switch drivers, which
is: either use devres for both the mdiobus allocation and registration,
or don't use devres at all.

The felix driver has the code structure in place for orderly mdiobus
removal, so just replace devm_mdiobus_alloc_size() with the non-devres
variant, and add manual free where necessary, to ensure that we don't
let devres free a still-registered bus.

Fixes: ac3a68d56651 ("net: phy: don't abuse devres in devm_mdiobus_register()")
Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: felix: add port fast age support</title>
<updated>2022-01-08T02:58:25Z</updated>
<author>
<name>Vladimir Oltean</name>
</author>
<published>2022-01-07T14:42:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5cad43a52ee3caf451cd645baa4beb53a1733dae'/>
<id>urn:sha1:5cad43a52ee3caf451cd645baa4beb53a1733dae</id>
<content type='text'>
Add support for flushing the MAC table on a given port in the ocelot
switch library, and use this functionality in the felix DSA driver.

This operation is needed when a port leaves a bridge to become
standalone, and when the learning is disabled, and when the STP state
changes to a state where no FDB entry should be present.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Link: https://lore.kernel.org/r/20220107144229.244584-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: dsa: seville: name change for clarity from pcs to mdio_device</title>
<updated>2022-01-02T18:48:47Z</updated>
<author>
<name>Colin Foster</name>
</author>
<published>2021-12-29T05:03:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c1415e67f9341072ad057617c4fd440ea5e6043'/>
<id>urn:sha1:2c1415e67f9341072ad057617c4fd440ea5e6043</id>
<content type='text'>
A simple variable update from "pcs" to "mdio_device" for the mdio device
will make things a little cleaner.

Signed-off-by: Colin Foster &lt;colin.foster@in-advantage.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: dsa: felix: name change for clarity from pcs to mdio_device</title>
<updated>2022-01-02T18:48:47Z</updated>
<author>
<name>Colin Foster</name>
</author>
<published>2021-12-29T05:03:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61f0d0c304a2394b30c236aec684d570a3f40c19'/>
<id>urn:sha1:61f0d0c304a2394b30c236aec684d570a3f40c19</id>
<content type='text'>
Simple rename of a variable to make things more logical.

Signed-off-by: Colin Foster &lt;colin.foster@in-advantage.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: lynx: refactor Lynx PCS module to use generic phylink_pcs</title>
<updated>2022-01-02T18:48:47Z</updated>
<author>
<name>Colin Foster</name>
</author>
<published>2021-12-29T05:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7026f15564fbe0c8b091f218203111f77b84eda'/>
<id>urn:sha1:e7026f15564fbe0c8b091f218203111f77b84eda</id>
<content type='text'>
Remove references to lynx_pcs structures so drivers like the Felix DSA
can reference alternate PCS drivers.

Signed-off-by: Colin Foster &lt;colin.foster@in-advantage.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>flow_offload: add index to flow_action_entry structure</title>
<updated>2021-12-19T14:08:47Z</updated>
<author>
<name>Baowen Zheng</name>
</author>
<published>2021-12-17T18:16:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a9959008fb63191538ab0f7800f4cf26afe7750'/>
<id>urn:sha1:5a9959008fb63191538ab0f7800f4cf26afe7750</id>
<content type='text'>
Add index to flow_action_entry structure and delete index from police and
gate child structure.

We make this change to offload tc action for driver to identify a tc
action.

Signed-off-by: Baowen Zheng &lt;baowen.zheng@corigine.com&gt;
Signed-off-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
