[PATCH 1/5] mmc: core: Add support to read command queue parameters

2014-12-02 Thread Sujit Reddy Thumma
eMMC cards with EXT_CSD version >= 7, optionally support command queuing feature as defined by Jedec eMMC5.1. Add support for probing command queue feature for such type of cards. Signed-off-by: Sujit Reddy Thumma Signed-off-by: Asutosh Das --- drivers/mmc/core/mmc.c |

Re: [PATCH 0/3] mmc: Use runtime pm for blkdevice

2013-03-27 Thread Sujit Reddy Thumma
Hi Ulf, Sorry for the delayed response. The patches looks good to me except one concern mentioned below. On 3/21/2013 3:28 AM, Ulf Hansson wrote: If any driver wants to implement this then the runtime PM code would be refactored again. So I guess we might want to think about this now itself?

Re: [PATCH 0/3] mmc: Use runtime pm for blkdevice

2013-03-20 Thread Sujit Reddy Thumma
According the eMMC spec I can't see any requirement that the bus clock needs to be on while a BKOPS is running. Moreover it is clearly stated it is allowed to gate the bus clock for a device which indicates busy. So, I can't see that this is needed. What if host is aggressive and wants to keep

Re: [PATCH 0/3] mmc: Use runtime pm for blkdevice

2013-03-14 Thread Sujit Reddy Thumma
On 3/8/2013 8:44 AM, Ulf Hansson wrote: On 7 March 2013 22:14, Kevin Liu wrote: 2013/3/7 Kevin Liu : 2013/3/7 Ulf Hansson : On 7 March 2013 01:12, Kevin Liu wrote: From: Ulf Hansson mailto:ulf.hans...@stericsson.com>> Date: Fri, Mar 1, 2013 at 8:47 PM Subject: [PATCH 0/3] mmc: Use runtime

Re: [PATCH] mmc: core: Do not pre-claim host in suspend

2012-04-20 Thread Sujit Reddy Thumma
mmc_detach_bus(host); > + mmc_power_off(host); > + mmc_release_host(host); > + host->pm_flags = 0; > + err = 0; > } > } > mmc_bus_put(host); > -- > 1.7.

Re: [PATCH] mmc: sdio: avoid spurious calls to interrupt handlers

2012-04-15 Thread Sujit Reddy Thumma
> On Sun, 15 Apr 2012, Sujit Reddy Thumma wrote: > >> Hi Nicolas, >> >> > >> > Commit 06e8935feb "optimized SDIO IRQ handling for single irq" >> > introduced some spurious calls to SDIO function interrupt handlers, >> >

Re: [PATCH] mmc: sdio: avoid spurious calls to interrupt handlers

2012-04-15 Thread Sujit Reddy Thumma
to perform the > optimization only when a real interrupt is signaled by the host > driver and we know there is no point confirming it. > Thanks for putting up formal patch. > Reported-by: Sujit Reddy Thumma > Signed-off-by: Nicolas Pitre > Cc: sta...@kernel.org > > diff

Re: BUG/PATCH? mmcblk devices don't suspend properly.

2012-03-29 Thread Sujit Reddy Thumma
On 3/30/2012 8:17 AM, NeilBrown wrote: I've been experimenting with removing the call to sys_sync() in enter_state(). For me (with verbose debugging and syslog running) this causes a noticeable delay when entering suspend. Removing it should not affect correctness as there is no locking the en

SDIO single irq optimization - Spurious interrupt notification to function driver

2012-03-29 Thread Sujit Reddy Thumma
nstead of reverting it. -- Thanks & Regards, Sujit Reddy Thumma -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] mmc: core: remove waiting time when clkgate_delay is set

