1. 09 Mar, 2021 2 commits
    • Adrian Hunter's avatar
      mmc: core: Fix partition switch time for eMMC · 66fbaccc
      Adrian Hunter authored
      Avoid the following warning by always defining partition switch time:
      
       [    3.209874] mmc1: unspecified timeout for CMD6 - use generic
       [    3.222780] ------------[ cut here ]------------
       [    3.233363] WARNING: CPU: 1 PID: 111 at drivers/mmc/core/mmc_ops.c:575 __mmc_switch+0x200/0x204
      Reported-by: default avatarPaul Fertser <fercerpav@gmail.com>
      Fixes: 1c447116 ("mmc: mmc: Fix partition switch timeout for some eMMCs")
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Link: https://lore.kernel.org/r/168bbfd6-0c5b-5ace-ab41-402e7937c46e@intel.com
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      66fbaccc
    • Yann Gautier's avatar
      mmc: mmci: Add MMC_CAP_NEED_RSP_BUSY for the stm32 variants · 774514bf
      Yann Gautier authored
      An issue has been observed on STM32MP157C-EV1 board, with an erase command
      with secure erase argument, ending up waiting for ~4 hours before timeout.
      
      The requested busy timeout from the mmc core ends up with 14784000ms (~4
      hours), but the supported host->max_busy_timeout is 86767ms, which leads to
      that the core switch to use an R1 response in favor of the R1B and polls
      for busy with the host->card_busy() ops. In this case the polling doesn't
      work as expected, as we never detects that the card stops signaling busy,
      which leads to the following message:
      
       mmc1: Card stuck being busy! __mmc_poll_for_busy
      
      The problem boils done to that the stm32 variants can't use R1 responses in
      favor of R1B responses, as it leads to an internal state machine in the
      controller to get stuck. To continue to process requests, it would need to
      be reset.
      
      To fix this problem, let's set MMC_CAP_NEED_RSP_BUSY for the stm32 variant,
      which prevent the mmc core from switching to R1 responses. Additionally,
      let's cap the cmd->busy_timeout to the host->max_busy_timeout, thus rely on
      86767ms to be sufficient (~66 seconds was need for this test case).
      
      Fixes: 94fe2580 ("mmc: core: Enable erase/discard/trim support for all mmc hosts")
      Signed-off-by: default avatarYann Gautier <yann.gautier@foss.st.com>
      Link: https://lore.kernel.org/r/20210225145454.12780-1-yann.gautier@foss.st.com
      Cc: stable@vger.kernel.org
      [Ulf: Simplified the code and extended the commit message]
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      774514bf
  2. 06 Mar, 2021 4 commits
  3. 05 Mar, 2021 33 commits
  4. 04 Mar, 2021 1 commit
    • Jens Axboe's avatar
      kernel: provide create_io_thread() helper · cc440e87
      Jens Axboe authored
      Provide a generic helper for setting up an io_uring worker. Returns a
      task_struct so that the caller can do whatever setup is needed, then call
      wake_up_new_task() to kick it into gear.
      
      Add a kernel_clone_args member, io_thread, which tells copy_process() to
      mark the task with PF_IO_WORKER.
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      cc440e87