Skip to content

Prevent races when doing read-modify-write of INTMASK

Doug Anderson linux-arm-kernel linux-mmc linux-omap lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesNew
  2. v12 patches 12 repliesSuperseded

Changes in v3 from the cover letter

- Add fixup to pandora_wl1251_init_card().

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mmc: core: Support the optional init_card() callback for MMC and SDarch/arm/mach-omap2/board-omap3pandora.c drivers/mmc/core/mmc.c drivers/mmc/core/sd.c+20 -70 replies
2/3mmc: dw_mmc: Cleanup disable of low power mode w/ SDIO interruptsdrivers/mmc/host/dw_mmc.c drivers/mmc/host/dw_mmc.h+36 -330 replies
3/3mmc: dw_mmc: Protect read-modify-write of INTMASK with a lockdrivers/mmc/host/dw_mmc.c include/linux/mmc/dw_mmc.h+19 -00 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchGrant GrundlerJames Hogan
1/3R-b
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] Prevent races when doing read-modify-write of INTMASK

Bing Zhao at Marvell discovered a race in the way that dw_mmc was doing a read-modify-write of the INTMASK register. This 2-patch series attempts to fix the problem using a simple spinlock. In order to do so cleanly, we include a patch to tidy up the way that we disable low power mode when using SDIO interrupts.

This patch series was not tested on ToT Linux other than basic compiling and booting, since we don't have the whole Marvell SDIO stack up and running in mainline yet. This series is based on mmc-next (e76b855 mmc: sdhci-esdhc-imx: set actual_clock in clock setting) merged atop mainlinx Linux.

Changes in v3:
- Add fixup to pandora_wl1251_init_card().

Changes in v2:
- Core patch new for this version.
- Fixed "|" to "&".
- intmask_lock renamed to irq_lock

Doug Anderson (3):
mmc: core: Support the optional init_card() callback for MMC and SD
mmc: dw_mmc: Cleanup disable of low power mode w/ SDIO interrupts
mmc: dw_mmc: Protect read-modify-write of INTMASK with a lock

 arch/arm/mach-omap2/board-omap3pandora.c | 14 +++---
 drivers/mmc/core/mmc.c                   |  6 +++
 drivers/mmc/core/sd.c                    |  7 ++-
 drivers/mmc/host/dw_mmc.c                | 79 +++++++++++++++++++-------------
 drivers/mmc/host/dw_mmc.h                |  1 +
 include/linux/mmc/dw_mmc.h               |  6 +++
 6 files changed, 74 insertions(+), 39 deletions(-)
Signature · 1 line
1.8.4