]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
misc: eeprom: Fix EWEN/EWDS/ERAL commands for 93xx56 and 93xx66
authorMarkus Perkins <markus@notsyncing.net>
Tue, 2 Dec 2025 10:48:24 +0000 (11:48 +0100)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:20:40 +0000 (07:20 -0500)
commitd9b5c0528720e141cfd07d3d4308dce728c854d7
tree1cb9c7a039a3e51273566a9351e161e78f30e0ff
parent52129435f8a9022a4c3b911ca99616f7bd07b1f7
misc: eeprom: Fix EWEN/EWDS/ERAL commands for 93xx56 and 93xx66

[ Upstream commit b54c82d6cbfc76647ba558e8e3647eb2b0ba0e2b ]

commit 14374fbb3f06 ("misc: eeprom_93xx46: Add new 93c56 and 93c66
compatible strings") added support for 93xx56 and 93xx66 eeproms, but
didn't take into account that the write enable/disable + erase all
commands are hardcoded for the 6-bit address of the 93xx46.

This commit fixes the command word generation by increasing the number
of shifts as the address field grows, keeping the command intact.

Also, the check for 8-bit or 16-bit mode is no longer required as this
is already taken into account in the edev->addrlen field.

Signed-off-by: Markus Perkins <markus@notsyncing.net>
Link: https://patch.msgid.link/20251202104823.429869-3-markus@notsyncing.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/eeprom/eeprom_93xx46.c