]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: virtio: Fix config space reading.
authorHarald Mommer <harald.mommer@oss.qualcomm.com>
Thu, 24 Jul 2025 14:36:53 +0000 (16:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:47 +0000 (16:25 +0200)
commit35e2b3a2f065d5d0d631e301e27e1c08ea826165
treee8e05aeb89a8c87c16240836eb5a1f67b355a688
parente12a5611d578621c1afebdbd0b3fc7a25cd6c818
gpio: virtio: Fix config space reading.

commit 4740e1e2f320061c2f0dbadc0dd3dfb58df986d5 upstream.

Quote from the virtio specification chapter 4.2.2.2:

"For the device-specific configuration space, the driver MUST use 8 bit
wide accesses for 8 bit wide fields, 16 bit wide and aligned accesses
for 16 bit wide fields and 32 bit wide and aligned accesses for 32 and
64 bit wide fields."

Signed-off-by: Harald Mommer <harald.mommer@oss.qualcomm.com>
Cc: stable@vger.kernel.org
Fixes: 3a29355a22c0 ("gpio: Add virtio-gpio driver")
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/20250724143718.5442-2-harald.mommer@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-virtio.c