1. 17 8月, 2015 9 次提交
  2. 24 7月, 2015 12 次提交
  3. 18 7月, 2015 1 次提交
  4. 18 6月, 2015 3 次提交
    • 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
    • C
      mmc: mediatek: Add PM support for MMC driver · 4b8a43e9
      Chaotian Jing 提交于
      Add PM support for Mediatek MMC driver
      Save/restore registers when PM
      Signed-off-by: NChaotian Jing <chaotian.jing@mediatek.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      4b8a43e9
    • C
      mmc: mediatek: Add Mediatek MMC driver · 20848903
      Chaotian Jing 提交于
      Add Mediatek MMC driver code
      Support eMMC/SD/SDIO
      Signed-off-by: NChaotian Jing <chaotian.jing@mediatek.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      20848903
  5. 16 6月, 2015 3 次提交
    • 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
    • J
      mmc: sdhci: fix low memory corruption · 62a7f368
      Jiri Slaby 提交于
      When dma mapping (dma_map_sg) fails in sdhci_pre_dma_transfer, -EINVAL
      is returned. There are 3 callers of sdhci_pre_dma_transfer:
      * sdhci_pre_req and sdhci_adma_table_pre: handle negative return
      * sdhci_prepare_data: handles 0 (error) and "else" (good) only
      
      sdhci_prepare_data is therefore broken. When it receives -EINVAL from
      sdhci_pre_dma_transfer, it assumes 1 sg mapping was mapped. Later,
      this non-existent mapping with address 0 is kmap'ped and written to:
      Corrupted low memory at ffff880000001000 (1000 phys) = 22b7d67df2f6d1cf
      Corrupted low memory at ffff880000001008 (1008 phys) = 63848a5216b7dd95
      Corrupted low memory at ffff880000001010 (1010 phys) = 330eb7ddef39e427
      Corrupted low memory at ffff880000001018 (1018 phys) = 8017ac7295039bda
      Corrupted low memory at ffff880000001020 (1020 phys) = 8ce039eac119074f
      ...
      
      So teach sdhci_prepare_data to understand negative return values from
      sdhci_pre_dma_transfer and disable DMA in that case, as well as for
      zero.
      
      It was introduced in 348487cb (mmc:
      sdhci: use pipeline mmc requests to improve performance). The commit
      seems to be suspicious also by assigning host->sg_count both in
      sdhci_pre_dma_transfer and sdhci_adma_table_pre.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: stable@vger.kernel.org # 4.0+
      Fixes: 348487cb
      Cc: Ulf Hansson <ulf.hansson@linaro.org>
      Cc: Haibo Chen <haibo.chen@freescale.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      62a7f368
    • V
      mmc: sdhci-pci: Change AMD SDHCI quirk application scope · b5e97d6e
      Vincent Wan 提交于
      Change this quirk to apply to AMD Carrizo platform.
      Signed-off-by: NWan ZongShun <Vincent.Wan@amd.com>
      Tested-by: NNath, Arindam <Arindam.Nath@amd.com>
      Tested-by: NRamesh, Ramya <Ramya.Ramesh@amd.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      b5e97d6e
  6. 15 6月, 2015 1 次提交
  7. 12 6月, 2015 1 次提交
  8. 08 6月, 2015 1 次提交
    • U
      mmc: sdhci: Restore behavior while creating OCR mask · 5fd26c7e
      Ulf Hansson 提交于
      Commit 3a48edc4 ("mmc: sdhci: Use mmc core regulator infrastucture")
      changed the behavior for how to assign the ocr_avail mask for the mmc
      host. More precisely it started to mask the bits instead of assigning
      them.
      
      Restore the behavior, but also make it clear that an OCR mask created
      from an external regulator overrides the other ones. The OCR mask is
      determined by one of the following with this priority:
      
      1. Supported ranges of external regulator if one supplies VDD
      2. Host OCR mask if set by the driver (based on DT properties)
      3. The capabilities reported by the controller itself
      
      Fixes: 3a48edc4 ("mmc: sdhci: Use mmc core regulator infrastucture")
      Cc: Tim Kryger <tim.kryger@gmail.com>
      Reported-by: NYangbo Lu <yangbo.lu@freescale.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NTim Kryger <tim.kryger@gmail.com>
      5fd26c7e
  9. 04 6月, 2015 4 次提交
  10. 01 6月, 2015 5 次提交