RISC-V soc driver fixes for v6.13-rc4

A single fix for the Auto Update driver, where a mistake in array
 indexing (accessing as a u32 rather than a u8) caused the driver to read
 the wrong feature disable bits.
 
 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZ2LxgQAKCRB4tDGHoIJi
 0n4+AP0QYLOMoo9POBGKK2U9RSX5y9ItqvPAqtgbEtRarjt+bQD/Ql/7eho9DUmp
 S0VM51BDrGz9P5otGKNqGgosasBr8wE=
 =l4eA
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmdloq4ACgkQYKtH/8kJ
 Uicc3A//Undk/vbFH+VU8wmWCZy/WemhbkQA6SxQLGb2u7DcJwVomyziM94hRRd+
 pf4D6bj6sDy2HkahIOOD4FHeEEkbnhWlaJ+z1RwJ8RJWmJFsnnH84/Nd5RhBc+kC
 SA5znx8gpnj7mFHEAqu0EPlCBOX5Gpe3FoDa/E+VVFwxloy8/zr3myMkvBzbqCKO
 loShwUZDpDeVsUEY8dGXgZrd9s8srZqshPqYZFSJE454xGnVDxodqvfktVosCJRL
 PnT3Xz7ffab8rJsmuc81s8J3HP/aRpEY9yRljmSqvR6qe0SPYsF6XzWLhSg9gAcG
 072UA1eaHuKhimzUvFQxOTtqLKGvc+C4cmVtYrQ2AiAmP5Am3N0vmz21C4Vdz1uy
 5HzZWwijaBUd1KBPeAcLO1ErnWOnQW/lN1sNfYaAw85OkTTNFvMuU6u0Q2Njn/CL
 2wrk6sQlkR+RZBqQrHLqelcq+bxEfxOmkxNklblJ9Xfa89eQrpRUXa5UimhC/7Lj
 4sjirKKbLROxKkzdGC1QNmVcBx8Juk1s8/n6FAFsm4rre0z1ht00HrqbJDYYU2DY
 oirHmVM+soCb8Q30nO24ZvkN92UzxQlo88PWG8QHjo/9KeetxDyzf4jsTEj+1sOg
 jnFW3Uy59JOZLQoHOHxYkGjvS+xIOT8sFn2jA+TbAVP+rL5xqc0=
 =Bw5R
 -----END PGP SIGNATURE-----

Merge tag 'riscv-soc-fixes-for-v6.13-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes

RISC-V soc driver fixes for v6.13-rc4

A single fix for the Auto Update driver, where a mistake in array
indexing (accessing as a u32 rather than a u8) caused the driver to read
the wrong feature disable bits.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

* tag 'riscv-soc-fixes-for-v6.13-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  firmware: microchip: fix UL_IAP lock check in mpfs_auto_update_state()

Link: https://lore.kernel.org/r/20241218-suffrage-unfazed-fa0113072a42@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2024-12-20 18:00:30 +01:00
commit a61dae1101

View File

@ -402,10 +402,10 @@ static int mpfs_auto_update_available(struct mpfs_auto_update_priv *priv)
return -EIO;
/*
* Bit 5 of byte 1 is "UL_Auto Update" & if it is set, Auto Update is
* Bit 5 of byte 1 is "UL_IAP" & if it is set, Auto Update is
* not possible.
*/
if (response_msg[1] & AUTO_UPDATE_FEATURE_ENABLED)
if ((((u8 *)response_msg)[1] & AUTO_UPDATE_FEATURE_ENABLED))
return -EPERM;
return 0;