22 Sep, 2008
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
mmc_test: initialize mmc_test_lock statically
mmc_block: handle error from mmc_register_driver()
atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin
atmel-mci: Fix bogus debugfs file size
atmel-mci: Fix memory leak in atmci_regs_show
atmel-mci: debugfs: enable clock before dumping regs
tmio_mmc: fix compilation with debug enabled
20 Sep, 2008
7 commits
-
The mutex mmc_test_lock is initialized at every time mmc_test device
is probed. Probing another mmc_test device may break the mutex, if
the probe function is called while the mutex is locked.This patch fixes it by statically initializing mmc_test_lock.
Signed-off-by: Akinobu Mita
Signed-off-by: Pierre Ossman -
Check error from mmc_register_driver() and properly unwind
block device registration.Signed-off-by: Akinobu Mita
Signed-off-by: Pierre Ossman -
This allows the mmc core to detect card insertion/removal for slots that
don't have any CD pin wired up.Signed-off-by: Haavard Skinnemoen
Signed-off-by: Pierre Ossman -
We used to store a binary register snapshot in the "regs" file, so we
set the file size to be the size of this snapshot. This is no longer
valid since we switched to using seq_file.Signed-off-by: Haavard Skinnemoen
Signed-off-by: Pierre Ossman -
The debugfs hook atmci_regs_show allocates a temporary buffer for
storing a register snapshot, but it doesn't free it before returning.
Plug this leak.Signed-off-by: Haavard Skinnemoen
Signed-off-by: Pierre Ossman -
Make sure that the peripheral clock is enabled before reading the MMIO
registers for the debugfs "regs" dump.Signed-off-by: Haavard Skinnemoen
Signed-off-by: Pierre Ossman -
Signed-off-by: Dmitry Baryshkov
Acked-by: Ian Molton
Signed-off-by: Pierre Ossman
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
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
18 Aug, 2008
3 commits
-
The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
drivers/mmc/host/sdricoh_cs.cThis patch removes the said #include .
Signed-off-by: Huang Weiyi
Signed-off-by: Pierre Ossman -
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 -
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 pointerSigned-off-by: Ben Dooks
Signed-off-by: Pierre Ossman
11 Aug, 2008
2 commits
-
The TMIO chips are only found (and thus tested) on ARM machines.
Moreover, we don't want the TMIO cells to be built if one of the TMIO
driver is not selected (which indirectly make the TMIO cells drivers
depend on ARM as well).Signed-off-by: Samuel Ortiz
-
This patch adds support for the MMC subdevice 'cell' commonly found in
TMIO based MFDs.Signed-off-by: Ian Molton
Acked-by: Pierre Ossman
Signed-off-by: Samuel Ortiz
07 Aug, 2008
4 commits
-
This just leaves include/asm-arm/plat-* to deal with.
Signed-off-by: Russell King
-
There are 43 includes of asm/mach-types.h by files that don't
reference anything from that file. Remove these unnecessary
includes.Signed-off-by: Russell King
05 Aug, 2008
1 commit
-
Update all avr32-specific files to use the new platform-specific header
locations. Drivers shared with ARM are left alone for now.Signed-off-by: Haavard Skinnemoen
02 Aug, 2008
7 commits
-
Raise the DMA block size limit from 2048 bytes to the maximum supported
by the DMA controllers on the chip (64KB on Au1100, 4MB on Au1200).This gives a very small performance boost and apparently fixes an oops
when MMC-DMA and network traffic are active at the same time.Signed-off-by: Manuel Lauss
Signed-off-by: Pierre Ossman -
Signed-off-by: Pierre Ossman
-
Signed-off-by: Pierre Ossman
-
This reverts commit 48b5352ea1891455eb8e824cf7d92f66931a090f. Oversized
sg lists are not allowed anymore, and the core even checks for them in
debug mode, so this test is entirely incorrect.Signed-off-by: Pierre Ossman
-
Fix a copy-and-paste error.
Signed-off-by: Pierre Ossman
-
The wrong flag was manipulated when an invalid sg list was given, turning
off DMA on the next (and all subsequent) request instead of the current
one.Signed-off-by: Pierre Ossman
-
Signed-off-by: Pierre Ossman
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 -
* '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 -
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 -
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 -
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 -
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 -
Fixup platform resources handling.
Signed-off-by: Paulius Zaleckas
Acked-by: Pavel Pisa
Signed-off-by: Pierre Ossman -
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 -
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 -
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
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
23 Jul, 2008
1 commit
-
Improve the PIO handling so that it can service highmem pages.
Signed-off-by: Pierre Ossman