<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blaster4385/linux-IllusionX/drivers/net/ethernet/stmicro, branch v6.12.1</title>
<subtitle>Linux kernel with personal config changes for arch linux</subtitle>
<id>http://git.tablaster.dev/blaster4385/linux-IllusionX/atom?h=v6.12.1</id>
<link rel='self' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/atom?h=v6.12.1'/>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/'/>
<updated>2024-11-14T03:52:24Z</updated>
<entry>
<title>stmmac: dwmac-intel-plat: fix call balance of tx_clk handling routines</title>
<updated>2024-11-14T03:52:24Z</updated>
<author>
<name>Vitalii Mordan</name>
<email>mordan@ispras.ru</email>
</author>
<published>2024-11-08T17:33:34Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=5b366eae71937ae7412365340b431064625f9617'/>
<id>urn:sha1:5b366eae71937ae7412365340b431064625f9617</id>
<content type='text'>
If the clock dwmac-&gt;tx_clk was not enabled in intel_eth_plat_probe,
it should not be disabled in any path.

Conversely, if it was enabled in intel_eth_plat_probe, it must be disabled
in all error paths to ensure proper cleanup.

Found by Linux Verification Center (linuxtesting.org) with Klever.

Fixes: 9efc9b2b04c7 ("net: stmmac: Add dwmac-intel-plat for GBE driver")
Signed-off-by: Vitalii Mordan &lt;mordan@ispras.ru&gt;
Link: https://patch.msgid.link/20241108173334.2973603-1-mordan@ispras.ru
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol</title>
<updated>2024-11-14T03:23:02Z</updated>
<author>
<name>Nícolas F. R. A. Prado</name>
<email>nfraprado@collabora.com</email>
</author>
<published>2024-11-09T15:16:32Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=a03b18a71c128846360cc81ac6fdb0e7d41597b4'/>
<id>urn:sha1:a03b18a71c128846360cc81ac6fdb0e7d41597b4</id>
<content type='text'>
The mediatek,mac-wol property is being handled backwards to what is
described in the binding: it currently enables PHY WOL when the property
is present and vice versa. Invert the driver logic so it matches the
binding description.

