public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/20] spi: fix controller deregistration (part 1/2)
@ 2026-04-09 12:03 Johan Hovold
  2026-04-09 12:04 ` [PATCH 01/20] spi: amlogic-spisg: fix controller deregistration Johan Hovold
                   ` (20 more replies)
  0 siblings, 21 replies; 27+ messages in thread
From: Johan Hovold @ 2026-04-09 12:03 UTC (permalink / raw)
  To: Mark Brown
  Cc: Sunny Luo, Xianwei Zhao, Chin-Ting Kuo, Cédric Le Goater,
	Radu Pirea, William Zhang, Kursad Oney, Jonas Gorski, linux-spi,
	linux-kernel, Johan Hovold

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.

Johan


[1] https://lore.kernel.org/lkml/20260325145319.1132072-1-johan@kernel.org/


Johan Hovold (20):
  spi: amlogic-spisg: fix controller deregistration
  spi: aspeed-smc: fix controller deregistration
  spi: at91-usart: fix controller deregistration
  spi: atmel: fix controller deregistration
  spi: bcm63xx: fix controller deregistration
  spi: bcm63xx-hsspi: fix controller deregistration
  spi: bcmbca-hsspi: fix controller deregistration
  spi: octeon: fix controller deregistration
  spi: cavium-thunderx: fix controller deregistration
  spi: coldfire-qspi: fix controller deregistration
  spi: dln2: fix controller deregistration
  spi: ep93xx: fix controller deregistration
  spi: fsl-espi: fix controller deregistration
  spi: fsl: fix controller deregistration
  spi: img-spfi: fix controller deregistration
  spi: lantiq-ssc: fix controller deregistration
  spi: meson-spicc: fix controller deregistration
  spi: microchip-core-qspi: fix controller deregistration
  spi: microchip-core-spi: fix controller deregistration
  spi: mpfs: fix controller deregistration

 drivers/spi/spi-amlogic-spisg.c       |  4 +++-
 drivers/spi/spi-aspeed-smc.c          |  9 ++++++---
 drivers/spi/spi-at91-usart.c          |  8 +++++++-
 drivers/spi/spi-atmel.c               |  8 +++++++-
 drivers/spi/spi-bcm63xx-hsspi.c       |  8 +++++++-
 drivers/spi/spi-bcm63xx.c             |  8 +++++++-
 drivers/spi/spi-bcmbca-hsspi.c        |  4 +++-
 drivers/spi/spi-cavium-octeon.c       |  8 +++++++-
 drivers/spi/spi-cavium-thunderx.c     |  8 +++++++-
 drivers/spi/spi-coldfire-qspi.c       | 10 ++++++++--
 drivers/spi/spi-dln2.c                |  8 +++++++-
 drivers/spi/spi-ep93xx.c              |  8 +++++++-
 drivers/spi/spi-fsl-espi.c            | 10 +++++++++-
 drivers/spi/spi-fsl-spi.c             |  8 +++++++-
 drivers/spi/spi-img-spfi.c            |  8 +++++++-
 drivers/spi/spi-lantiq-ssc.c          |  8 +++++++-
 drivers/spi/spi-meson-spicc.c         |  8 +++++++-
 drivers/spi/spi-microchip-core-qspi.c | 12 ++++++++----
 drivers/spi/spi-microchip-core-spi.c  |  4 +++-
 drivers/spi/spi-mpfs.c                |  4 +++-
 20 files changed, 127 insertions(+), 26 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2026-04-09 22:35 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-09 12:03 [PATCH 00/20] spi: fix controller deregistration (part 1/2) Johan Hovold
2026-04-09 12:04 ` [PATCH 01/20] spi: amlogic-spisg: fix controller deregistration Johan Hovold
2026-04-09 12:04 ` [PATCH 02/20] spi: aspeed-smc: " Johan Hovold
2026-04-09 12:04 ` [PATCH 03/20] spi: at91-usart: " Johan Hovold
2026-04-09 12:04 ` [PATCH 04/20] spi: atmel: " Johan Hovold
2026-04-09 12:04 ` [PATCH 05/20] spi: bcm63xx: " Johan Hovold
2026-04-09 12:04 ` [PATCH 06/20] spi: bcm63xx-hsspi: " Johan Hovold
2026-04-09 12:04 ` [PATCH 07/20] spi: bcmbca-hsspi: " Johan Hovold
2026-04-09 12:04 ` [PATCH 08/20] spi: octeon: " Johan Hovold
2026-04-09 12:04 ` [PATCH 09/20] spi: cavium-thunderx: " Johan Hovold
2026-04-09 12:04 ` [PATCH 10/20] spi: coldfire-qspi: " Johan Hovold
2026-04-09 12:04 ` [PATCH 11/20] spi: dln2: " Johan Hovold
2026-04-09 12:04 ` [PATCH 12/20] spi: ep93xx: " Johan Hovold
2026-04-09 12:04 ` [PATCH 13/20] spi: fsl-espi: " Johan Hovold
2026-04-09 12:04 ` [PATCH 14/20] spi: fsl: " Johan Hovold
2026-04-09 13:11   ` Johan Hovold
2026-04-09 12:04 ` [PATCH 15/20] spi: img-spfi: " Johan Hovold
2026-04-09 12:04 ` [PATCH 16/20] spi: lantiq-ssc: " Johan Hovold
2026-04-09 12:04 ` [PATCH 17/20] spi: meson-spicc: " Johan Hovold
2026-04-09 12:04 ` [PATCH 18/20] spi: microchip-core-qspi: " Johan Hovold
2026-04-09 16:13   ` Conor Dooley
2026-04-09 17:27     ` Mark Brown
2026-04-09 12:04 ` [PATCH 19/20] spi: microchip-core-spi: " Johan Hovold
2026-04-09 16:10   ` Conor Dooley
2026-04-09 12:04 ` [PATCH 20/20] spi: mpfs: " Johan Hovold
2026-04-09 16:13   ` Conor Dooley
2026-04-09 19:09 ` (subset) [PATCH 00/20] spi: fix controller deregistration (part 1/2) Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox