From patchwork Fri Jul 1 00:06:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 933812 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6109H1U006405 for ; Fri, 1 Jul 2011 00:09:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753652Ab1GAAJy (ORCPT ); Thu, 30 Jun 2011 20:09:54 -0400 Received: from na3sys009aog105.obsmtp.com ([74.125.149.75]:57078 "EHLO na3sys009aog105.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752533Ab1GAAJx convert rfc822-to-8bit (ORCPT ); Thu, 30 Jun 2011 20:09:53 -0400 Received: from sc-owa02.marvell.com ([65.219.4.130]) (using TLSv1) by na3sys009aob105.postini.com ([74.125.148.12]) with SMTP ID DSNKTg0QTrigIYibs1RY3MeUIbjKR7jlNLxU@postini.com; Thu, 30 Jun 2011 17:09:53 PDT Received: from SC-vEXCH3.marvell.com ([10.93.76.133]) by sc-owa02.marvell.com ([10.93.76.22]) with mapi; Thu, 30 Jun 2011 17:06:46 -0700 From: Philip Rakity To: "linux-mmc@vger.kernel.org" CC: Chris Ball , Jaehoon Chung Date: Thu, 30 Jun 2011 17:06:44 -0700 Subject: Bus Width Testing on Suspend/Resume (REGRESSION) Thread-Topic: Bus Width Testing on Suspend/Resume (REGRESSION) Thread-Index: Acw3gsP27p3akkGcRBGw9EDmBbhIEg== Message-ID: <840AA935-2855-41D1-B1DF-49D30FF52C01@marvell.com> References: <4E0D0D4E.3050404@samsung.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 01 Jul 2011 00:09:54 +0000 (UTC) Begin forwarded message: > From: Jaehoon Chung > Date: June 30, 2011 4:57:02 PM PDT > To: Philip Rakity > Cc: Chris Ball > 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 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 Signed-off-by: Jaehoon Chung --- 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