1. 21 10月, 2015 1 次提交
  2. 27 8月, 2015 1 次提交
  3. 17 8月, 2015 3 次提交
  4. 24 7月, 2015 1 次提交
  5. 17 7月, 2015 1 次提交
  6. 18 6月, 2015 1 次提交
    • R
      mmc: queue: prevent soft lockups on PREEMPT=n · a8c27c0b
      Rabin Vincent 提交于
      On systems with CONFIG_PREEMPT=n, under certain circumstances, mmcqd
      can continuously process requests for several seconds without blocking,
      triggering the soft lockup watchdog.  For example, this can happen if
      mmcqd runs on the CPU which services the controller's interrupt, and
      a process on a different CPU continuously writes to the MMC block
      device.
      
       NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [mmcqd/0:664]
       CPU: 0 PID: 664 Comm: mmcqd/0 Not tainted 4.1.0-rc7+ #4
       PC is at _raw_spin_unlock_irqrestore+0x24/0x28
       LR is at mmc_start_request+0x104/0x134
       ...
       [<805112a8>] (_raw_spin_unlock_irqrestore) from [<803db664>] (mmc_start_request+0x104/0x134)
       [<803db664>] (mmc_start_request) from [<803dc008>] (mmc_start_req+0x274/0x394)
       [<803dc008>] (mmc_start_req) from [<803eb2c4>] (mmc_blk_issue_rw_rq+0xd0/0xb98)
       [<803eb2c4>] (mmc_blk_issue_rw_rq) from [<803ebe8c>] (mmc_blk_issue_rq+0x100/0x470)
       [<803ebe8c>] (mmc_blk_issue_rq) from [<803ecab8>] (mmc_queue_thread+0xd0/0x170)
       [<803ecab8>] (mmc_queue_thread) from [<8003fd14>] (kthread+0xe0/0xfc)
       [<8003fd14>] (kthread) from [<8000f768>] (ret_from_fork+0x14/0x2c)
      
      Fix it by adding a cond_resched() in the request handling loop so that
      other processes get a chance to run.
      Signed-off-by: NRabin Vincent <rabin.vincent@axis.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      a8c27c0b
  7. 16 6月, 2015 1 次提交
    • D
      mmc: card: Fixup request missing in mmc_blk_issue_rw_rq · 29535f7b
      Ding Wang 提交于
      The current handler of MMC_BLK_CMD_ERR in mmc_blk_issue_rw_rq function
      may cause new coming request permanent missing when the ongoing
      request (previoulsy started) complete end.
      
      The problem scenario is as follows:
      (1) Request A is ongoing;
      (2) Request B arrived, and finally mmc_blk_issue_rw_rq() is called;
      (3) Request A encounters the MMC_BLK_CMD_ERR error;
      (4) In the error handling of MMC_BLK_CMD_ERR, suppose mmc_blk_cmd_err()
          end request A completed and return zero. Continue the error handling,
          suppose mmc_blk_reset() reset device success;
      (5) Continue the execution, while loop completed because variable ret
          is zero now;
      (6) Finally, mmc_blk_issue_rw_rq() return without processing request B.
      
      The process related to the missing request may wait that IO request
      complete forever, possibly crashing the application or hanging the system.
      
      Fix this issue by starting new request when reset success.
      Signed-off-by: NDing Wang <justin.wang@spreadtrum.com>
      Fixes: 67716327 ("mmc: block: add eMMC hardware reset support")
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      29535f7b
  8. 15 6月, 2015 1 次提交
  9. 01 6月, 2015 5 次提交
  10. 06 5月, 2015 1 次提交
    • C
      mmc: card: Don't access RPMB partitions for normal read/write · 4e93b9a6
      Chuanxiao Dong 提交于
      During kernel boot, it will try to read some logical sectors
      of each block device node for the possible partition table.
      
      But since RPMB partition is special and can not be accessed
      by normal eMMC read / write CMDs, it will cause below error
      messages during kernel boot:
      ...
       mmc0: Got data interrupt 0x00000002 even though no data operation was in progress.
       mmcblk0rpmb: error -110 transferring data, sector 0, nr 32, cmd response 0x900, card status 0xb00
       mmcblk0rpmb: retrying using single block read
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       end_request: I/O error, dev mmcblk0rpmb, sector 0
       Buffer I/O error on device mmcblk0rpmb, logical block 0
       end_request: I/O error, dev mmcblk0rpmb, sector 8
       Buffer I/O error on device mmcblk0rpmb, logical block 1
       end_request: I/O error, dev mmcblk0rpmb, sector 16
       Buffer I/O error on device mmcblk0rpmb, logical block 2
       end_request: I/O error, dev mmcblk0rpmb, sector 24
       Buffer I/O error on device mmcblk0rpmb, logical block 3
      ...
      
      This patch will discard the access request in eMMC queue if
      it is RPMB partition access request. By this way, it avoids
      trigger above error messages.
      
      Fixes: 090d25fe ("mmc: core: Expose access to RPMB partition")
      Signed-off-by: NYunpeng Gao <yunpeng.gao@intel.com>
      Signed-off-by: NChuanxiao Dong <chuanxiao.dong@intel.com>
      Tested-by: NMichael Shigorin <mike@altlinux.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      4e93b9a6
  11. 17 4月, 2015 1 次提交
    • U
      Revert "mmc: core: Convert mmc_driver to device_driver" · 96541bac
      Ulf Hansson 提交于
      This reverts commit 6685ac62 ("mmc: core: Convert mmc_driver to
      device_driver")
      
      The reverted commit went too far in simplifing the device driver parts
      for mmc.
      
      Let's restore the old mmc_driver to enable driver core to sooner
      or later to remove the ->probe(), ->remove() and ->shutdown() callbacks
      from the struct device_driver.
      
      Note that, the old ->suspend|resume() callbacks in the struct
      mmc_driver don't need to be restored, since the mmc block layer has
      converted to the modern system PM ops.
      
      Fixes: 6685ac62 ("mmc: core: Convert mmc_driver to device_driver")
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Acked-by: NJaehoon Chung <jh80.chung@samsung.com>
      96541bac
  12. 11 4月, 2015 1 次提交
    • J
      sd, mmc, virtio_blk, string_helpers: fix block size units · b9f28d86
      James Bottomley 提交于
      The current string_get_size() overflows when the device size goes over
      2^64 bytes because the string helper routine computes the suffix from
      the size in bytes.  However, the entirety of Linux thinks in terms of
      blocks, not bytes, so this will artificially induce an overflow on very
      large devices.  Fix this by making the function string_get_size() take
      blocks and the block size instead of bytes.  This should allow us to
      keep working until the current SCSI standard overflows.
      
      Also fix virtio_blk and mmc (both of which were also artificially
      multiplying by the block size to pass a byte side to string_get_size()).
      
      The mathematics of this is pretty simple:  we're taking a product of
      size in blocks (S) and block size (B) and trying to re-express this in
      exponential form: S*B = R*N^E (where N, the exponent is either 1000 or
      1024) and R < N.  Mathematically, S = RS*N^ES and B=RB*N^EB, so if RS*RB
      < N it's easy to see that S*B = RS*RB*N^(ES+EB).  However, if RS*BS > N,
      we can see that this can be re-expressed as RS*BS = R*N (where R =
      RS*BS/N < N) so the whole exponent becomes R*N^(ES+EB+1)
      
      [jejb: fix incorrect 32 bit do_div spotted by kbuild test robot <fengguang.wu@intel.com>]
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      b9f28d86
  13. 28 1月, 2015 1 次提交
  14. 21 1月, 2015 1 次提交
  15. 19 1月, 2015 1 次提交
  16. 05 12月, 2014 1 次提交
  17. 26 11月, 2014 1 次提交
    • B
      mmc: block: Increase max_devices · a26eba61
      Ben Hutchings 提交于
      Currently the driver imposes a limit of 256 total minor numbers,
      apparently based on the historic Unix/Linux limit.  This is quite
      restrictive, particularly if we raise the maximum number of
      partitions per card to 256 to match sd.
      
      In order to make the full minor number space available we would
      have to replace the static dev_use and name_use arrays with struct
      ida.  But we can at least allow use of 256 cards rather than just
      256 minors, with only a small change.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      a26eba61
  18. 10 11月, 2014 6 次提交
  19. 05 10月, 2014 1 次提交
    • M
      block: disable entropy contributions for nonrot devices · b277da0a
      Mike Snitzer 提交于
      Clear QUEUE_FLAG_ADD_RANDOM in all block drivers that set
      QUEUE_FLAG_NONROT.
      
      Historically, all block devices have automatically made entropy
      contributions.  But as previously stated in commit e2e1a148 ("block: add
      sysfs knob for turning off disk entropy contributions"):
          - On SSD disks, the completion times aren't as random as they
            are for rotational drives. So it's questionable whether they
            should contribute to the random pool in the first place.
          - Calling add_disk_randomness() has a lot of overhead.
      
      There are more reliable sources for randomness than non-rotational block
      devices.  From a security perspective it is better to err on the side of
      caution than to allow entropy contributions from unreliable "random"
      sources.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      b277da0a
  20. 24 9月, 2014 1 次提交
  21. 19 9月, 2014 1 次提交
  22. 09 9月, 2014 3 次提交
  23. 26 7月, 2014 1 次提交
  24. 23 2月, 2014 4 次提交