Re: [PATCH v4] mmc: sdhci: add error checking for mmc_add_host

2011-04-11 Thread Wolfram Sang
You means that didn't run start_host() before add_host failed. I think that need not to run stop_host. right? Right, and other stuff like registering the pm_notifier. To use mmc_free_host, better than mmc_remove_host. That would be true for most drivers. However, sdhci has encapsulated this

Re: [PATCH v2 00/12] mmc: use nonblock mmc requests to minimize latency

2011-04-11 Thread Per Forlin
On 10 April 2011 05:33, anish singh anish198519851...@gmail.com wrote: On Sat, Apr 9, 2011 at 5:25 PM, Jae hoon Chung jh80.ch...@gmail.com wrote: Hi Per.. I'm applied your patch..and sent the patch about dw_mmc.c. I think good this approach.. Forlin,i too want to test this patch of yours

Re: [PATCH v2 00/12] mmc: use nonblock mmc requests to minimize latency

2011-04-11 Thread Per Forlin
On 9 April 2011 13:55, Jae hoon Chung jh80.ch...@gmail.com wrote: Hi Per.. I'm applied your patch..and sent the patch about dw_mmc.c. I think good this approach.. Do you have any test results from the mmc_tests I added? I am interested in the results. Regards, Per Tested-by: Jaehoon Chung

RE: Problem when using SDIO interrupts on Nexus One

2011-04-11 Thread Subhash Jadavani
Hi Johan, -Original Message- From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc- ow...@vger.kernel.org] On Behalf Of Johan Sent: Friday, April 08, 2011 12:53 AM To: linux-mmc@vger.kernel.org Subject: Problem when using SDIO interrupts on Nexus One I have a Nexus One Android

Re: [PATCH] mmc: sdhci-pci: Fix checkpatch.pl errors

2011-04-11 Thread Wolfram Sang
On Mon, Apr 11, 2011 at 12:47:02PM +0300, Ameya Palande wrote: Hi Wolfram, On Fri, Apr 8, 2011 at 9:55 PM, Wolfram Sang w.s...@pengutronix.de wrote: Hi Ameya, On Tue, Apr 05, 2011 at 09:13:13PM +0300, Ameya Palande wrote: This patch fixes 21 errors and 6 warnings reported by

[RACE] between rescan thread and clock-gate work

