diff mbox series

net: stmmac: dwc-qos: Disable split header for Tegra194

Message ID 20220706083913.13750-1-jonathanh@nvidia.com (mailing list archive)
State Accepted
Commit 029c1c2059e9c4b38f97a06204cdecd10cfbeb8a
Delegated to: Netdev Maintainers
Headers show
Series net: stmmac: dwc-qos: Disable split header for Tegra194 | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 3 maintainers not CCed: linux-arm-kernel@lists.infradead.org linux-stm32@st-md-mailman.stormreply.com mcoquelin.stm32@gmail.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Jon Hunter July 6, 2022, 8:39 a.m. UTC
There is a long-standing issue with the Synopsys DWC Ethernet driver
for Tegra194 where random system crashes have been observed [0]. The
problem occurs when the split header feature is enabled in the stmmac
driver. In the bad case, a larger than expected buffer length is
received and causes the calculation of the total buffer length to
overflow. This results in a very large buffer length that causes the
kernel to crash. Why this larger buffer length is received is not clear,
however, the feedback from the NVIDIA design team is that the split
header feature is not supported for Tegra194. Therefore, disable split
header support for Tegra194 to prevent these random crashes from
occurring.

[0] https://lore.kernel.org/linux-tegra/b0b17697-f23e-8fa5-3757-604a86f3a095@nvidia.com/

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski July 7, 2022, 2:11 a.m. UTC | #1
On Wed, 6 Jul 2022 09:39:13 +0100 Jon Hunter wrote:
> There is a long-standing issue with the Synopsys DWC Ethernet driver
> for Tegra194 where random system crashes have been observed [0]. The
> problem occurs when the split header feature is enabled in the stmmac
> driver. In the bad case, a larger than expected buffer length is
> received and causes the calculation of the total buffer length to
> overflow. This results in a very large buffer length that causes the
> kernel to crash. Why this larger buffer length is received is not clear,
> however, the feedback from the NVIDIA design team is that the split
> header feature is not supported for Tegra194. Therefore, disable split
> header support for Tegra194 to prevent these random crashes from
> occurring.
> 
> [0] https://lore.kernel.org/linux-tegra/b0b17697-f23e-8fa5-3757-604a86f3a095@nvidia.com/
> 
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>

Fixes: 67afd6d1cfdf ("net: stmmac: Add Split Header support and enable it in XGMAC cores")

correct?
Jon Hunter July 7, 2022, 10:12 a.m. UTC | #2
On 07/07/2022 03:11, Jakub Kicinski wrote:
> On Wed, 6 Jul 2022 09:39:13 +0100 Jon Hunter wrote:
>> There is a long-standing issue with the Synopsys DWC Ethernet driver
>> for Tegra194 where random system crashes have been observed [0]. The
>> problem occurs when the split header feature is enabled in the stmmac
>> driver. In the bad case, a larger than expected buffer length is
>> received and causes the calculation of the total buffer length to
>> overflow. This results in a very large buffer length that causes the
>> kernel to crash. Why this larger buffer length is received is not clear,
>> however, the feedback from the NVIDIA design team is that the split
>> header feature is not supported for Tegra194. Therefore, disable split
>> header support for Tegra194 to prevent these random crashes from
>> occurring.
>>
>> [0] https://lore.kernel.org/linux-tegra/b0b17697-f23e-8fa5-3757-604a86f3a095@nvidia.com/
>>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> 
> Fixes: 67afd6d1cfdf ("net: stmmac: Add Split Header support and enable it in XGMAC cores")
> 
> correct?


Yes that is correct. I forgot to add. Let me know if you want me to send 
a V2.

Thanks
Jon
patchwork-bot+netdevbpf@kernel.org July 8, 2022, 12:20 a.m. UTC | #3
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 6 Jul 2022 09:39:13 +0100 you wrote:
> There is a long-standing issue with the Synopsys DWC Ethernet driver
> for Tegra194 where random system crashes have been observed [0]. The
> problem occurs when the split header feature is enabled in the stmmac
> driver. In the bad case, a larger than expected buffer length is
> received and causes the calculation of the total buffer length to
> overflow. This results in a very large buffer length that causes the
> kernel to crash. Why this larger buffer length is received is not clear,
> however, the feedback from the NVIDIA design team is that the split
> header feature is not supported for Tegra194. Therefore, disable split
> header support for Tegra194 to prevent these random crashes from
> occurring.
> 
> [...]

Here is the summary with links:
  - net: stmmac: dwc-qos: Disable split header for Tegra194
    https://git.kernel.org/netdev/net/c/029c1c2059e9

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
index bc91fd867dcd..358fc26f8d1f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
@@ -361,6 +361,7 @@  static int tegra_eqos_probe(struct platform_device *pdev,
 	data->fix_mac_speed = tegra_eqos_fix_speed;
 	data->init = tegra_eqos_init;
 	data->bsp_priv = eqos;
+	data->sph_disable = 1;
 
 	err = tegra_eqos_init(pdev, eqos);
 	if (err < 0)