From patchwork Wed Sep 8 01:03:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bing Zhao X-Patchwork-Id: 178202 Return-path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on void.printf.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.9 tests=RCVD_IN_DNSWL_LOW autolearn=disabled version=3.2.5 Envelope-to: chris@printf.net Delivery-date: Wed, 08 Sep 2010 02:03:46 +0100 Received: from lists.laptop.org ([18.85.2.145] helo=mail.laptop.org) by void.printf.net with esmtp (Exim 4.69) (envelope-from ) id 1Ot94e-0007DO-Cf for chris@printf.net; Wed, 08 Sep 2010 02:03:42 +0100 Received: by mail.laptop.org (Postfix) id 4ED4824497; Tue, 7 Sep 2010 21:03:20 -0400 (EDT) Delivered-To: cjb@laptop.org Received: from spam.laptop.org (spam.laptop.org [18.85.46.23]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.laptop.org (Postfix) with ESMTPS id F337324494 for ; Tue, 7 Sep 2010 21:03:19 -0400 (EDT) X-ASG-Debug-ID: 1283907817-0b7484570001-zHW3sV Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by spam.laptop.org with ESMTP id cG6htuxoY7lcDunC for ; Tue, 07 Sep 2010 21:03:37 -0400 (EDT) X-Barracuda-Envelope-From: linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756829Ab0IHBDg (ORCPT ); Tue, 7 Sep 2010 21:03:36 -0400 Received: from dakia3.marvell.com ([65.219.4.28]:54530 "EHLO dakia3.marvell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755369Ab0IHBDg convert rfc822-to-8bit (ORCPT ); Tue, 7 Sep 2010 21:03:36 -0400 Received: from sc-owa02.marvell.com (sc-owa02.marvell.com [10.93.76.22]) by dakia3.marvell.com with ESMTP id eTLRQ6itDCFqu23j (version=TLSv1 cipher=RC4-MD5 bits=128 verify=NO); Tue, 07 Sep 2010 18:03:35 -0700 (PDT) Received: from SC-VEXCH1.marvell.com ([10.93.76.137]) by sc-owa02.marvell.com ([10.93.76.22]) with mapi; Tue, 7 Sep 2010 18:03:34 -0700 From: Bing Zhao To: Nicolas Pitre CC: "linux-mmc@vger.kernel.org" , Michal Miroslaw , Chris Ball , Andrew Morton Date: Tue, 7 Sep 2010 18:03:33 -0700 X-ASG-Orig-Subj: RE: [PATCH v2] sdio: skip initialization on powered resume Subject: RE: [PATCH v2] sdio: skip initialization on powered resume Thread-Topic: [PATCH v2] sdio: skip initialization on powered resume Thread-Index: ActK9tBBVDxJJ/T5T9GlC+vXNLDp7gD+NZ8g Message-ID: <477F20668A386D41ADCC57781B1F704307D2FE4A0F@SC-VEXCH1.marvell.com> References: <1283391692-14150-1-git-send-email-bzhao@marvell.com> <477F20668A386D41ADCC57781B1F704307D2F41B27@SC-VEXCH1.marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Virus-Scanned: by bsmtpd at marvell.com Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Barracuda-Connect: vger.kernel.org[209.132.180.67] X-Barracuda-Start-Time: 1283907817 X-Barracuda-URL: http://18.85.46.23:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at laptop.org X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.5 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.40236 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index f332c52..37f64d6 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -434,28 +434,32 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, goto finish; } - /* - * Read the common registers. - */ - err = sdio_read_cccr(card); - if (err) - goto remove; + if (!powered_resume) { + /* + * Read the common registers. + */ + err = sdio_read_cccr(card); + if (err) + goto remove; - /* - * Read the common CIS tuples. - */ - err = sdio_read_common_cis(card); - if (err) - goto remove; + /* + * Read the common CIS tuples. + */ + err = sdio_read_common_cis(card); + if (err) + goto remove; + } if (oldcard) { - int same = (card->cis.vendor == oldcard->cis.vendor && - card->cis.device == oldcard->cis.device); mmc_remove_card(card); - if (!same) - return -ENOENT; - card = oldcard; + if (!powered_resume) { + int same = (card->cis.vendor == oldcard->cis.vendor && + card->cis.device == oldcard->cis.device); + if (!same) + return -ENOENT; + } + return 0; }