2012-02-29 Thread Sujit Reddy Thumma
tick_ns = DIV_ROUND_UP(10, freq); + ndelay(host->clk_delay * tick_ns); + } } else { /* New users appeared while waiting for this work */ spin_unlock_irqrestore(&host->clk_lock, flags); Reviewed-by: Sujit Reddy Thumma Thanks,

Re: [PATCH] mmc: start removing enable / disable API

2012-02-28 Thread Sujit Reddy Thumma
Hi Adrian, On 2/24/2012 4:19 PM, Adrian Hunter wrote: Most parts of the enable / disable API are no longer used and can be removed. Cc: Rajendra Nayak Cc: Venkatraman S Cc: Kukjin Kim Cc: Thomas Abraham Cc: Kyungmin Park Cc: Sekhar Nori Cc: Kevin Hilman Signed-off-by: Adrian Hunter --- arch/a

Re: [PATCH] mmc: core: Ensure clocks are always enabled before host interaction

2012-01-23 Thread Sujit Reddy Thumma
Hi Linus Walleij, On 12/30/2011 7:44 AM, Linus Walleij wrote: On Mon, Dec 12, 2011 at 9:21 AM, Sujit Reddy Thumma wrote: Ensure clocks are always enabled before any interaction with the host controller driver. This makes sure that there is no race between host execution and the core layer

Re: [PATCH] mmc: core: Ensure clocks are always enabled before host interaction

2011-12-26 Thread Sujit Reddy Thumma
On 12/12/2011 2:42 PM, Subhash Jadavani wrote: -Original Message- From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc- ow...@vger.kernel.org] On Behalf Of Sujit Reddy Thumma Sent: Monday, December 12, 2011 1:52 PM To: linux-mmc@vger.kernel.org Cc: Sujit Reddy Thumma; c

Re: [PATCH] mmc: use usleep_range() in mmc_delay()

2011-12-26 Thread Sujit Reddy Thumma
Hi Antipov, Sorry for the delayed response. Please find some comments below: On 12/21/2011 6:35 PM, Dmitry Antipov wrote: On 12/21/2011 03:25 PM, Sujit Reddy Thumma wrote: I have posted similar patch some time back. http://comments.gmane.org/gmane.linux.ports.arm.msm/2119. Would you like to

Re: [PATCH] mmc: use usleep_range() in mmc_delay()

2011-12-21 Thread Sujit Reddy Thumma
On 12/21/2011 12:26 PM, Dmitry Antipov wrote: From f447d78db65c6675e69466e8ed08364ff065ac08 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 21 Dec 2011 10:51:03 +0400 Subject: [PATCH] mmc: use usleep_range() in mmc_delay() --- drivers/mmc/core/core.h | 8 ++-- 1 files changed, 2 in

Re: [PATCH V4] mmc: Kill block requests if card is removed

2011-12-21 Thread Sujit Reddy Thumma
On 12/8/2011 2:52 PM, Adrian Hunter wrote: On 08/12/11 10:35, Sujit Reddy Thumma wrote: Kill block requests when the host realizes that the card is removed from the slot and is sure that subsequent requests are bound to fail. Do this silently so that the block layer doesn't output unnece

[PATCH] mmc: core: Ensure clocks are always enabled before host interaction

2011-12-12 Thread Sujit Reddy Thumma
Ensure clocks are always enabled before any interaction with the host controller driver. This makes sure that there is no race between host execution and the core layer turning off clocks in different context with clock gating framework. Signed-off-by: Sujit Reddy Thumma --- drivers/mmc/core

[PATCH V4] mmc: Kill block requests if card is removed

2011-12-08 Thread Sujit Reddy Thumma
Kill block requests when the host realizes that the card is removed from the slot and is sure that subsequent requests are bound to fail. Do this silently so that the block layer doesn't output unnecessary error messages. Signed-off-by: Sujit Reddy Thumma --- Changes in v4: -

Re: [PATCH V3] mmc: Kill block requests if card is removed

2011-12-06 Thread Sujit Reddy Thumma
Hi Adrian/Per, Any comments on this patch? Thanks, Sujit On 12/1/2011 4:00 PM, Sujit Reddy Thumma wrote: Kill block requests when the host realizes that the card is removed from the slot and is sure that subsequent requests are bound to fail. Do this silently so that the block layer doesn&#

Re: [PATCH-next] mmc: core: Fixup delayed work clock gating patch

