spi: fix controller deregistration (part 2/2)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest26 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/26 | spi: mt65xx: fix controller deregistrationdrivers/ | +3 | 0 replies | |
| 2/26 | spi: mtk-nor: fix controller deregistrationdrivers/ | +3 | 0 replies | |
| 3/26 | spi: mxs: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 4/26 | spi: npcm-pspi: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 5/26 | spi: omap2-mcspi: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 6/26 | spi: pic32: fix controller deregistrationdrivers/ | +8 | 0 replies | |
| 7/26 | spi: pic32-sqi: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 8/26 | spi: pl022: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 9/26 | spi: qup: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 10/26 | spi: rspi: fix controller deregistrationdrivers/ | +8 | 0 replies | |
| 11/26 | spi: s3c64xx: fix controller deregistrationdrivers/ | +3 | 0 replies | |
| 12/26 | spi: sh-hspi: fix controller deregistrationdrivers/ | +8 | 0 replies | |
| 13/26 | spi: sh-msiof: fix controller deregistrationdrivers/ | +8 | 0 replies | |
| 14/26 | spi: sifive: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 15/26 | spi: slave-mt27xx: fix controller deregistrationdrivers/ | +9 | 0 replies | |
| 16/26 | spi: sprd: fix controller deregistrationdrivers/ | +6 | 0 replies | |
| 17/26 | spi: st-ssc4: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 18/26 | spi: sun4i: fix controller deregistrationdrivers/ | +9 | 0 replies | |
| 19/26 | spi: sun6i: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 20/26 | spi: syncuacer: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 21/26 | spi: tegra114: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 22/26 | spi: tegra20-sflash: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 23/26 | spi: ti-qspi: fix controller deregistrationdrivers/ | +6 | 0 replies | |
| 24/26 | spi: uniphier: fix controller deregistrationdrivers/ | +7 | 0 replies | |
| 25/26 | spi: zynqmp-gqspi: fix controller deregistrationdrivers/ | +3 | 0 replies | |
| 26/26 | spi: zynq-qspi: fix controller deregistrationdrivers/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/26] spi: fix controller deregistration (part 2/2)
Device managed registration generally only works if all involved resources are managed as otherwise resources may be disabled or freed while they are still in use.
This series fixes the SPI controller drivers that get this wrong by disabling resources such as clocks, DMA and interrupts while the controller (and its devices) are still registered, which can lead to issues like system errors due to unclocked accesses, NULL-pointer dereferences, hangs or just prevent SPI device drivers from doing I/O during during deregistration (e.g. to power down devices).
I decided to split these fixes in two parts consisting of 20 and 26 patches respectively in order not to spam the lists too much.
I've also prepared a follow-on series to convert the drivers here that do not yet use device managed controller allocation (which avoids taking extra references during deregistration).
After that it should be possible to change the SPI API so that it no longer drops a reference during deregistration without too much effort (cf. [1]).
Note that this series is based on spi/for-next which specifically has commit 1f8fd9490e31 ("spi: zynq-qspi: Simplify clock handling with devm_clk_get_enabled()") (which is not in the for-7.1 branch).
Johan
[1]
https://lore.kernel.org/lkml/[email protected]/
Johan Hovold (26):
spi: mt65xx: fix controller deregistration
spi: mtk-nor: fix controller deregistration
spi: mxs: fix controller deregistration
spi: npcm-pspi: fix controller deregistration
spi: omap2-mcspi: fix controller deregistration
spi: pic32: fix controller deregistration
spi: pic32-sqi: fix controller deregistration
spi: pl022: fix controller deregistration
spi: qup: fix controller deregistration
spi: rspi: fix controller deregistration
spi: s3c64xx: fix controller deregistration
spi: sh-hspi: fix controller deregistration
spi: sh-msiof: fix controller deregistration
spi: sifive: fix controller deregistration
spi: slave-mt27xx: fix controller deregistration
spi: sprd: fix controller deregistration
spi: st-ssc4: fix controller deregistration
spi: sun4i: fix controller deregistration
spi: sun6i: fix controller deregistration
spi: syncuacer: fix controller deregistration
spi: tegra114: fix controller deregistration
spi: tegra20-sflash: fix controller deregistration
spi: ti-qspi: fix controller deregistration
spi: uniphier: fix controller deregistration
spi: zynqmp-gqspi: fix controller deregistration
spi: zynq-qspi: fix controller deregistration
drivers/spi/spi-mt65xx.c | 4 +++- drivers/spi/spi-mtk-nor.c | 4 +++- drivers/spi/spi-mxs.c | 8 +++++++- drivers/spi/spi-npcm-pspi.c | 8 +++++++- drivers/spi/spi-omap2-mcspi.c | 8 +++++++- drivers/spi/spi-pic32-sqi.c | 8 +++++++- drivers/spi/spi-pic32.c | 11 ++++++++--- drivers/spi/spi-pl022.c | 8 +++++++- drivers/spi/spi-qup.c | 8 +++++++- drivers/spi/spi-rspi.c | 10 ++++++++-- drivers/spi/spi-s3c64xx.c | 4 +++- drivers/spi/spi-sh-hspi.c | 10 ++++++++-- drivers/spi/spi-sh-msiof.c | 10 ++++++++-- drivers/spi/spi-sifive.c | 8 +++++++- drivers/spi/spi-slave-mt27xx.c | 10 +++++++++- drivers/spi/spi-sprd.c | 8 ++++++-- drivers/spi/spi-st-ssc4.c | 8 +++++++- drivers/spi/spi-sun4i.c | 10 +++++++++- drivers/spi/spi-sun6i.c | 8 +++++++- drivers/spi/spi-synquacer.c | 8 +++++++- drivers/spi/spi-tegra114.c | 8 +++++++- drivers/spi/spi-tegra20-sflash.c | 8 +++++++- drivers/spi/spi-ti-qspi.c | 14 ++++++-------- drivers/spi/spi-uniphier.c | 8 +++++++- drivers/spi/spi-zynq-qspi.c | 15 +++++++++++---- drivers/spi/spi-zynqmp-gqspi.c | 4 +++- 26 files changed, 176 insertions(+), 42 deletions(-)
Signature · 1 line
2.52.0