]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
qca_spi: Fix clock speed for multiple QCA7000
authorStefan Wahren <wahrenst@gmx.net>
Fri, 6 Dec 2024 18:46:42 +0000 (19:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Dec 2024 17:07:21 +0000 (18:07 +0100)
commit4f488db386c262c7829075f25de54b9542e538e8
tree987ff95db665de57f2001d0ad6c7ed7c01a78077
parentd45e3e1a77fdf1a889d8a6c962aac2dc9f84eb34
qca_spi: Fix clock speed for multiple QCA7000

[ Upstream commit 4dba406fac06b009873fe7a28231b9b7e4288b09 ]

Storing the maximum clock speed in module parameter qcaspi_clkspeed
has the unintended side effect that the first probed instance
defines the value for all other instances. Fix this issue by storing
it in max_speed_hz of the relevant SPI device.

This fix keeps the priority of the speed parameter (module parameter,
device tree property, driver default). Btw this uses the opportunity
to get the rid of the unused member clkspeed.

Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://patch.msgid.link/20241206184643.123399-2-wahrenst@gmx.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qualcomm/qca_spi.c
drivers/net/ethernet/qualcomm/qca_spi.h