]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: lan743x: Modify the EEPROM and OTP size for PCI1xxxx devices
authorRengarajan S <rengarajan.s@microchip.com>
Fri, 23 May 2025 17:33:26 +0000 (23:03 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:32 +0000 (11:07 +0100)
commit6b4201d74d0a49af2123abf2c9d142e59566714b
treec6324c2dfb35f6f311e5e3249a4dd6f8d5c6248e
parentfbf92f7d7272d9a0bac953a05b2e9cad7ab13484
net: lan743x: Modify the EEPROM and OTP size for PCI1xxxx devices

[ Upstream commit 3b9935586a9b54d2da27901b830d3cf46ad66a1e ]

Maximum OTP and EEPROM size for hearthstone PCI1xxxx devices are 8 Kb
and 64 Kb respectively. Adjust max size definitions and return correct
EEPROM length based on device. Also prevent out-of-bound read/write.

Signed-off-by: Rengarajan S <rengarajan.s@microchip.com>
Link: https://patch.msgid.link/20250523173326.18509-1-rengarajan.s@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/microchip/lan743x_ethtool.c