]> www.infradead.org Git - users/dwmw2/linux.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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Dec 2024 02:26:48 +0000 (18:26 -0800)
commit4dba406fac06b009873fe7a28231b9b7e4288b09
tree3debc61940c1ace1fec7c8c2043472ffe893c243
parent356983f569c1f5991661fc0050aa263792f50616
qca_spi: Fix clock speed for multiple QCA7000

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>
drivers/net/ethernet/qualcomm/qca_spi.c
drivers/net/ethernet/qualcomm/qca_spi.h