usb: max-3421: Fix setting of I/O pins
authorMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Tue, 7 Feb 2023 03:33:37 +0000 (16:33 +1300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:41 +0000 (09:39 +0100)
commitd9e1dae1e278c29e9e3ae93183a218de02f10270
treebe3fec80ab4d5573f920254a94001a38f9172e3f
parent9dca64042d855a24b0bd81ce242e5dc7e939f6eb
usb: max-3421: Fix setting of I/O pins

[ Upstream commit a7efe3fc7cbe27c6eb2c2a3ab612194f8f800f4c ]

To update the I/O pins, the registers are read/modified/written. The
read operation incorrectly always read the first register. Although
wrong, there wasn't any impact as all the output pins are always
written, and the inputs are read only anyway.

Fixes: 2d53139f3162 ("Add support for using a MAX3421E chip as a host driver.")
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20230207033337.18112-1-mark.tomlinson@alliedtelesis.co.nz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/max3421-hcd.c