<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/soc/mscc, branch v6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-04-18T02:01:19Z</updated>
<entry>
<title>net: mscc: ocelot: add support for preemptible traffic classes</title>
<updated>2023-04-18T02:01:19Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2023-04-15T17:05:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=403ffc2c34de5297d007e0e169bf022094d444c2'/>
<id>urn:sha1:403ffc2c34de5297d007e0e169bf022094d444c2</id>
<content type='text'>
In order to not transmit (preemptible) frames which will be received by
the link partner as corrupted (because it doesn't support FP), the
hardware requires the driver to program the QSYS_PREEMPTION_CFG_P_QUEUES
register only after the MAC Merge layer becomes active (verification
succeeds, or was disabled).

There are some cases when FP is known (through experimentation) to be
broken. Give priority to FP over cut-through switching, and disable FP
for known broken link modes.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: mscc: ocelot: add support for mqprio offload</title>
<updated>2023-04-18T02:01:19Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2023-04-15T17:05:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aac80140dc31963d818a65a522c2e2da81979857'/>
<id>urn:sha1:aac80140dc31963d818a65a522c2e2da81979857</id>
<content type='text'>
This doesn't apply anything to hardware and in general doesn't do
anything that the software variant doesn't do, except for checking that
there isn't more than 1 TXQ per TC (TXQs for a DSA switch are a dubious
concept anyway). The reason we add this is to be able to parse one more
field added to struct tc_mqprio_qopt_offload, namely preemptible_tcs.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Ferenc Fejes &lt;fejes@inf.elte.hu&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.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: mscc: ocelot: optimize ocelot_mm_irq()</title>
<updated>2023-04-18T02:01:18Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2023-04-15T17:05:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7bf4a5b071e59f48de8d39dfde07a3a65e7f6488'/>
<id>urn:sha1:7bf4a5b071e59f48de8d39dfde07a3a65e7f6488</id>
<content type='text'>
The MAC Merge IRQ of all ports is shared with the PTP TX timestamp IRQ
of all ports, which means that currently, when a PTP TX timestamp is
generated, felix_irq_handler() also polls for the MAC Merge layer status
of all ports, looking for changes. This makes the kernel do more work,
and under certain circumstances may make ptp4l require a
tx_timestamp_timeout argument higher than before.

Changes to the MAC Merge layer status are only to be expected under
certain conditions - its TX direction needs to be enabled - so we can
check early if that is the case, and omit register access otherwise.

Make ocelot_mm_update_port_status() skip register access if
mm-&gt;tx_enabled is unset, and also call it once more, outside IRQ
context, from ocelot_port_set_mm(), when mm-&gt;tx_enabled transitions from
true to false, because an IRQ is also expected in that case.

Also, a port may have its MAC Merge layer enabled but it may not have
generated the interrupt. In that case, there's no point in writing to
DEV_MM_STATUS to acknowledge that IRQ. We can reduce the number of
register writes per port with MM enabled by keeping an "ack" variable
which writes the "write-one-to-clear" bits. Those are 3 in number:
PRMPT_ACTIVE_STICKY, UNEXP_RX_PFRM_STICKY and UNEXP_TX_PFRM_STICKY.
The other fields in DEV_MM_STATUS are read-only and it doesn't matter
what is written to them, so writing zero is just fine.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.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: mscc: ocelot: remove struct ocelot_mm_state :: lock</title>
<updated>2023-04-18T02:01:18Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2023-04-15T17:05:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ff468ef987e38740de9ca0a811c55e11bfb2141'/>
<id>urn:sha1:3ff468ef987e38740de9ca0a811c55e11bfb2141</id>
<content type='text'>
Unfortunately, the workarounds for the hardware bugs make it pointless
to keep fine-grained locking for the MAC Merge state of each port.

Our vsc9959_cut_through_fwd() implementation requires
ocelot-&gt;fwd_domain_lock to be held, in order to serialize with changes
to the bridging domains and to port speed changes (which affect which
ports can be cut-through). Simultaneously, the traffic classes which can
be cut-through cannot be preemptible at the same time, and this will
depend on the MAC Merge layer state (which changes from threaded
interrupt context).

Since vsc9959_cut_through_fwd() would have to hold the mm-&gt;lock of all
ports for a correct and race-free implementation with respect to
ocelot_mm_irq(), in practice it means that any time a port's mm-&gt;lock is
held, it would potentially block holders of ocelot-&gt;fwd_domain_lock.

