1. 08 5月, 2020 1 次提交
  2. 26 3月, 2020 1 次提交
    • U
      mmc: core: Re-work the code for eMMC sanitize · 55c2b8b9
      Ulf Hansson 提交于
      The error path for sanitize operations that completes with -ETIMEDOUT, is
      tightly coupled with the internal request handling code of the core. More
      precisely, mmc_wait_for_req_done() checks for specific sanitize errors.
      This is not only inefficient as it affects all types of requests, but also
      hackish.
      
      Therefore, let's improve the behaviour by moving the error path out of the
      mmc core. To do that, retuning needs to be held while running the sanitize
      operation.
      
      Moreover, to avoid exporting unnecessary symbols to the mmc block module,
      let's move the code into the mmc_ops.c file. While updating the actual
      code, let's also take the opportunity to clean up some of the mess around
      it.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Link: https://lore.kernel.org/r/20200316152152.15122-1-ulf.hansson@linaro.org
      55c2b8b9
  3. 24 3月, 2020 2 次提交
  4. 24 1月, 2020 1 次提交
  5. 13 11月, 2019 2 次提交
  6. 28 2月, 2019 1 次提交
  7. 25 2月, 2019 2 次提交
  8. 08 2月, 2019 1 次提交
    • Z
      mmc: block: handle complete_work on separate workqueue · dcf6e2e3
      Zachary Hays 提交于
      The kblockd workqueue is created with the WQ_MEM_RECLAIM flag set.
      This generates a rescuer thread for that queue that will trigger when
      the CPU is under heavy load and collect the uncompleted work.
      
      In the case of mmc, this creates the possibility of a deadlock when
      there are multiple partitions on the device as other blk-mq work is
      also run on the same queue. For example:
      
      - worker 0 claims the mmc host to work on partition 1
      - worker 1 attempts to claim the host for partition 2 but has to wait
        for worker 0 to finish
      - worker 0 schedules complete_work to release the host
      - rescuer thread is triggered after time-out and collects the dangling
        work
      - rescuer thread attempts to complete the work in order starting with
        claim host
      - the task to release host is now blocked by a task to claim it and
        will never be called
      
      The above results in multiple hung tasks that lead to failures to
      mount partitions.
      
      Handling complete_work on a separate workqueue avoids this by keeping
      the work completion tasks separate from the other blk-mq work. This
      allows the host to be released without getting blocked by other tasks
      attempting to claim the host.
      Signed-off-by: NZachary Hays <zhays@lexmark.com>
      Fixes: 81196976 ("mmc: block: Add blk-mq support")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      dcf6e2e3
  9. 17 12月, 2018 1 次提交
    • U
      mmc: core: Cleanup BKOPS support · 0c204979
      Ulf Hansson 提交于
      It's been ~6 years ago since we introduced the BKOPS support for eMMC
      cards. The current code is a bit messy and primarily that's because it
      prepares to support running BKOPS in an asynchronous mode. However, that
      mode has never been fully implemented/enabled. Instead BKOPS is always
      executed in synchronously, when the card has reported an urgent BKOPS
      level.
      
      For these reasons, let's make the code more readable by dropping the unused
      parts. Let's also rename mmc_start_bkops() to mmc_run_bkops(), as to make
      it more descriptive.
      
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      0c204979
  10. 04 12月, 2018 1 次提交
  11. 17 11月, 2018 1 次提交
  12. 16 11月, 2018 2 次提交
  13. 09 10月, 2018 1 次提交
  14. 28 9月, 2018 1 次提交
  15. 21 5月, 2018 2 次提交
  16. 14 5月, 2018 1 次提交
  17. 02 5月, 2018 1 次提交
  18. 04 4月, 2018 1 次提交
  19. 23 3月, 2018 1 次提交
    • S
      mmc: block: Delete gendisk before cleaning up the request queue · 57678e5a
      Shawn Lin 提交于
      dd if=/dev/urandom of=/dev/mmcblk1 bs=4k count=10000
      with a SD card hotplug during transfer reports a warning below
      introduced by commit a063057d ("block: Fix a race between
      request queue removal and the block cgroup controller"). So we
      should now remove the disk, partition and bdi sysfs attributes
      before cleaning up the request queue associated with the disk.
      
      [  410.331226] mmc1: card 59b4 removed
      [  410.348583] WARNING: CPU: 0 PID: 5 at block/blk-core.c:785
      blk_cleanup_queue+0x138/0x140
      [  410.349294] Modules linked in:
      [  410.349570] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted
      4.16.0-rc6-next-20180321-00004-gc2ad6a7 #263
      [  410.350363] Hardware name: Excavator-RK3399 Board (DT)
      [  410.350819] Workqueue: events_freezable mmc_rescan
      [  410.351242] pstate: 60000005 (nZCv daif -PAN -UAO)
      [  410.351663] pc : blk_cleanup_queue+0x138/0x140
      [  410.352054] lr : blk_cleanup_queue+0xac/0x140
      [  410.352436] sp : ffff0000092cbb90
      [  410.352727] x29: ffff0000092cbb90 x28: 0000000000000000
      [  410.353195] x27: ffff8000f6f23030 x26: ffff00000904e610
      [  410.353662] x25: ffff8000f17cc808 x24: ffff8000f1038200
      [  410.354128] x23: 0000000000000060 x22: 0000000000000000
      [  410.354595] x21: ffff8000f11748d8 x20: ffff8000f1038200
      [  410.355061] x19: ffff8000f1174200 x18: 0000ffff936347d8
      [  410.355528] x17: 0000ffff935b93c0 x16: ffff0000081263f8
      [  410.355994] x15: 0000000000000000 x14: 0000000000000400
      [  410.356461] x13: 0000000000000001 x12: 0000000000000001
      [  410.356927] x11: 0000000000000040 x10: ffff8000f2400028
      [  410.357393] x9 : ffff8000f2400040 x8 : 0000000000000000
      [  410.357860] x7 : ffff8000f6f3a340 x6 : ffff8000f6f3a340
      [  410.358326] x5 : ffff8000f2400000 x4 : ffff8000f6f3a340
      [  410.358792] x3 : 0000000000000000 x2 : 39c1333e45670800
      [  410.359259] x1 : 0000000000000000 x0 : 0000000000000003
      [  410.359726] Call trace:
      [  410.359943]  blk_cleanup_queue+0x138/0x140
      [  410.360305]  mmc_cleanup_queue+0x2c/0x48
      [  410.360652]  mmc_blk_remove_req+0x1c/0x98
      [  410.361005]  mmc_blk_remove+0x180/0x1c0
      [  410.361343]  mmc_bus_remove+0x1c/0x28
      [  410.361670]  device_release_driver_internal+0x154/0x1f0
      [  410.362128]  device_release_driver+0x14/0x20
      [  410.362504]  bus_remove_device+0xc8/0x108
      [  410.362858]  device_del+0x120/0x350
      [  410.363167]  mmc_remove_card+0x5c/0xb8
      [  410.363498]  mmc_sd_detect+0x40/0x78
      [  410.363813]  mmc_rescan+0x19c/0x368
      [  410.364123]  process_one_work+0x1ac/0x318
      [  410.364477]  worker_thread+0x50/0x450
      [  410.364801]  kthread+0xf8/0x128
      [  410.365081]  ret_from_fork+0x10/0x18
      [  410.365395] ---[ end trace 268e87a46c28968c ]---
      Reviewed-by: NBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      57678e5a
  20. 15 3月, 2018 3 次提交
  21. 18 12月, 2017 1 次提交
  22. 11 12月, 2017 12 次提交