1. 04 Mar, 2012 4 commits
    • Will Deacon's avatar
      mmc: mmci: reduce max_blk_count to avoid overflowing max_req_size · 8f7f6b7e
      Will Deacon authored
      On a system with large pages (64k in my case), the following BUG is
      triggered in MMC core:
      
      [    2.338023] BUG: failure at drivers/mmc/core/core.c:221/mmc_start_request()!
      [    2.338102] Kernel panic - not syncing: BUG!
      [    2.338155] Call trace:
      [    2.338228] [<ffffffc00008635c>] dump_backtrace+0x0/0x120
      [    2.338317] [<ffffffc0003365ec>] dump_stack+0x14/0x1c
      [    2.338403] [<ffffffc000336990>] panic+0xbc/0x1f0
      [    2.338498] [<ffffffc00027a494>] mmc_start_request+0x154/0x184
      [    2.338600] [<ffffffc00027abdc>] mmc_start_req+0x110/0x140
      [    2.338701] [<ffffffc00028604c>] mmc_blk_issue_rw_rq+0x7c/0x39c
      [    2.338804] [<ffffffc00028652c>] mmc_blk_issue_rq+0x1c0/0x468
      [    2.338905] [<ffffffc000287564>] mmc_queue_thread+0x68/0x118
      [    2.338995] [<ffffffc0000bc308>] kthread+0x84/0x8c
      
      This is because of a 64k request with a max_req_size of 64k-1 bytes.
      
      The following patch fixes the problem by limiting the max_blk_count
      such that max_blk_count * max_blk_size == max_req_size. I couldn't
      pursuade the compiler to emit a shift instead of a div without encoding
      the shift explicitly.
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarChris Ball <cjb@laptop.org>
      8f7f6b7e
    • Sascha Hauer's avatar
      mmc: sdhci-esdhc-imx: fix for mmc cards on i.MX5 · 5b6b0ad6
      Sascha Hauer authored
      On i.MX53 we have to write a special SDHCI_CMD_ABORTCMD to the
      SDHCI_TRANSFER_MODE register during a MMC_STOP_TRANSMISSION
      command. This works for SD cards. However, with MMC cards
      the MMC_SET_BLOCK_COUNT command is used instead, but this
      needs the same handling. Fix MMC cards by testing for the
      MMC_SET_BLOCK_COUNT command aswell. Tested on a custom i.MX53
      board with a Transcend MMC+ card and eMMC.
      
      The kernel started used MMC_SET_BLOCK_COUNT in 3.0, so this
      is a regression for these boards introduced in 3.0; it should
      go to 3.0/3.1/3.2-stable.
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarChris Ball <cjb@laptop.org>
      5b6b0ad6
    • Guennadi Liakhovetski's avatar
      mmc: core: fix regression: set default clock gating delay to 0 · c84f15ae
      Guennadi Liakhovetski authored
      A recent commit "mmc: core: Use delayed work in clock gating framework"
      (597dd9d7) introduced a default 200ms delay before clock gating
      actually takes place.  This means that every time an MMC interface
      becomes idle it first stays on for 200ms before gating its clock. This
      leads to increased power consumption and is therefore a clear regression.
      This patch restores the original behaviour by setting the default delay
      to 0. Users prioritising throughput over power efficiency can still
      modify the delay via sysfs.
      Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: default avatarChris Ball <cjb@laptop.org>
      c84f15ae
    • Nicolas Ferre's avatar
      MAINTAINERS: hand over atmel-mci (sd/mmc interface) · 24e1511f
      Nicolas Ferre authored
      Modify MAINTAINERS entry for Atmel SD/MMC drivers.
      I hand the atmel-mci and at91_mci drivers over to Ludovic.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Acked-by: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: default avatarChris Ball <cjb@laptop.org>
      24e1511f
  2. 02 Mar, 2012 10 commits
  3. 01 Mar, 2012 1 commit
    • Tejun Heo's avatar
      memblock: Fix size aligning of memblock_alloc_base_nid() · 847854f5
      Tejun Heo authored
      memblock allocator aligns @size to @align to reduce the amount
      of fragmentation.  Commit:
      
       7bd0b0f0 ("memblock: Reimplement memblock allocation using reverse free area iterator")
      
      Broke it by incorrectly relocating @size aligning to
      memblock_find_in_range_node().  As the aligned size is not
      propagated back to memblock_alloc_base_nid(), the actually
      reserved size isn't aligned.
      
      While this increases memory use for memblock reserved array,
      this shouldn't cause any critical failure; however, it seems
      that the size aligning was hiding a use-beyond-allocation bug in
      sparc64 and losing the aligning causes boot failure.
      
      The underlying problem is currently being debugged but this is a
      proper fix in itself, it's already pretty late in -rc cycle for
      boot failures and reverting the change for debugging isn't
      difficult. Restore the size aligning moving it to
      memblock_alloc_base_nid().
      Reported-by: default avatarMeelis Roos <mroos@linux.ee>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/20120228205621.GC3252@dhcp-172-17-108-109.mtv.corp.google.comSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      LKML-Reference: <alpine.SOC.1.00.1202130942030.1488@math.ut.ee>
      847854f5
  4. 29 Feb, 2012 14 commits
  5. 28 Feb, 2012 11 commits