In the interest of simple locking rules, make all MAC Merge layer state
changes (and preemptible traffic class changes) be serialized by the
ocelot-&gt;fwd_domain_lock.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.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: mscc: ocelot: export a single ocelot_mm_irq()</title>
<updated>2023-04-18T02:01:18Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2023-04-15T17:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15f93f46f31232da863316769182c699e364c45f'/>
<id>urn:sha1:15f93f46f31232da863316769182c699e364c45f</id>
<content type='text'>
When the switch emits an IRQ, we don't know what caused it, and we
iterate through all ports to check the MAC Merge status.

Move that iteration inside the ocelot lib; we will change the locking in
a future change and it would be good to encapsulate that lock completely
within the ocelot lib.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.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: mscc: ocelot: strengthen type of "u32 reg" in I/O accessors</title>
<updated>2023-04-14T04:56:06Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>vladimir.oltean@nxp.com</email>
</author>
<published>2023-04-12T12:47:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ecd05794b8da1f6cfca4c3721a3b0fed2e21a82'/>
<id>urn:sha1:9ecd05794b8da1f6cfca4c3721a3b0fed2e21a82</id>
<content type='text'>
The "u32 reg" argument that is passed to these functions is not a plain
address, but rather a driver-specific encoding of another enum
ocelot_target target in the upper bits, and an index into the
u32 ocelot-&gt;map[target][] array in the lower bits. That encoded value
takes the type "enum ocelot_reg" and is what is passed to these I/O
functions, so let's actually use that to prevent type confusion.

Signed-off-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: mscc: ocelot: expose serdes configuration function</title>
<updated>2023-03-20T09:08:48Z</updated>
<author>
<name>Colin Foster</name>
<email>colin.foster@in-advantage.com</email>
</author>
<published>2023-03-17T18:54:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dfca93ed51a7cf8bfda876705816a5e55381ac4a'/>
<id>urn:sha1:dfca93ed51a7cf8bfda876705816a5e55381ac4a</id>
<content type='text'>
During chip initialization, ports that use SGMII / QSGMII to interface to
external phys need to be configured on the VSC7513 and VSC7514. Expose this
configuration routine, so it can be used by DSA 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>net: mscc: ocelot: expose generic phylink_mac_config routine</title>
<updated>2023-03-20T09:08:48Z</updated>
<author>
<name>Colin Foster</name>
<email>colin.foster@in-advantage.com</email>
</author>
<published>2023-03-17T18:54:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69f7f89c0db52c5a3fe1bc9ba69d8248b5ee0bca'/>
<id>urn:sha1:69f7f89c0db52c5a3fe1bc9ba69d8248b5ee0bca</id>
<content type='text'>
The ocelot-switch driver can utilize the phylink_mac_config routine. Move
this to the ocelot library location and export the symbol to make this
possible.

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: mscc: ocelot: expose ocelot_pll5_init routine</title>
<updated>2023-03-20T09:08:48Z</updated>
<author>
<name>Colin Foster</name>
<email>colin.foster@in-advantage.com</email>
</author>
<published>2023-03-17T18:54:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fec53f44945877c8627da4d3ad70e3ac7e204f38'/>
<id>urn:sha1:fec53f44945877c8627da4d3ad70e3ac7e204f38</id>
<content type='text'>
Ocelot chips have an internal PLL that must be used when communicating
through external phys. Expose the init routine, so it can be used by other
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>net: mscc: ocelot: un-export unused regmap symbols</title>
<updated>2023-02-07T06:33:15Z</updated>
<author>
<name>Colin Foster</name>
<email>colin.foster@in-advantage.com</email>
</author>
<published>2023-02-04T18:20:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b1ca2f1b04b8e89629c3c37430213267fd56c956'/>
<id>urn:sha1:b1ca2f1b04b8e89629c3c37430213267fd56c956</id>
<content type='text'>
There are no external users of the vsc7514_*_regmap[] symbols or
vsc7514_vcap_* functions. They were exported in commit 32ecd22ba60b ("net:
mscc: ocelot: split register definitions to a separate file") with the
intention of being used, but the actual structure used in commit
2efaca411c96 ("net: mscc: ocelot: expose vsc7514_regmap definition") ended
up being all that was needed.

Bury these unnecessary symbols.

Signed-off-by: Colin Foster &lt;colin.foster@in-advantage.com&gt;
Suggested-by: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Reviewed-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/20230204182056.25502-1-colin.foster@in-advantage.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
