All of lore.kernel.org
 help / color / mirror / Atom feed
* Bus Width Testing on Suspend/Resume  (REGRESSION)
       [not found] <4E0D0D4E.3050404@samsung.com>
@ 2011-07-01  0:06 ` Philip Rakity
  2011-07-01  2:25   ` Philip Rakity
  0 siblings, 1 reply; 2+ messages in thread
From: Philip Rakity @ 2011-07-01  0:06 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Jaehoon Chung



Begin forwarded message:

> From: Jaehoon Chung <jh80.chung@samsung.com>
> Date: June 30, 2011 4:57:02 PM PDT
> To: Philip Rakity <prakity@marvell.com>
> Cc: Chris Ball <cjb@laptop.org>
> Subject: Re: Bus Width Testing on Suspend/Resume (REGRESSION)
> 
> Hi Philip..
> 
> I tested this patch..it's working fine on suspend/resume..
> 
> But you mentioned on comment, in future, we can avoid the bus-testing
> on suspend/resume.
> (if know what bus-width card support and assume non-removable)
> 
> I added the Signed-Off in the patch.
> 
> Who send this patch to mailing? you or me?
> 
> Jaehoon
> 




>From 68fdf54ae07cf85c30f210e09d3c811daf3b0219 Mon Sep 17 00:00:00 2001
From: Philip Rakity <prakity@marvell.com>
Date: Thu, 30 Jun 2011 11:50:50 -0700
Subject: [PATCH] mmc: Bus width testing needs to handle suspend/resume

We need to read the ext_csd when doing bus width testing for
old cards to ensure test is run correctly.

We can avoid the ddr / bus width testing in future by refactoring
the code but this is a more extensive mod and needs careful
thought.

Signed-off-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/core/mmc.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 2a7e43b..4da35a7 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -614,17 +614,17 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
 			goto free_card;
 	}
 
-	if (!oldcard) {
-		/*
-		 * Fetch and process extended CSD.
-		 */
+	/*
+	 * Fetch and process extended CSD.
+	 */
+	err = mmc_get_ext_csd(card, &ext_csd);
+	if (err)
+		goto free_card;
+	err = mmc_read_ext_csd(card, ext_csd);
+	if (err)
+		goto free_card;
 
-		err = mmc_get_ext_csd(card, &ext_csd);
-		if (err)
-			goto free_card;
-		err = mmc_read_ext_csd(card, ext_csd);
-		if (err)
-			goto free_card;
+	if (!oldcard) {
 
 		/* If doing byte addressing, check if required to do sector
 		 * addressing.  Handle the case of <2GB cards needing sector
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Bus Width Testing on Suspend/Resume  (REGRESSION)
  2011-07-01  0:06 ` Bus Width Testing on Suspend/Resume (REGRESSION) Philip Rakity
@ 2011-07-01  2:25   ` Philip Rakity
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Rakity @ 2011-07-01  2:25 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Jaehoon Chung


Chris,

More information on patch.

oldcard will be set on a resume call.  We will not get and process mmc_get_ext_csd
needed to test bus_width. correctly.

Philip


On Jun 30, 2011, at 5:06 PM, Philip Rakity wrote:

> 
> 
> Begin forwarded message:
> 
>> From: Jaehoon Chung <jh80.chung@samsung.com>
>> Date: June 30, 2011 4:57:02 PM PDT
>> To: Philip Rakity <prakity@marvell.com>
>> Cc: Chris Ball <cjb@laptop.org>
>> Subject: Re: Bus Width Testing on Suspend/Resume (REGRESSION)
>> 
>> Hi Philip..
>> 
>> I tested this patch..it's working fine on suspend/resume..
>> 
>> But you mentioned on comment, in future, we can avoid the bus-testing
>> on suspend/resume.
>> (if know what bus-width card support and assume non-removable)
>> 
>> I added the Signed-Off in the patch.
>> 
>> Who send this patch to mailing? you or me?
>> 
>> Jaehoon
>> 
> 
> 
> 
> 
> From 68fdf54ae07cf85c30f210e09d3c811daf3b0219 Mon Sep 17 00:00:00 2001
> From: Philip Rakity <prakity@marvell.com>
> Date: Thu, 30 Jun 2011 11:50:50 -0700
> Subject: [PATCH] mmc: Bus width testing needs to handle suspend/resume
> 
> We need to read the ext_csd when doing bus width testing for
> old cards to ensure test is run correctly.
> 
> We can avoid the ddr / bus width testing in future by refactoring
> the code but this is a more extensive mod and needs careful
> thought.
> 
> Signed-off-by: Philip Rakity <prakity@marvell.com>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
> drivers/mmc/core/mmc.c |   20 ++++++++++----------
> 1 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 2a7e43b..4da35a7 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -614,17 +614,17 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
> 			goto free_card;
> 	}
> 
> -	if (!oldcard) {
> -		/*
> -		 * Fetch and process extended CSD.
> -		 */
> +	/*
> +	 * Fetch and process extended CSD.
> +	 */
> +	err = mmc_get_ext_csd(card, &ext_csd);
> +	if (err)
> +		goto free_card;
> +	err = mmc_read_ext_csd(card, ext_csd);
> +	if (err)
> +		goto free_card;
> 
> -		err = mmc_get_ext_csd(card, &ext_csd);
> -		if (err)
> -			goto free_card;
> -		err = mmc_read_ext_csd(card, ext_csd);
> -		if (err)
> -			goto free_card;
> +	if (!oldcard) {
> 
> 		/* If doing byte addressing, check if required to do sector
> 		 * addressing.  Handle the case of <2GB cards needing sector
> -- 
> 1.7.0.4
> 
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-01  2:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4E0D0D4E.3050404@samsung.com>
2011-07-01  0:06 ` Bus Width Testing on Suspend/Resume (REGRESSION) Philip Rakity
2011-07-01  2:25   ` Philip Rakity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.