Fixes: fd1d62d80ebc ("net: stmmac: replace the use_phy_wol field with a flag")
Signed-off-by: Nícolas F. R. A. Prado &lt;nfraprado@collabora.com&gt;
Link: https://patch.msgid.link/20241109-mediatek-mac-wol-noninverted-v2-1-0e264e213878@collabora.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: stmmac: Fix unbalanced IRQ wake disable warning on single irq case</title>
<updated>2024-11-07T09:04:13Z</updated>
<author>
<name>Nícolas F. R. A. Prado</name>
<email>nfraprado@collabora.com</email>
</author>
<published>2024-11-01T21:17:29Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=25d70702142ac2115e75e01a0a985c6ea1d78033'/>
<id>urn:sha1:25d70702142ac2115e75e01a0a985c6ea1d78033</id>
<content type='text'>
Commit a23aa0404218 ("net: stmmac: ethtool: Fixed calltrace caused by
unbalanced disable_irq_wake calls") introduced checks to prevent
unbalanced enable and disable IRQ wake calls. However it only
initialized the auxiliary variable on one of the paths,
stmmac_request_irq_multi_msi(), missing the other,
stmmac_request_irq_single().

Add the same initialization on stmmac_request_irq_single() to prevent
"Unbalanced IRQ &lt;x&gt; wake disable" warnings from being printed the first
time disable_irq_wake() is called on platforms that run on that code
path.

Fixes: a23aa0404218 ("net: stmmac: ethtool: Fixed calltrace caused by unbalanced disable_irq_wake calls")
Signed-off-by: Nícolas F. R. A. Prado &lt;nfraprado@collabora.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20241101-stmmac-unbalanced-wake-single-fix-v1-1-5952524c97f0@collabora.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: stmmac: TSO: Fix unbalanced DMA map/unmap for non-paged SKB data</title>
<updated>2024-10-29T10:37:10Z</updated>
<author>
<name>Furong Xu</name>
<email>0x1207@gmail.com</email>
</author>
<published>2024-10-21T06:10:23Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=66600fac7a984dea4ae095411f644770b2561ede'/>
<id>urn:sha1:66600fac7a984dea4ae095411f644770b2561ede</id>
<content type='text'>
In case the non-paged data of a SKB carries protocol header and protocol
payload to be transmitted on a certain platform that the DMA AXI address
width is configured to 40-bit/48-bit, or the size of the non-paged data
is bigger than TSO_MAX_BUFF_SIZE on a certain platform that the DMA AXI
address width is configured to 32-bit, then this SKB requires at least
two DMA transmit descriptors to serve it.

For example, three descriptors are allocated to split one DMA buffer
mapped from one piece of non-paged data:
    dma_desc[N + 0],
    dma_desc[N + 1],
    dma_desc[N + 2].
Then three elements of tx_q-&gt;tx_skbuff_dma[] will be allocated to hold
extra information to be reused in stmmac_tx_clean():
    tx_q-&gt;tx_skbuff_dma[N + 0],
    tx_q-&gt;tx_skbuff_dma[N + 1],
    tx_q-&gt;tx_skbuff_dma[N + 2].
Now we focus on tx_q-&gt;tx_skbuff_dma[entry].buf, which is the DMA buffer
address returned by DMA mapping call. stmmac_tx_clean() will try to
unmap the DMA buffer _ONLY_IF_ tx_q-&gt;tx_skbuff_dma[entry].buf
is a valid buffer address.

The expected behavior that saves DMA buffer address of this non-paged
data to tx_q-&gt;tx_skbuff_dma[entry].buf is:
    tx_q-&gt;tx_skbuff_dma[N + 0].buf = NULL;
    tx_q-&gt;tx_skbuff_dma[N + 1].buf = NULL;
    tx_q-&gt;tx_skbuff_dma[N + 2].buf = dma_map_single();
Unfortunately, the current code misbehaves like this:
    tx_q-&gt;tx_skbuff_dma[N + 0].buf = dma_map_single();
    tx_q-&gt;tx_skbuff_dma[N + 1].buf = NULL;
    tx_q-&gt;tx_skbuff_dma[N + 2].buf = NULL;

On the stmmac_tx_clean() side, when dma_desc[N + 0] is closed by the
DMA engine, tx_q-&gt;tx_skbuff_dma[N + 0].buf is a valid buffer address
obviously, then the DMA buffer will be unmapped immediately.
There may be a rare case that the DMA engine does not finish the
pending dma_desc[N + 1], dma_desc[N + 2] yet. Now things will go
horribly wrong, DMA is going to access a unmapped/unreferenced memory
region, corrupted data will be transmited or iommu fault will be
triggered :(

In contrast, the for-loop that maps SKB fragments behaves perfectly
as expected, and that is how the driver should do for both non-paged
data and paged frags actually.

This patch corrects DMA map/unmap sequences by fixing the array index
for tx_q-&gt;tx_skbuff_dma[entry].buf when assigning DMA buffer address.

Tested and verified on DWXGMAC CORE 3.20a

Reported-by: Suraj Jaiswal &lt;quic_jsuraj@quicinc.com&gt;
Fixes: f748be531d70 ("stmmac: support new GMAC4")
Signed-off-by: Furong Xu &lt;0x1207@gmail.com&gt;
Reviewed-by: Hariprasad Kelam &lt;hkelam@marvell.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20241021061023.2162701-1-0x1207@gmail.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: stmmac: dwmac4: Fix high address display by updating reg_space[] from register values</title>
<updated>2024-10-29T10:29:40Z</updated>
<author>
<name>Ley Foon Tan</name>
<email>leyfoon.tan@starfivetech.com</email>
</author>
<published>2024-10-21T05:46:25Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=f84ef58e553206b02d06e02158c98fbccba25d19'/>
<id>urn:sha1:f84ef58e553206b02d06e02158c98fbccba25d19</id>
<content type='text'>
The high address will display as 0 if the driver does not set the
reg_space[]. To fix this, read the high address registers and
update the reg_space[] accordingly.

Fixes: fbf68229ffe7 ("net: stmmac: unify registers dumps methods")
Signed-off-by: Ley Foon Tan &lt;leyfoon.tan@starfivetech.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20241021054625.1791965-1-leyfoon.tan@starfivetech.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: stmmac: dwmac-tegra: Fix link bring-up sequence</title>
<updated>2024-10-15T10:35:17Z</updated>
<author>
<name>Paritosh Dixit</name>
<email>paritoshd@nvidia.com</email>
</author>
<published>2024-10-10T14:29:08Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=1cff6ff302f5703a627f9ee1d99131161ea2683e'/>
<id>urn:sha1:1cff6ff302f5703a627f9ee1d99131161ea2683e</id>
<content type='text'>
The Tegra MGBE driver sometimes fails to initialize, reporting the
following error, and as a result, it is unable to acquire an IP
address with DHCP:

 tegra-mgbe 6800000.ethernet: timeout waiting for link to become ready

As per the recommendation from the Tegra hardware design team, fix this
issue by:
- clearing the PHY_RDY bit before setting the CDR_RESET bit and then
setting PHY_RDY bit before clearing CDR_RESET bit. This ensures valid
data is present at UPHY RX inputs before starting the CDR lock.
- adding the required delays when bringing up the UPHY lane. Note we
need to use delays here because there is no alternative, such as
polling, for these cases. Using the usleep_range() instead of ndelay()
as sleeping is preferred over busy wait loop.

Without this change we would see link failures on boot sometimes as
often as 1 in 5 boots. With this fix we have not observed any failures
in over 1000 boots.

Fixes: d8ca113724e7 ("net: stmmac: tegra: Add MGBE support")
Signed-off-by: Paritosh Dixit &lt;paritoshd@nvidia.com&gt;
Link: https://patch.msgid.link/20241010142908.602712-1-paritoshd@nvidia.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>Revert "net: stmmac: set PP_FLAG_DMA_SYNC_DEV only if XDP is enabled"</title>
<updated>2024-10-07T23:47:07Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2024-10-04T14:21:15Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=5546da79e6cc5bb3324bf25688ed05498fd3f86d'/>
<id>urn:sha1:5546da79e6cc5bb3324bf25688ed05498fd3f86d</id>
<content type='text'>
This reverts commit b514c47ebf41a6536551ed28a05758036e6eca7c.

The commit describes that we don't have to sync the page when
recycling, and it tries to optimize that case. But we do need
to sync after allocation. Recycling side should be changed to
pass the right sync size instead.

Fixes: b514c47ebf41 ("net: stmmac: set PP_FLAG_DMA_SYNC_DEV only if XDP is enabled")
Reported-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Link: https://lore.kernel.org/20241004070846.2502e9ea@kernel.org
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Reviewed-by: Furong Xu &lt;0x1207@gmail.com&gt;
Link: https://patch.msgid.link/20241004142115.910876-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: stmmac: dwmac4: extend timeout for VLAN Tag register busy bit check</title>
<updated>2024-10-01T10:35:55Z</updated>
<author>
<name>Shenwei Wang</name>
<email>shenwei.wang@nxp.com</email>
</author>
<published>2024-09-24T20:54:24Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=4c1b56671b68ffcbe6b78308bfdda6bcce6491ae'/>
<id>urn:sha1:4c1b56671b68ffcbe6b78308bfdda6bcce6491ae</id>
<content type='text'>
Increase the timeout for checking the busy bit of the VLAN Tag register
from 10µs to 500ms. This change is necessary to accommodate scenarios
where Energy Efficient Ethernet (EEE) is enabled.

Overnight testing revealed that when EEE is active, the busy bit can
remain set for up to approximately 300ms. The new 500ms timeout provides
a safety margin.

Fixes: ed64639bc1e0 ("net: stmmac: Add support for VLAN Rx filtering")
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Shenwei Wang &lt;shenwei.wang@nxp.com&gt;
Link: https://patch.msgid.link/20240924205424.573913-1-shenwei.wang@nxp.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: stmmac: set PP_FLAG_DMA_SYNC_DEV only if XDP is enabled</title>
<updated>2024-09-26T08:45:19Z</updated>
<author>
<name>Furong Xu</name>
<email>0x1207@gmail.com</email>
</author>
<published>2024-09-19T12:10:28Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=b514c47ebf41a6536551ed28a05758036e6eca7c'/>
<id>urn:sha1:b514c47ebf41a6536551ed28a05758036e6eca7c</id>
<content type='text'>
Commit 5fabb01207a2 ("net: stmmac: Add initial XDP support") sets
PP_FLAG_DMA_SYNC_DEV flag for page_pool unconditionally,
page_pool_recycle_direct() will call page_pool_dma_sync_for_device()
on every page even the page is not going to be reused by XDP program.

When XDP is not enabled, the page which holds the received buffer
will be recycled once the buffer is copied into new SKB by
skb_copy_to_linear_data(), then the MAC core will never reuse this
page any longer. Always setting PP_FLAG_DMA_SYNC_DEV wastes CPU cycles
on unnecessary calling of page_pool_dma_sync_for_device().

After this patch, up to 9% noticeable performance improvement was observed
on certain platforms.

Fixes: 5fabb01207a2 ("net: stmmac: Add initial XDP support")
Signed-off-by: Furong Xu &lt;0x1207@gmail.com&gt;
Link: https://patch.msgid.link/20240919121028.1348023-1-0x1207@gmail.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: stmmac: Fix zero-division error when disabling tc cbs</title>
<updated>2024-09-24T09:23:33Z</updated>
<author>
<name>KhaiWenTan</name>
<email>khai.wen.tan@linux.intel.com</email>
</author>
<published>2024-09-18T06:14:22Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=675faf5a14c14a2be0b870db30a70764df81e2df'/>
<id>urn:sha1:675faf5a14c14a2be0b870db30a70764df81e2df</id>
<content type='text'>
The commit b8c43360f6e4 ("net: stmmac: No need to calculate speed divider
when offload is disabled") allows the "port_transmit_rate_kbps" to be
set to a value of 0, which is then passed to the "div_s64" function when
tc-cbs is disabled. This leads to a zero-division error.

When tc-cbs is disabled, the idleslope, sendslope, and credit values the
credit values are not required to be configured. Therefore, adding a return
statement after setting the txQ mode to DCB when tc-cbs is disabled would
prevent a zero-division error.

Fixes: b8c43360f6e4 ("net: stmmac: No need to calculate speed divider when offload is disabled")
Cc: &lt;stable@vger.kernel.org&gt;
Co-developed-by: Choong Yong Liang &lt;yong.liang.choong@linux.intel.com&gt;
Signed-off-by: Choong Yong Liang &lt;yong.liang.choong@linux.intel.com&gt;
Signed-off-by: KhaiWenTan &lt;khai.wen.tan@linux.intel.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20240918061422.1589662-1-khai.wen.tan@linux.intel.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
</feed>
