22 Sep, 2008

1 commit


20 Sep, 2008

7 commits


06 Sep, 2008

1 commit

  • mmc_block_open() increments md->usage although it returns with -EROFS when
    default mounting a MMC/SD card with write protect switch on. This
    reference counting bug prevents /dev/mmcblkX from being released on card
    removal, and situation worsen with reinsertion until the minor number
    range runs out.

    Reported-by:
    Acked-by: Pierre Ossman
    Cc: [2.6.25.x, 2.6.26.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

03 Sep, 2008

1 commit

  • At91_mci is abusing dma_free_coherent(), which may not be called with IRQs
    disabled. I saw "mkfs.ext3" on an MMC card objecting voluminously as each
    write completed:

    WARNING: at arch/arm/mm/consistent.c:368 dma_free_coherent+0x2c/0x224()
    [] (dump_stack+0x0/0x14) from [] (warn_on_slowpath+0x4c/0x68)
    [] (warn_on_slowpath+0x0/0x68) from [] (dma_free_coherent+0x2c/0x224)
    r6:00008008 r5:ffc06000 r4:00000000
    [] (dma_free_coherent+0x0/0x224) from [] (at91_mci_irq+0x374/0x420)
    [] (at91_mci_irq+0x0/0x420) from [] (handle_IRQ_event+0x2c/0x6c)
    ...

    This bug has been around for a LONG time. The MM warning is from late
    2005, but the driver merged a year later ... so I'm puzzled why nobody
    noticed this before now.

    The fix involves noting that this buffer shouldn't be DMA-coherent; it's
    just used for normal DMA writes. So replace it with standard kmalloc()
    buffering and DMA mapping calls.

    This is the quickie fix. A better one would not rely on allocating large
    bounce buffers. (Note that dma_alloc_coherent could have failed too, but
    that case was ignored... kmalloc is a bit more likely to fail though.)

    Signed-off-by: David Brownell
    Acked-by: Pierre Ossman
    Cc: Andrew Victor
    Acked-by: Nicolas Ferre
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

18 Aug, 2008

3 commits

  • The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
    drivers/mmc/host/sdricoh_cs.c

    This patch removes the said #include .

    Signed-off-by: Huang Weiyi
    Signed-off-by: Pierre Ossman

    Huang Weiyi
     
  • Attach the routine to get_cd to allow the MMC core to find out whether
    there is a card present or not without the tedious process of trying to
    send commands to the card or not.

    Signed-off-by: Ben Dooks
    Signed-off-by: Pierre Ossman

    Ben Dooks
     
  • Fix the following sparse errors by making the functions
    static and fixing the check for host->base.

    598:6: warning: symbol 's3cmci_dma_done_callback' was not declared. Should it be static?
    744:6: warning: symbol 's3cmci_dma_setup' was not declared. Should it be static?
    1209:20: warning: Using plain integer as NULL pointer

    Signed-off-by: Ben Dooks
    Signed-off-by: Pierre Ossman

    Ben Dooks
     

11 Aug, 2008

2 commits


07 Aug, 2008

4 commits


05 Aug, 2008

1 commit


02 Aug, 2008

7 commits


27 Jul, 2008

11 commits

  • Minor cleanups for the MMC/SD support on avr32:

    - Make at32_add_device_mci() properly initialize "missing"
    platform data ... so boards like STK1002 won't try GPIO 0.

    - Switch over to gpio_is_valid() instead of testing for only
    one designated value.

    - Provide STK1002 platform data for the unlikely case that
    switches are set so first Ethernet controller isn't in use.
    (That's the only way to get card detect and writeprotect
    switch sensing on the STK1000.)

    And get rid of one "unused variable" warning.

    Signed-off-by: David Brownell
    Signed-off-by: Haavard Skinnemoen

    David Brownell
     
  • Haavard Skinnemoen
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
    atmel-mci: debugfs support
    mmc: Add per-card debugfs support
    mmc: Export internal host state through debugfs
    imxmmc: fix crash when no platform data is provided
    imxmmc: fix platform resources
    imxmmc: remove DEBUG definition
    mmc_spi: put signals to low power off fix

    Linus Torvalds
     
  • Create additional files under the host's debugfs directory containing
    additional host-specific debug information.

    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Pierre Ossman

    Haavard Skinnemoen
     
  • For each card successfully added to the bus, create a subdirectory under
    the host's debugfs root with information about the card.

    At the moment, only a single file is added to the card directory for
    all cards: "state". It reflects the "state" field in struct mmc_card,
    indicating whether the card is present, readonly, etc.

    For MMC and SD cards (not SDIO), another file is added: "status".
    Reading this file will ask the card about its current status and
    return it. This can be useful if the card just refuses to respond to
    any commands, which might indicate that the card state is not what the
    MMC core thinks it is (due to a missing stop command, for example.)

    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Pierre Ossman

    Haavard Skinnemoen
     
  • When CONFIG_DEBUG_FS is set, create a few files under /sys/kernel/debug
    containing information about an mmc host's internal state. Currently,
    just a single file is created, "ios", which contains information about
    the current operating parameters for the bus (clock speed, bus width,
    etc.)

    Host drivers can add additional files and directories under the host's
    root directory by passing the debugfs_root field in struct mmc_host as
    the 'parent' parameter to debugfs_create_*.

    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Pierre Ossman

    Haavard Skinnemoen
     
  • Don't crash if no platform data is provided.
    In this case assume that card is present.

    Signed-off-by: Paulius Zaleckas
    Acked-by: Pavel Pisa
    Signed-off-by: Pierre Ossman

    Paulius Zaleckas
     
  • Fixup platform resources handling.

    Signed-off-by: Paulius Zaleckas
    Acked-by: Pavel Pisa
    Signed-off-by: Pierre Ossman

    Paulius Zaleckas
     
  • Removed DEBUG #define #undef, because module is automaticaly
    compiled with -DDEBUG when CONFIG_MMC_DEBUG is defined.
    Currently it just generates compiler warning about redefinition.

    Signed-off-by: Paulius Zaleckas
    Acked-by: Pavel Pisa
    Signed-off-by: Pierre Ossman

    Paulius Zaleckas
     
  • Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
    architecture does:

    This enables us to cleanly fix the Calgary IOMMU issue that some devices
    are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).

    I think that per-device dma_mapping_ops support would be also helpful for
    KVM people to support PCI passthrough but Andi thinks that this makes it
    difficult to support the PCI passthrough (see the above thread). So I
    CC'ed this to KVM camp. Comments are appreciated.

    A pointer to dma_mapping_ops to struct dev_archdata is added. If the
    pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's
    NULL, the system-wide dma_ops pointer is used as before.

    If it's useful for KVM people, I plan to implement a mechanism to register
    a hook called when a new pci (or dma capable) device is created (it works
    with hot plugging). It enables IOMMUs to set up an appropriate
    dma_mapping_ops per device.

    The major obstacle is that dma_mapping_error doesn't take a pointer to the
    device unlike other DMA operations. So x86 can't have dma_mapping_ops per
    device. Note all the POWER IOMMUs use the same dma_mapping_error function
    so this is not a problem for POWER but x86 IOMMUs use different
    dma_mapping_error functions.

    The first patch adds the device argument to dma_mapping_error. The patch
    is trivial but large since it touches lots of drivers and dma-mapping.h in
    all the architecture.

    This patch:

    dma_mapping_error() doesn't take a pointer to the device unlike other DMA
    operations. So we can't have dma_mapping_ops per device.

    Note that POWER already has dma_mapping_ops per device but all the POWER
    IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device
    argument.

    [akpm@linux-foundation.org: fix sge]
    [akpm@linux-foundation.org: fix svc_rdma]
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix bnx2x]
    [akpm@linux-foundation.org: fix s2io]
    [akpm@linux-foundation.org: fix pasemi_mac]
    [akpm@linux-foundation.org: fix sdhci]
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix sparc]
    [akpm@linux-foundation.org: fix ibmvscsi]
    Signed-off-by: FUJITA Tomonori
    Cc: Muli Ben-Yehuda
    Cc: Andi Kleen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Avi Kivity
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • alpha:

    drivers/mmc/host/sdhci.h:242: error: field 'sg_miter' has incomplete type

    Cc: Pierre Ossman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

24 Jul, 2008

1 commit

  • The original intention was to write a zero byte to mmc to force spi
    signals to low when doing power off. Somehow the spi_w8r8 call got there
    so a read followed the write of single zero byte. This patch changes
    that to simple write of zero byte without the following read.
    This way the power off is more reliable and completely sufficient.

    Signed-off-by: Jan Nikitenko
    Signed-off-by: David Brownell
    Signed-off-by: Pierre Ossman

    Jan Nikitenko
     

23 Jul, 2008

1 commit