1. 26 3月, 2012 9 次提交
  2. 14 3月, 2012 2 次提交
  3. 05 3月, 2012 2 次提交
    • W
      mmc: mmci: reduce max_blk_count to avoid overflowing max_req_size · 8f7f6b7e
      Will Deacon 提交于
      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: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      8f7f6b7e
    • S
      mmc: sdhci-esdhc-imx: fix for mmc cards on i.MX5 · 5b6b0ad6
      Sascha Hauer 提交于
      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: NSascha Hauer <s.hauer@pengutronix.de>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      5b6b0ad6
  4. 03 3月, 2012 1 次提交
  5. 14 2月, 2012 8 次提交
    • S
      mmc: dw_mmc: Fix PIO mode with support of highmem · f9c2a0dc
      Seungwon Jeon 提交于
      Current PIO mode makes a kernel crash with CONFIG_HIGHMEM.
      Highmem pages have a NULL from sg_virt(sg).
      This patch fixes the following problem.
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      pgd = c0004000
      [00000000] *pgd=00000000
      Internal error: Oops: 817 [#1] PREEMPT SMP
      Modules linked in:
      CPU: 0    Not tainted  (3.0.15-01423-gdbf465f #589)
      PC is at dw_mci_pull_data32+0x4c/0x9c
      LR is at dw_mci_read_data_pio+0x54/0x1f0
      pc : [<c0358824>]    lr : [<c035988c>]    psr: 20000193
      sp : c0619d48  ip : c0619d70  fp : c0619d6c
      r10: 00000000  r9 : 00000002  r8 : 00001000
      r7 : 00000200  r6 : 00000000  r5 : e1dd3100  r4 : 00000000
      r3 : 65622023  r2 : 0000007f  r1 : eeb96000  r0 : e1dd3100
      Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment
      xkernel
      Control: 10c5387d  Table: 61e2004a  DAC: 00000015
      Process swapper (pid: 0, stack limit = 0xc06182f0)
      Stack: (0xc0619d48 to 0xc061a000)
      9d40:                   e1dd3100 e1a4f000 00000000 e1dd3100 e1a4f000 00000200
      9d60: c0619da4 c0619d70 c035988c c03587e4 c0619d9c e18158f4 e1dd3100 e1dd3100
      9d80: 00000020 00000000 00000000 00000020 c06e8a84 00000000 c0619e04 c0619da8
      9da0: c0359b24 c0359844 e18158f4 e1dd3164 e1dd3168 e1dd3150 3d02fc79 e1dd3154
      9dc0: e1dd3178 00000000 00000020 00000000 e1dd3150 00000000 c10dd7e8 e1a84900
      9de0: c061e7cc 00000000 00000000 0000008d c06e8a84 c061e780 c0619e4c c0619e08
      9e00: c00c4738 c0359a34 3d02fc79 00000000 c0619e4c c05a1698 c05a1670 c05a165c
      9e20: c04de8b0 c061e780 c061e7cc e1a84900 ffffed68 0000008d c0618000 00000000
      9e40: c0619e6c c0619e50 c00c48b4 c00c46c8 c061e780 c00423ac c061e7cc ffffed68
      9e60: c0619e8c c0619e70 c00c7358 c00c487c 0000008d ffffee38 c0618000 ffffed68
      9e80: c0619ea4 c0619e90 c00c4258 c00c72b0 c00423ac ffffee38 c0619ecc c0619ea8
      9ea0: c004241c c00c4234 ffffffff f8810000 0000006d 00000002 00000001 7fffffff
      9ec0: c0619f44 c0619ed0 c0048bc0 c00423c4 220ae7a9 00000000 386f0d30 0005d3a4
      9ee0: c00423ac c10dd0b8 c06f2cd8 c0618000 c0594778 c003a674 7fffffff c0619f44
      9f00: 386f0d30 c0619f18 c00a6f94 c005be3c 80000013 ffffffff 386f0d30 0005d3a4
      9f20: 386f0d30 0005d2d1 c10dd0a8 c10dd0b8 c06f2cd8 c0618000 c0619f74 c0619f48
      9f40: c0345858 c005be00 c00a2440 c0618000 c0618000 c00410d8 c06c1944 c00410fc
      9f60: c0594778 c003a674 c0619f9c c0619f78 c004a7e8 c03457b4 c0618000 c06c18f8
      9f80: 00000000 c0039c70 c06c18d4 c003a674 c0619fb4 c0619fa0 c04ceafc c004a714
      9fa0: c06287b4 c06c18f8 c0619ff4 c0619fb8 c0008b68 c04cea68 c0008578 00000000
      9fc0: 00000000 c003a674 00000000 10c5387d c0628658 c003aa78 c062f1c4 4000406a
      9fe0: 413fc090 00000000 00000000 c0619ff8 40008044 c0008858 00000000 00000000
      Backtrace:
      [<c03587d8>] (dw_mci_pull_data32+0x0/0x9c) from [<c035988c>] (dw_mci_read_data_pio+0x54/0x1f0)
       r6:00000200 r5:e1a4f000 r4:e1dd3100
       [<c0359838>] (dw_mci_read_data_pio+0x0/0x1f0) from [<c0359b24>] (dw_mci_interrupt+0xfc/0x4a4)
      [<c0359a28>] (dw_mci_interrupt+0x0/0x4a4) from [<c00c4738>] (handle_irq_event_percpu+0x7c/0x1b4)
      [<c00c46bc>] (handle_irq_event_percpu+0x0/0x1b4) from [<c00c48b4>] (handle_irq_event+0x44/0x64)
      [<c00c4870>] (handle_irq_event+0x0/0x64) from [<c00c7358>] (handle_fasteoi_irq+0xb4/0x124)
       r7:ffffed68 r6:c061e7cc r5:c00423ac r4:c061e780
       [<c00c72a4>] (handle_fasteoi_irq+0x0/0x124) from [<c00c4258>] (generic_handle_irq+0x30/0x38)
       r7:ffffed68 r6:c0618000 r5:ffffee38 r4:0000008d
       [<c00c4228>] (generic_handle_irq+0x0/0x38) from [<c004241c>] (asm_do_IRQ+0x64/0xe0)
       r5:ffffee38 r4:c00423ac
       [<c00423b8>] (asm_do_IRQ+0x0/0xe0) from [<c0048bc0>] (__irq_svc+0x80/0x14c)
      Exception stack(0xc0619ed0 to 0xc0619f18)
      Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com>
      Acked-by: NWill Newton <will.newton@imgtec.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      f9c2a0dc
    • L
      mmc: atmel-mci: save and restore sdioirq when soft reset is performed · 18ee684b
      Ludovic Desroches 提交于
      Sometimes a software reset is needed. Then some registers are saved and
      restored but the interrupt mask register is missing. It causes issues
      with sdio devices whose interrupts are masked after reset.
      Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      18ee684b
    • G
      mmc: sh_mmcif: fix late delayed work initialisation · 5ba85d95
      Guennadi Liakhovetski 提交于
      If the driver is loaded with a card in the slot, mmc_add_host() will
      schedule an immediate card-detection work, which will start IO and wait
      for command completion. Usually the kernel first returns to the sh_mmcif
      probe function, lets it finish and only then schedules the rescan work.
      But sometimes, expecially under heavy system load, the work will be
      scheduled immediately before returning to the probe method. In this case
      it is important for the driver to be fully prepared for IO. For sh_mmcif
      this means, that also the timeout work has to be initialised before
      calling mmc_add_host(). It is also better to prepare interrupts
      beforehand. Besides, since mmc_add_host() does card-detection itself,
      there is no need to do it again immediately afterwards.
      Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      5ba85d95
    • G
      mmc: tmio_mmc: fix card eject during IO with DMA · e3de2be7
      Guennadi Liakhovetski 提交于
      When DMA is in use and the card is ejected during IO, DMA transfers have to
      be terminated, otherwise the dmaengine driver fails to operate properly,
      when the card is re-inserted.
      Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      e3de2be7
    • A
      mmc: sdhci-pci: set Medfield SDIO as non-removable · 012e4671
      Adrian Hunter 提交于
      Set Medfield SDIO as non-removable to avoid un-necessary
      card detect activity.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      012e4671
    • J
      mmc: esdhc: set the timeout to the max value · 147c3b33
      Jerry Huang 提交于
      When accessing the card on some FSL platform boards (e.g p2020, p1010,
      mpc8536), the following error is reported with the timeout value calculated:
      
      mmc0: Got data interrupt 0x00000020 even though no data operation was
      in progress.
      mmc0: Got data interrupt 0x00000020 even though no data operation was
      in progress.
      
      So we skip the calculation of timeout and use the max value to fix it.
      Signed-off-by: NJerry Huang <Chang-Ming.Huang@freescale.com>
      Signed-off-by: NGao Guanhua <B22826@freescale.com>
      Signed-off-by: NXie Xiaobo <X.Xie@freescale.com>
      Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      147c3b33
    • J
      mmc: esdhc: add PIO mode support · 81e49922
      Jerry Huang 提交于
      For some FSL ESDHC controllers (e.g. P2020E, Rev1.0), the SDHC can not
      work on DMA mode because of the hardware bug, so we set a broken dma flag
      and use PIO mode.
      Signed-off-by: NJerry Huang <Chang-Ming.Huang@freescale.com>
      Signed-off-by: NGao Guanhua <B22826@freescale.com>
      Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      81e49922
    • J
      mmc: of_mmc_spi: fix little endian support · b6bf30d9
      Jean-Christophe PLAGNIOL-VILLARD 提交于
      The voltage_ranges is supposed to switch from big endian to little endian.
      Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      b6bf30d9
  6. 12 2月, 2012 1 次提交
    • R
      mmc: esdhc: fix errors when booting kernel on Freescale eSDHC version 2.3 · ba8c4dc9
      Roy Zang 提交于
      When eSDHC module is enabled on P5020/P3041/P2041/P1010 with eSDHC
      version 2.3, there is following errors:
      
      mmc0: Timeout waiting for hardware interrupt.
      mmc0: error -110 whilst initialising SD card
      mmc0: Unexpected interrupt 0x02000000.
      mmc0: Timeout waiting for hardware interrupt.
      mmc0: error -110 whilst initialising SD card
      mmc0: Unexpected interrupt 0x02000000.
      
      It is because eSDHC controller has different bit setting for PROCTL
      register at 0x28 comparing SD specification.
      This patch sets DMAS bits correctly for byte operation and does not
      change the default value of other field of PROCTL register.
      
      For other FSL chips, such as MPC8536/P2020, PROCTL[DMAS]
      bits are reserved and even if they are set to wrong bits, it will not
      take effective.
      Signed-off-by: NRoy Zang <tie-fei.zang@freescale.com>
      Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      ba8c4dc9
  7. 06 2月, 2012 1 次提交
  8. 25 1月, 2012 1 次提交
    • F
      drivers: misc: Remove MISC_DEVICES config option · 7c5763b8
      Fabio Estevam 提交于
      MISC_DEVICES option alone does not select any kernel code and can cause dependency build warnings, such as:
      
      warning: (KS8851 && AX88796_93CX6 && RTL8180 && RTL8187 && ADM8211 && RT2400PCI && RT2500PCI && RT61PCI && RT2800PCI && R8187SE) selects EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)
      
      As the current drivers/misc/Kconfig stands, it is only possible to select the drivers below if MISC_DEVICES option is selected:
      
      source "drivers/misc/c2port/Kconfig"
      source "drivers/misc/eeprom/Kconfig"
      source "drivers/misc/cb710/Kconfig"
      source "drivers/misc/iwmc3200top/Kconfig"
      source "drivers/misc/ti-st/Kconfig"
      source "drivers/misc/lis3lv02d/Kconfig"
      source "drivers/misc/carma/Kconfig"
      source "drivers/misc/altera-stapl/Kconfig"
      
      So remove MISC_DEVICES option so that nothing is dependant on it.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7c5763b8
  9. 13 1月, 2012 10 次提交
  10. 12 1月, 2012 5 次提交