2011-04-11 Thread Guennadi Liakhovetski
Hi all I'm observing re-entry into driver's (tmio) .set_ios() method, caused by a race between the card-detect rescan thread along the lines of [kworker/u:0 worker-thread] mmc_claim_host() mmc_rescan() mmc_rescan_try_freq() /* yes, there are also other paths to call

[patchv3 2/4] MMC: SDHCI R1B command handling + MMC_CAP_ERASE.

2011-04-11 Thread Andrei Warkentin
ERASE command needs R1B response, so fix R1B-type command handling for SDHCI controller. For non-DAT commands using a busy reponse, the cmd-cmd_timeout_ms (in ms) field is used for timeout calculations. Based on patch by Chuanxiao Dong chuanxiao.d...@intel.com Signed-off-by: Andrei Warkentin

[patchv3 4/4] MMC: MMC boot partitions support.

2011-04-11 Thread Andrei Warkentin
Allows device MMC boot partitions to be accessed. MMC partitions are treated effectively as separate block devices on the same MMC card. Acked-by: Arnd Bergmann a...@arndb.de Signed-off-by: Andrei Warkentin andr...@motorola.com --- Documentation/mmc/00-INDEX |2 +

Re: [PATCH 1/4] MMC: Rename erase_timeout to cmd_timeout.

2011-04-11 Thread Andrei Warkentin
On Mon, Apr 11, 2011 at 2:18 PM, John Calixto john.cali...@modsystems.com wrote: Hi Andrei, On Tue, 5 Apr 2011, Andrei Warkentin wrote: diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 07f27af..a7d7da7 100644 --- a/include/linux/mmc/core.h +++

Re: [PATCH] omap-mmc: Fix possible NULL pointer deref

2011-04-11 Thread Chris Ball
Hi, On Wed, Mar 02 2011, Michael Buesch wrote: Either OMAP_MMC_STAT_CARD_ERR or OMAP_MMC_STAT_END_OF_CMD might fire if there is no host-cmd pointer. Check for a valid host-cmd pointer before calling mmc_omap_cmd_done(). Signed-off-by: Michael Buesch m...@bu3sch.de Acked-by: Tony Lindgren

Re: [RFC] mmc: sdhci: work around broken dma boundary behavior

2011-04-11 Thread Chris Ball
Hi Wolfram, On Tue, Mar 29 2011, Mikko Vinni wrote: In my opinion this is more risky than the original patch because this will affect the behavior on all controllers that use sdhci, and not just on those ones that don't update SDHCI_DMA_ADDRESS themselves. Comments welcome! Any thoughts on

Re: [PATCH] mmc: sdhci-pci: Fix checkpatch.pl errors

2011-04-11 Thread Chris Ball
Hi Ameya, On Tue, Apr 05 2011, Ameya Palande wrote: This patch fixes 21 errors and 6 warnings reported by checkpatch.pl Signed-off-by: Ameya Palande 2am...@gmail.com Thanks, pushed to mmc-next for .40 with Wolfram's Reviewed-by. - Chris. -- Chris Ball c...@laptop.org http://printf.net/

Re: [PATCH v3] mmc: Add ioctl to let userspace apps send ACMDs

2011-04-11 Thread Chris Ball
Hi John, On Thu, Apr 07 2011, John Calixto wrote: Sending ACMDs from userspace is useful for such things as: - The security application of an SD card (SD Specification, Part 3, Security) - SD passthrough for virtual machines Tested on TI PCIxx12 (SDHCI), Sigma Designs

Re: [PATCH] mmc: host: fix memory leak in mmc_add_host

2011-04-11 Thread Chris Ball
Hi Wolfram, On Mon, Apr 11 2011, Wolfram Sang wrote: led_trigger_register_simple() allocates memory which must not be leaked in the error-path of mmc_add_host. Move it past the only error-check in the function. Signed-off-by: Wolfram Sang w.s...@pengutronix.de --- I don't see any reason

[PATCH] MMC: Extends card quicks with MMC/SD quirks matching the CID.

2011-04-11 Thread Andrei Warkentin
From: Chris Ball c...@laptop.org The current mechanism is SDIO-only. This allows us to create function-specific quirks, without creating messy Kconfig dependencies, or polluting core/ with function-specific code. Signed-off-by: Andrei Warkentin andr...@motorola.com --- drivers/mmc/core/core.h

Re: [PATCH 1/2] MMC: Extends card quicks with MMC/SD quirks matching the CID.

2011-04-11 Thread Andrei Warkentin
On Mon, Apr 11, 2011 at 3:55 PM, Chris Ball c...@laptop.org wrote: Hi Andrei, I've rebased this patch to include Ohad's recent wl1271 quirks, and was about to apply it, but have one question -- would you mind resubmitting with your use of strcmp() switched over to strncmp()?  It looks safe in

SanDisk 4.3+ iNAND eMMC devices TRIM bug workaround.

2011-04-11 Thread Andrei Warkentin
This fixes the out-of-spec erase/trim support. CMD38 argument is passed through an EXT_CSD byte instead of as the command argument. This has the effect that trims act as group erases, erasing more data than necessary. Secure trims/erases were also affected. N.B. This depends on the mmc_switch

[PATCH 1/2] MMC: Support for block quirks.

2011-04-11 Thread Andrei Warkentin
Block quirks implemented using core/quirks.c support. Change-Id: I81d9ad57a7ae95c60ee8026f090c8df7c75fd069 Signed-off-by: Andrei Warkentin andr...@motorola.com --- drivers/mmc/card/block.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/card/block.c

mmc: Add ioctl to let userspace apps send ACMDs

2011-04-11 Thread John Calixto
Since this patch has gone through multiple revisions now, I thought I'd list the changes in each revision: - v4 - replace postsleep udelay() with usleep_range() - add cmd_timeout_ms field for R1B commands - v3 - copy data from userspace before claiming host - break out copy from

Re: [PATCH] MMC: Extends card quicks with MMC/SD quirks matching the CID.

2011-04-11 Thread Andrei Warkentin
On Mon, Apr 11, 2011 at 4:50 PM, Chris Ball c...@laptop.org wrote: Hi, On Mon, Apr 11 2011, Andrei Warkentin wrote: From: Chris Ball c...@laptop.org The current mechanism is SDIO-only. This allows us to create function-specific quirks, without creating messy Kconfig dependencies, or

Re: [patchv3 4/4] MMC: MMC boot partitions support.

2011-04-11 Thread Chris Ball
Hi Andrei, On Mon, Apr 11 2011, Andrei Warkentin wrote: Allows device MMC boot partitions to be accessed. MMC partitions are treated effectively as separate block devices on the same MMC card. Acked-by: Arnd Bergmann a...@arndb.de Signed-off-by: Andrei Warkentin andr...@motorola.com Looks

[PATCH v4] mmc: Add ioctl to let userspace apps send ACMDs

2011-04-11 Thread John Calixto
Sending ACMDs from userspace is useful for such things as: - The security application of an SD card (SD Specification, Part 3, Security) - SD passthrough for virtual machines Tested on TI PCIxx12 (SDHCI), Sigma Designs SMP8652 SoC, TI OMAP3621 SoC, TI OMAP3630 SoC, Samsung S5PC110

Re: [patchv3 4/4] MMC: MMC boot partitions support.

2011-04-11 Thread Andrei Warkentin
On Mon, Apr 11, 2011 at 5:00 PM, Chris Ball c...@laptop.org wrote: Hi Andrei, On Mon, Apr 11 2011, Andrei Warkentin wrote: Allows device MMC boot partitions to be accessed. MMC partitions are treated effectively as separate block devices on the same MMC card. Acked-by: Arnd Bergmann

Re: [patchv3 4/4] MMC: MMC boot partitions support.

2011-04-11 Thread Chris Ball
Hi Andrei, On Mon, Apr 11 2011, Andrei Warkentin wrote: So it was one of the two - a) stick mmc_bkl_part_switch into mmc_blk_issue_secdiscard_rq, mmc_blk_issue_discard_rq, and mmc_blk_issue_rw_rq. b) Move claim/release into mmc_blk_issue_rq and put partition switch code into one place.

[patchv4 1/2] MMC: block.c cleanup for host claim/release.

2011-04-11 Thread Andrei Warkentin
Move host claim/release into mmc_blk_issue_rq. Signed-off-by: Andrei Warkentin andr...@motorola.com --- drivers/mmc/card/block.c | 31 +-- 1 files changed, 13 insertions(+), 18 deletions(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index

[patchv4 2/2] MMC: MMC boot partitions support.

2011-04-11 Thread Andrei Warkentin
Allows device MMC boot partitions to be accessed. MMC partitions are treated effectively as separate block devices on the same MMC card. Acked-by: Arnd Bergmann a...@arndb.de Signed-off-by: Andrei Warkentin andr...@motorola.com --- Documentation/mmc/00-INDEX |2 +

Re: [patchv3 4/4] MMC: MMC boot partitions support.

2011-04-11 Thread Chris Ball
Hi Andrei, On Mon, Apr 11 2011, Andrei Warkentin wrote: Ok, great! Will do. Great, thanks. I've just merged: mmc: quirks: Extends card quirks with MMC/SD quirks matching the CID. [patchv3 1/4] MMC: Rename erase_timeout to cmd_timeout_ms. [patchv3 2/4] MMC: SDHCI R1B command handling +

Re: [PATCH v3] mmc: Add ioctl to let userspace apps send ACMDs

2011-04-11 Thread John Calixto
On Mon, 11 Apr 2011, Chris Ball wrote: This adds two gcc warnings here (compiling for ARM): CC drivers/mmc/card/block.o drivers/mmc/card/block.c: In function ‘mmc_blk_ioctl_copy_from_user’: drivers/mmc/card/block.c:199:33: warning: cast to pointer from integer of different size

Re: [RFC] mmc: sdhci: work around broken dma boundary behavior

2011-04-11 Thread Wolfram Sang
In my opinion this is more risky than the original patch because this will affect the behavior on all controllers that use sdhci, and not just on those ones that don't update SDHCI_DMA_ADDRESS themselves. Comments welcome! Any thoughts on which of the two approaches you prefer? Thanks