2011-12-06 Thread Sujit Reddy Thumma
: Sujit Reddy Thumma Signed-off-by: Stephen Boyd --- Feel free to squash if desired. Documentation/mmc/mmc-dev-attrs.txt |2 +- drivers/mmc/core/host.c |6 +- 2 files changed, 2 insertions(+), 6 deletions(-) Thanks Stephen. diff --git a/Documentation/mmc/mmc-dev

Re: [PATCH] mmc: mmc_test: align max_seg_size

2011-12-02 Thread Sujit Reddy Thumma
> Hi, > > On Mon, Nov 14 2011, Per Forlin wrote: >> If max_seg_size is unaligned, mmc_test_map_sg() may create sg element >> sizes that are not aligned with 512 byte. Fix, align max_seg_size at >> mmc_test_area_init(). >> >> Signed-off-by: Per Forlin >> --- >> drivers/mmc/card/mmc_test.c |1

Re: [PATCH V4] mmc: allow upper layers to determine immediately if a card has been removed

2011-12-01 Thread Sujit Reddy Thumma
waiting for the card device to be removed. Signed-off-by: Adrian Hunter Acked-by: Sujit Reddy Thumma -- Thanks, Sujit -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.

[PATCH V3] mmc: Kill block requests if card is removed

2011-12-01 Thread Sujit Reddy Thumma
Kill block requests when the host realizes that the card is removed from the slot and is sure that subsequent requests are bound to fail. Do this silently so that the block layer doesn't output unnecessary error messages. Signed-off-by: Sujit Reddy Thumma --- Changes in v3: - Dr

Re: [PATCH V3] mmc: allow upper layers to determine immediately if a card has been removed

2011-11-28 Thread Sujit Reddy Thumma
> Add a function mmc_detect_card_removed() which upper layers > can use to determine immediately if a card has been removed. > This function should be called after an I/O request fails so > that all queued I/O requests can be errored out immediately > instead of waiting for the card device to be r

Re: [PATCH V3] mmc: allow upper layers to determine immediately if a card has been removed

