From nobody Fri Jul 24 21:53:10 2026 Received: from mx4.wp.pl (mx4.wp.pl [212.77.101.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E47683D88F5 for ; Fri, 24 Jul 2026 08:32:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.77.101.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784881954; cv=none; b=LFefrkz0fIuQe4jxaS+xfEShi94QF6LKR+/RP3+kv4pGE2hN7khCVqD6wrbXQ0LyS/xZM5hGyVfvAA6vyNH3HexxMUxatTaJ8Dhj4eW93UcDFUhe+v9/9TAuMt2cOpYXW3WGGU5Ui2i65nczeA72PewNADi7Dn7CIVnWElcT/08= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784881954; c=relaxed/simple; bh=txPjE/Cf2Lgn5ZMVBhdqMUBO5oUMI0jfoL+IKOX98cs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=hzoXnee2f5SeushpHQ61bFS0S3JrxSQAHij2xCyKHu2D0VkTKl/Kr5C5KHsjeWrUg7IblEm7HyKq0KVWt8bGvS9N5f/yoD6ZSBi1d4YJBWprrCPQ6KtCB7miQGl71VZdrUzKazWqP+sxOiZr5v3aBPwlc/Qjj9tXwEpFn6gOm7w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wp.pl; spf=pass smtp.mailfrom=wp.pl; dkim=pass (2048-bit key) header.d=wp.pl header.i=@wp.pl header.b=Uf671Izy; arc=none smtp.client-ip=212.77.101.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wp.pl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wp.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wp.pl header.i=@wp.pl header.b="Uf671Izy" Received: (wp-smtpd smtp.wp.pl 30717 invoked from network); 24 Jul 2026 10:32:22 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=20241105; t=1784881942; bh=yX3WVtZnxYM1eCUN1sbpwedP3O2ECrKxgbE69vGv4D4=; h=From:To:Cc:Subject; b=Uf671Izy3Nw3WFWGi85mAJ0bZKQZ+F7RMNYDGtPRqj1MLdtkv3/y+BQBr15EeWgbF F2W362n6DCRdplRH2Wtj4ISNkhy8ZVrhIT5i4RvchFoebppvZddtP2Bb3juCNiVVFZ a60XdyjX/ZodMP58Duv64XPi/h0q+8iWSiwMRR6ONSIKS9alkheGwVvTCZ9IFMYCTH w9Yf9D4UJYztzSVDBr82hlyMpT7LpS+vwgYXnnNS8w8/d9zcyLux96yqlJJOtXjO/x igFh5g4zTjAcz2qVpGJgk2TQBYl0Q2iQO6oXkLsqF1OY8drpeyNF7dswwlnhvFrJzo Dwdtey6bfGXKw== Received: from 77-236-11-167.static.play.pl (HELO localhost) (stf_xl@wp.pl@[77.236.11.167]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with TLS_AES_256_GCM_SHA384 encrypted SMTP for ; 24 Jul 2026 10:32:22 +0200 From: stf_xl@wp.pl To: netdev@vger.kernel.or Cc: linux-kernel@vger.kernel.org Subject: [PATCH] net: ethernet: ax88796: initialize all fields of eeprom_93cx6 struct Date: Fri, 24 Jul 2026 10:32:22 +0200 Message-Id: <20260724083222.8401-1-stf_xl@wp.pl> X-Mailer: git-send-email 2.25.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-WP-MailID: 819ed761b1da48bbc1307df14493e0a9 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [sYO0] Content-Type: text/plain; charset="utf-8" From: Stanislaw Gruszka Commit 7738a7ab9d12 ("misc: eeprom: eeprom_93cx6: Add quirk for extra read clock cycle") added extra 'quirk' field to struct eeprom_93cx6, which change how the data is read. Some existing users of eeprom_93cx6, including ax88796 driver, allocate the structure on the stack without initialization of all the fields. As a result, the added quirk field has undefined value, what can randomly cause reading wrong data from the EEPROM. Fix by using designated initialization. Fixes: 7738a7ab9d12 ("misc: eeprom: eeprom_93cx6: Add quirk for extra read = clock cycle") Cc: stable@kernel.org # v6.13+ Signed-off-by: Stanislaw Gruszka --- drivers/net/ethernet/8390/ax88796.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/839= 0/ax88796.c index e1695d0fbd8b..5ee1fbafdcfc 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c @@ -722,12 +722,12 @@ static int ax_init_dev(struct net_device *dev) #ifdef CONFIG_AX88796_93CX6 if (ax->plat->flags & AXFLG_HAS_93CX6) { unsigned char mac_addr[ETH_ALEN]; - struct eeprom_93cx6 eeprom; - - eeprom.data =3D ei_local; - eeprom.register_read =3D ax_eeprom_register_read; - eeprom.register_write =3D ax_eeprom_register_write; - eeprom.width =3D PCI_EEPROM_WIDTH_93C56; + struct eeprom_93cx6 eeprom =3D { + .data =3D ei_local, + .register_read =3D ax_eeprom_register_read, + .register_write =3D ax_eeprom_register_write, + .width =3D PCI_EEPROM_WIDTH_93C56, + }; =20 eeprom_93cx6_multiread(&eeprom, 0, (__le16 __force *)mac_addr, --=20 2.50.1