mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] net: atlantic: AQC113: Initialize struct hw_atl2_priv fully
@ 2026-10-24 17:19 Janne Grunau
  2026-10-25 18:02 ` netdev-bot+sashiko
  0 siblings, 1 reply; 2+ messages in thread
From: Janne Grunau @ 2026-10-24 17:19 UTC (permalink / raw)
  To: Sukhdeep Singh, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel, stable, Janne Grunau

Leaving parts of struct hw_atl2_priv uninitialized breaks data
transmission on AQC113 NICs integrated in Apple silicon desktop Macs.
Commit 6c1ca112a6e4 ("net: atlantic: fix AQC113 HW init: ART, L2 filter
slot, MAC address") replaced a memset of the whole struct with memsets
of a few fields and initialisation of l3l4_filters[].l[34]_index to -1.
This leaves other fields uninitialized.
Restoring the full struct memset while keeping the initialization of
the l3/l4 filter indices fixes the regression on Apple silicon systems.

Fixes: 6c1ca112a6e4 ("net: atlantic: fix AQC113 HW init: ART, L2 filter slot, MAC address")
Cc: stable@vger.kernel.org
Signed-off-by: Janne Grunau <j@jannau.net>
---
Hej,

commit 6c1ca112a6e4 ("net: atlantic: fix AQC113 HW init: ART, L2 filter
slot, MAC address") broke data transmission on Apple silicon systems
with integrated AQC113. The cause appears to leaving parts of struct
hw_atl2_priv uninitialized. Since the most sensible fix for the issue is
restoring the full struct memset I did not investigate which value in
which field causes the issue.
The fix restores ethernet data transmission on an Apple M1 Max Mac
Studio.
---
 drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
index 25dd7150aaaf..5d6e81fa3bae 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2.c
@@ -145,11 +145,7 @@ static int hw_atl2_hw_reset(struct aq_hw_s *self)
 	if (err)
 		return err;
 
-	memset(&priv->last_stats, 0, sizeof(priv->last_stats));
-	memset(priv->l3_v4_filters, 0, sizeof(priv->l3_v4_filters));
-	memset(priv->l3_v6_filters, 0, sizeof(priv->l3_v6_filters));
-	memset(priv->l4_filters, 0, sizeof(priv->l4_filters));
-	memset(priv->etype_policy, 0, sizeof(priv->etype_policy));
+	memset(priv, 0, sizeof(*priv));
 	for (i = 0; i < HW_ATL2_RPF_L3L4_FILTERS; i++) {
 		priv->l3l4_filters[i].l3_index = -1;
 		priv->l3l4_filters[i].l4_index = -1;

---
base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
change-id: 20261024-net-atlantic-aq113-apple-regression-e40f40bd57de

Best regards,
-- 
Janne Grunau <j@jannau.net>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-25 18:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-24 17:19 [PATCH] net: atlantic: AQC113: Initialize struct hw_atl2_priv fully Janne Grunau
2026-10-25 18:02 ` netdev-bot+sashiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®