1. 06 Mar, 2024 2 commits
    • Ulf Hansson's avatar
      mmc: Merge branch fixes into next · 32e8ee2d
      Ulf Hansson authored
      Merge the mmc fixes for v6.8-rc[n] into the next branch, to allow them to
      get tested together with the new mmc changes that are targeted for v6.9.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      32e8ee2d
    • Dominique Martinet's avatar
      mmc: core: Fix switch on gp3 partition · 4af59a8d
      Dominique Martinet authored
      Commit e7794c14 ("mmc: rpmb: fixes pause retune on all RPMB
      partitions.") added a mask check for 'part_type', but the mask used was
      wrong leading to the code intended for rpmb also being executed for GP3.
      
      On some MMCs (but not all) this would make gp3 partition inaccessible:
      armadillo:~# head -c 1 < /dev/mmcblk2gp3
      head: standard input: I/O error
      armadillo:~# dmesg -c
      [  422.976583] mmc2: running CQE recovery
      [  423.058182] mmc2: running CQE recovery
      [  423.137607] mmc2: running CQE recovery
      [  423.137802] blk_update_request: I/O error, dev mmcblk2gp3, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0
      [  423.237125] mmc2: running CQE recovery
      [  423.318206] mmc2: running CQE recovery
      [  423.397680] mmc2: running CQE recovery
      [  423.397837] blk_update_request: I/O error, dev mmcblk2gp3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
      [  423.408287] Buffer I/O error on dev mmcblk2gp3, logical block 0, async page read
      
      the part_type values of interest here are defined as follow:
      main  0
      boot0 1
      boot1 2
      rpmb  3
      gp0   4
      gp1   5
      gp2   6
      gp3   7
      
      so mask with EXT_CSD_PART_CONFIG_ACC_MASK (7) to correctly identify rpmb
      
      Fixes: e7794c14 ("mmc: rpmb: fixes pause retune on all RPMB partitions.")
      Cc: stable@vger.kernel.org
      Cc: Jorge Ramirez-Ortiz <jorge@foundries.io>
      Signed-off-by: default avatarDominique Martinet <dominique.martinet@atmark-techno.com>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Link: https://lore.kernel.org/r/20240306-mmc-partswitch-v1-1-bf116985d950@codewreck.orgSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      4af59a8d
  2. 05 Mar, 2024 11 commits
  3. 28 Feb, 2024 8 commits
  4. 27 Feb, 2024 5 commits
  5. 15 Feb, 2024 2 commits
  6. 14 Feb, 2024 2 commits
    • Ulf Hansson's avatar
      mmc: Merge branch fixes into next · 0deb3c2a
      Ulf Hansson authored
      Merge the mmc fixes for v6.8-rc[n] into the next branch, to allow them to
      get tested together with the new mmc changes that are targeted for v6.9.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      0deb3c2a
    • Christophe Kerello's avatar
      mmc: mmci: stm32: fix DMA API overlapping mappings warning · 6b1ba3f9
      Christophe Kerello authored
      Turning on CONFIG_DMA_API_DEBUG_SG results in the following warning:
      
      DMA-API: mmci-pl18x 48220000.mmc: cacheline tracking EEXIST,
      overlapping mappings aren't supported
      WARNING: CPU: 1 PID: 51 at kernel/dma/debug.c:568
      add_dma_entry+0x234/0x2f4
      Modules linked in:
      CPU: 1 PID: 51 Comm: kworker/1:2 Not tainted 6.1.28 #1
      Hardware name: STMicroelectronics STM32MP257F-EV1 Evaluation Board (DT)
      Workqueue: events_freezable mmc_rescan
      Call trace:
      add_dma_entry+0x234/0x2f4
      debug_dma_map_sg+0x198/0x350
      __dma_map_sg_attrs+0xa0/0x110
      dma_map_sg_attrs+0x10/0x2c
      sdmmc_idma_prep_data+0x80/0xc0
      mmci_prep_data+0x38/0x84
      mmci_start_data+0x108/0x2dc
      mmci_request+0xe4/0x190
      __mmc_start_request+0x68/0x140
      mmc_start_request+0x94/0xc0
      mmc_wait_for_req+0x70/0x100
      mmc_send_tuning+0x108/0x1ac
      sdmmc_execute_tuning+0x14c/0x210
      mmc_execute_tuning+0x48/0xec
      mmc_sd_init_uhs_card.part.0+0x208/0x464
      mmc_sd_init_card+0x318/0x89c
      mmc_attach_sd+0xe4/0x180
      mmc_rescan+0x244/0x320
      
      DMA API debug brings to light leaking dma-mappings as dma_map_sg and
      dma_unmap_sg are not correctly balanced.
      
      If an error occurs in mmci_cmd_irq function, only mmci_dma_error
      function is called and as this API is not managed on stm32 variant,
      dma_unmap_sg is never called in this error path.
      Signed-off-by: default avatarChristophe Kerello <christophe.kerello@foss.st.com>
      Fixes: 46b723dd ("mmc: mmci: add stm32 sdmmc variant")
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20240207143951.938144-1-christophe.kerello@foss.st.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      6b1ba3f9
  7. 13 Feb, 2024 10 commits