1. 28 9月, 2019 1 次提交
    • R
      mmc: sdhci: improve ADMA error reporting · d1c536e3
      Russell King 提交于
      ADMA errors are potentially data corrupting events; although we print
      the register state, we do not usefully print the ADMA descriptors.
      Worse than that, we print them by referencing their virtual address
      which is meaningless when the register state gives us the DMA address
      of the failing descriptor.
      
      Print the ADMA descriptors giving their DMA addresses rather than their
      virtual addresses, and print them using SDHCI_DUMP() rather than DBG().
      
      We also do not show the correct value of the interrupt status register;
      the register dump shows the current value, after we have cleared the
      pending interrupts we are going to service.  What is more useful is to
      print the interrupts that _were_ pending at the time the ADMA error was
      encountered.  Fix that too.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      d1c536e3
  2. 11 9月, 2019 9 次提交
  3. 07 8月, 2019 1 次提交
    • B
      mmc: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming · c6303c5d
      Baolin Wang 提交于
      The SD host controller specification defines 3 types software reset:
      software reset for data line, software reset for command line and software
      reset for all. Software reset for all means this reset affects the entire
      Host controller except for the card detection circuit.
      
      In sdhci_runtime_resume_host() we always do a software "reset for all",
      which causes the Spreadtrum variant controller to work abnormally after
      resuming. To fix the problem, let's do a software reset for the data and
      the command part, rather than "for all".
      
      However, as sdhci_runtime_resume() is a common sdhci function and we don't
      want to change the behaviour for other variants, let's introduce a new
      in-parameter for it. This enables the caller to decide if a "reset for all"
      shall be done or not.
      Signed-off-by: NBaolin Wang <baolin.wang@linaro.org>
      Fixes: fb8bd90f ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller")
      Cc: stable@vger.kernel.org
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      c6303c5d
  4. 31 5月, 2019 1 次提交
  5. 29 5月, 2019 1 次提交
  6. 15 4月, 2019 6 次提交
  7. 08 4月, 2019 1 次提交
    • W
      drivers: Remove explicit invocations of mmiowb() · fb24ea52
      Will Deacon 提交于
      mmiowb() is now implied by spin_unlock() on architectures that require
      it, so there is no reason to call it from driver code. This patch was
      generated using coccinelle:
      
      	@mmiowb@
      	@@
      	- mmiowb();
      
      and invoked as:
      
      $ for d in drivers include/linux/qed sound; do \
      spatch --include-headers --sp-file mmiowb.cocci --dir $d --in-place; done
      
      NOTE: mmiowb() has only ever guaranteed ordering in conjunction with
      spin_unlock(). However, pairing each mmiowb() removal in this patch with
      the corresponding call to spin_unlock() is not at all trivial, so there
      is a small chance that this change may regress any drivers incorrectly
      relying on mmiowb() to order MMIO writes between CPUs using lock-free
      synchronisation. If you've ended up bisecting to this commit, you can
      reintroduce the mmiowb() calls using wmb() instead, which should restore
      the old behaviour on all architectures other than some esoteric ia64
      systems.
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      fb24ea52
  8. 25 2月, 2019 4 次提交
  9. 08 1月, 2019 1 次提交
  10. 17 12月, 2018 6 次提交
  11. 06 12月, 2018 1 次提交
    • A
      mmc: sdhci: fix the timeout check window for clock and reset · b704441e
      Alek Du 提交于
      We observed some premature timeouts on a virtualization platform, the log
      is like this:
      
      case 1:
      [159525.255629] mmc1: Internal clock never stabilised.
      [159525.255818] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
      [159525.256049] mmc1: sdhci: Sys addr:  0x00000000 | Version:  0x00001002
      ...
      [159525.257205] mmc1: sdhci: Wake-up:   0x00000000 | Clock:    0x0000fa03
      From the clock control register dump, we are pretty sure the clock was
      stablized.
      
      case 2:
      [  914.550127] mmc1: Reset 0x2 never completed.
      [  914.550321] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
      [  914.550608] mmc1: sdhci: Sys addr:  0x00000010 | Version:  0x00001002
      
      After checking the sdhci code, we found the timeout check actually has a
      little window that the CPU can be scheduled out and when it comes back,
      the original time set or check is not valid.
      
      Fixes: 5a436cc0 ("mmc: sdhci: Optimize delay loops")
      Cc: stable@vger.kernel.org      # v4.12+
      Signed-off-by: NAlek Du <alek.du@intel.com>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      b704441e
  12. 08 10月, 2018 8 次提交