2011-11-28 Thread Sujit Reddy Thumma
st *host) > +{ > + int ret; > + > + if (!(host->caps & MMC_CAP_NONREMOVABLE) || !host->bus_ops->alive) This should be just "if ((host->caps & MMC_CAP_NONREMOVABLE) || ...)" Otherwise, Acked-by: Sujit Reddy Thumma > + return 0; > + > +

Re: [PATCH V2] mmc: Kill block requests if card is removed

2011-11-27 Thread Sujit Reddy Thumma
Hi Adrian, On 11/25/2011 4:58 PM, Adrian Hunter wrote: On 25/11/11 12:26, Sujit Reddy Thumma wrote: Hi Adrian, On 11/24/2011 8:22 PM, Adrian Hunter wrote: Hi Here is a way to allow mmc block to determine immediately if a card has been removed while preserving the present rules and keeping

Re: [PATCH V2] mmc: Kill block requests if card is removed

2011-11-25 Thread Sujit Reddy Thumma
Hi Adrian, On 11/24/2011 8:22 PM, Adrian Hunter wrote: Hi Here is a way to allow mmc block to determine immediately if a card has been removed while preserving the present rules and keeping card detection in the bus_ops. Untested I'm afraid. Regards Adrian From 2c6c9535b94c07fa3d12af26e9b

Re: [PATCH V2] mmc: Kill block requests if card is removed

2011-11-24 Thread Sujit Reddy Thumma
> On Thu, Nov 24, 2011 at 12:27 PM, Sujit Reddy Thumma > wrote: >> Hi Per, >> >> On 11/22/2011 6:40 PM, Per Forlin wrote: >>> >>> Hi Sujit, >>> >>> On Tue, Nov 22, 2011 at 11:56 AM, Sujit Reddy Thumma >>>  wrote: >>&g

Re: [PATCH] mmc: core: Kill block requests if card is removed

2011-11-24 Thread Sujit Reddy Thumma
On 11/24/2011 3:00 PM, Per Forlin wrote: Hi David, On Tue, Nov 22, 2011 at 9:18 PM, David Taylor wrote: Sujit Reddy Thumma codeaurora.org> writes: Kill block requests when the host knows that the card is removed from the slot and is sure that subsequent requests are bound to fail.

Re: [PATCH V2] mmc: Kill block requests if card is removed

2011-11-24 Thread Sujit Reddy Thumma
Hi Per, On 11/22/2011 6:40 PM, Per Forlin wrote: Hi Sujit, On Tue, Nov 22, 2011 at 11:56 AM, Sujit Reddy Thumma wrote: Kill block requests when the host knows that the card is removed from the slot and is sure that subsequent requests are bound to fail. Do this silently so that the block

Re: [PATCH] mmc: core: Fix deadlock when the CONFIG_MMC_UNSAFE_RESUME is not defined

2011-11-22 Thread Sujit Reddy Thumma
On 11/22/2011 9:13 PM, Ulf Hansson wrote: Sujit Reddy Thumma wrote: mmc_suspend_host() tries to claim host during suspend and release it only when the bus suspend operation is compeleted. If CONFIG_MMC_UNSAFE_RESUME is defined and the host is flagged as removable, mmc_suspend_host() tries to

[PATCH V2] mmc: core: Fix deadlock when the CONFIG_MMC_UNSAFE_RESUME is not defined

2011-11-22 Thread Sujit Reddy Thumma
trying to acquire host which is already claimed by mmc_suspend_host() causing deadlock. Fix this deadlock by releasing host before ->remove() is called. Signed-off-by: Sujit Reddy Thumma --- Changes in v2: - Addressed review comment from Ulf Hansson. --- drivers/mmc/core/core.c |

[PATCH] mmc: core: Fix deadlock when the CONFIG_MMC_UNSAFE_RESUME is not defined

2011-11-22 Thread Sujit Reddy Thumma
trying to acquire host which is already claimed by mmc_suspend_host() causing deadlock. Fix this deadlock by releasing host before ->remove() is called. Signed-off-by: Sujit Reddy Thumma --- drivers/mmc/core/core.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/driv

[PATCH V2] mmc: Kill block requests if card is removed

2011-11-22 Thread Sujit Reddy Thumma
e.org/gmane.linux.kernel.mmc/2714/focus=3474 Signed-off-by: Sujit Reddy Thumma --- Changes in v2: - Changed the implementation with further comments from Adrian - Set the card removed flag in bus notifier callbacks - This patch is now dependent on patch from Per F

Re: [PATCH] mmc: block: release host in case of error

2011-11-16 Thread Sujit Reddy Thumma
: Per Forlin --- drivers/mmc/card/block.c | 37 + 1 files changed, 29 insertions(+), 8 deletions(-) Tested-by: Sujit Reddy Thumma Thanks Sujit -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message

Re: [PATCH] mmc: mmc_test: align max_seg_size

2011-11-16 Thread Sujit Reddy Thumma
On 11/14/2011 4:34 PM, Per Forlin wrote: If max_seg_size is unaligned, mmc_test_map_sg() may create sg element sizes that are not aligned with 512 byte. Fix, align max_seg_size at mmc_test_area_init(). Signed-off-by: Per Forlin --- drivers/mmc/card/mmc_test.c |1 + 1 files changed, 1 inse

Re: [Query] mmc/sdhci: Suspend hangs if card is inserted at suspend.

2011-11-15 Thread Sujit Reddy Thumma
d_stop(). So it hangs. -- viresh -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Thanks & Regards, Sujit Reddy Thumma Sent by an e

Re: [PATCH V3] mmc: core: Use delayed work in clock gating framework

2011-11-14 Thread Sujit Reddy Thumma
Hi Chris, On 11/14/2011 6:45 PM, Chris Ball wrote: Hi Sujit, On Mon, Nov 14 2011, Sujit Reddy Thumma wrote: Current clock gating framework disables the MCI clock as soon as the request is completed and enables it when a request arrives. This aggressive clock gating framework, when enabled

Re: [PATCH] mmc: core: Kill block requests if card is removed

2011-11-14 Thread Sujit Reddy Thumma
On 11/14/2011 1:54 PM, Per Forlin wrote: On Mon, Nov 14, 2011 at 8:52 AM, Per Forlin wrote: On Mon, Nov 14, 2011 at 5:19 AM, Sujit Reddy Thumma wrote: On 11/10/2011 7:50 PM, Per Forlin wrote: On Thu, Nov 10, 2011 at 10:35 AM, Adrian Hunter wrote: On 10/11/11 06:02, Sujit Reddy Thumma

[PATCH V3] mmc: core: Use delayed work in clock gating framework

2011-11-14 Thread Sujit Reddy Thumma
set to 200ms. Signed-off-by: Sujit Reddy Thumma Acked-by: Linus Walleij --- Changes in v3: - Documentation for sysfs entry is added. Changes in v2: - support for tuning delay via sysfs entry. --- Documentation/mmc/mmc-dev-attrs.txt | 10 ++ drivers/mmc/core/host.c

Re: [PATCH] mmc: core: Kill block requests if card is removed

2011-11-13 Thread Sujit Reddy Thumma
On 11/10/2011 7:50 PM, Per Forlin wrote: On Thu, Nov 10, 2011 at 10:35 AM, Adrian Hunter wrote: On 10/11/11 06:02, Sujit Reddy Thumma wrote: Hi, Hi Adrian, On Wed, Nov 9, 2011 at 10:34 AM, Adrian Hunter wrote: On 09/11/11 06:31, Sujit Reddy Thumma wrote: Kill block requests when the host

Re: [PATCH] mmc: core: Kill block requests if card is removed

2011-11-09 Thread Sujit Reddy Thumma
Hi Per, On 11/10/2011 3:17 AM, Per Forlin wrote: Hi Sujit, On Wed, Nov 9, 2011 at 5:31 AM, Sujit Reddy Thumma wrote: Kill block requests when the host knows that the card is removed from the slot and is sure that subsequent requests are bound to fail. Do this silently so that the block

Re: [PATCH] mmc: core: Kill block requests if card is removed

2011-11-09 Thread Sujit Reddy Thumma
eing NULL. We can do something like this: #define mmc_card_gone(c) (c && ((c)->state & MMC_STATE_CARD_GONE)) Regards, Per -- Thanks & Regards, Sujit Reddy Thumma Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a membe

Re: [PATCH] mmc: core: Kill block requests if card is removed

2011-11-09 Thread Sujit Reddy Thumma
Hi, Hi Adrian, On Wed, Nov 9, 2011 at 10:34 AM, Adrian Hunter wrote: On 09/11/11 06:31, Sujit Reddy Thumma wrote: Kill block requests when the host knows that the card is removed from the slot and is sure that subsequent requests are bound to fail. Do this silently so that the block layer

Re: [PATCH V2] mmc: core: Use delayed work in clock gating framework

2011-11-08 Thread Sujit Reddy Thumma
On 10/27/2011 12:44 PM, Sujit Reddy Thumma wrote: Current clock gating framework disables the MCI clock as soon as the request is completed and enables it when a request arrives. This aggressive clock gating framework, when enabled, cause following issues: When there are back-to-back requests

[PATCH] mmc: core: Kill block requests if card is removed

2011-11-08 Thread Sujit Reddy Thumma
e.org/gmane.linux.kernel.mmc/2714/focus=3474 Signed-off-by: Sujit Reddy Thumma --- drivers/mmc/card/queue.c |5 + drivers/mmc/core/bus.c |2 ++ include/linux/mmc/card.h |3 +++ 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/card/queue.c b/drivers/mmc

[PATCH] mmc: core: Use usleep_range for delays less than 20ms

2011-11-08 Thread Sujit Reddy Thumma
msleep of any delay less than 20ms (or 2 jiffies) would give an unpredictable delay (most of the times as ~20ms). Use usleep_range in mmc_delay() for delays less than two jiffies. Signed-off-by: Sujit Reddy Thumma --- drivers/mmc/core/core.h |2 ++ 1 files changed, 2 insertions(+), 0

Re: [PATCH 1/1] mmc: core: Use delayed work in clock gating framework

2011-10-24 Thread Sujit Reddy Thumma
On 10/24/2011 12:53 PM, Linus Walleij wrote: On Wed, Oct 19, 2011 at 4:48 PM, Sujit Reddy Thumma wrote: Current clock gating framework disables the MCI clock as soon as the request is completed and enables it when a request arrives. This aggressive clock gating framework when enabled cause

Re: [PATCH] mmc: core: Prevent too long response times for suspend

2011-10-19 Thread Sujit Reddy Thumma
_test and initiating suspend. Your patch looks good to me though. Reviewed-by: Sujit Reddy Thumma Your concern seems to be valid for SDIO case, but again the function driver must be intelligent enough to return -EBUSY as it knows that it had posted a request to MMC. For SDIO, should we really

[PATCH 1/1] mmc: core: Use delayed work in clock gating framework

2011-10-19 Thread Sujit Reddy Thumma
the overall throughput compared to if clock gating is disabled. Fix this by delaying turning off the clocks by posting request on delayed workqueue. Also cancel the unscheduled pending work, if any, when there is access to card. Signed-off-by: Sujit Reddy Thumma --- drivers/mmc/core/host.c

Re: [PATCH] mmc: core: Prevent too long response times for suspend

2011-10-14 Thread Sujit Reddy Thumma
> While trying to suspend the mmc host there could still be > ongoing requests that we need to wait for. At the same time > a device driver must respond to a suspend request rather quickly. > > Instead of potentially wait "forever" by claiming the host we now > "try" to claim the host instead. If i

Re: [RFC/PATCH] mmc: core: Kill block requests if card is removed

2011-10-13 Thread Sujit Reddy Thumma
On 10/12/2011 4:04 PM, Pavan Kondeti wrote: Hello Sujit, On 10/12/2011 1:06 PM, Sujit Reddy Thumma wrote: Kill block requests when the host knows that the card is removed from the slot and is sure that it can no longer accept any requests. Kill this silently so that the block layer don&#

[RFC/PATCH] mmc: core: Kill block requests if card is removed

2011-10-12 Thread Sujit Reddy Thumma
Kill block requests when the host knows that the card is removed from the slot and is sure that it can no longer accept any requests. Kill this silently so that the block layer don't output error messages unnecessarily. Signed-off-by: Sujit Reddy Thumma diff --git a/drivers/mmc/card/queu

Re: [PATCH/RFC] mmc: ignore asynchronous calls on dead buses

2011-06-15 Thread Sujit Reddy Thumma
On 6/15/2011 6:58 PM, Guennadi Liakhovetski wrote: MMC host drivers have three main asynchronous event types, that they report to the MMC core: request completions, SDIO interrupts and card hotplug events. Avoid processing these calls during driver removal. Signed-off-by: Guennadi Liakhovetski -

Re: eMMC sector/byte access mode validation

2011-01-04 Thread Sujit Reddy
Hi, Any comments on below mentioned query? Thanks Sujit On Thu, Dec 23, 2010 at 1:35 PM, Sujit Reddy wrote: > Hi, > > According to eMMC spec v4.3, Section 6.1 says that greater than 2GB > density cards are sector addressable and less than 2GB are byte addressable. > But Section

eMMC sector/byte access mode validation

2010-12-23 Thread Sujit Reddy
Hi, According to eMMC spec v4.3, Section 6.1 says that greater than 2GB density cards are sector addressable and less than 2GB are byte addressable. But Section 7.3.3 says that OCR bit 30 needs to be used which access mode the host must use for all its future transactions. In mainline kernel the

mmc: Huge delay is seen when SD card is removed while transferring large media file

2010-11-17 Thread Sujit Reddy
Hi, Scenario: After SD card is inserted and partitions are mounted, start transferring a large media file (for ex: 200MB) to SD. Remove the card in between. Problem: There is a huge delay of ~20secs when the user get notified about the card removal. This delay depends on the size of the file to b