From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 583C9C3A5A9 for ; Thu, 5 Sep 2019 02:55:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 261EF2087E for ; Thu, 5 Sep 2019 02:55:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730986AbfIECzr (ORCPT ); Wed, 4 Sep 2019 22:55:47 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:41955 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727156AbfIECzr (ORCPT ); Wed, 4 Sep 2019 22:55:47 -0400 X-UUID: d9901c0c1e464b65a24bbe661a4e278f-20190905 X-UUID: d9901c0c1e464b65a24bbe661a4e278f-20190905 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1309410172; Thu, 05 Sep 2019 10:55:40 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 5 Sep 2019 10:55:36 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 5 Sep 2019 10:55:34 +0800 Message-ID: <1567652136.11483.1.camel@mhfsdcap03> Subject: Re: [PATCH 2/2] mmc: block: add CMD13 polling for ioctl() cmd with R1B response From: Chaotian Jing To: Avri Altman CC: Ulf Hansson , Matthias Brugger , Jens Axboe , Hannes Reinecke , YueHaibing , Wolfram Sang , Ming Lei , "Chris Boot" , Zachary Hays , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , "srv_heupstream@mediatek.com" Date: Thu, 5 Sep 2019 10:55:36 +0800 In-Reply-To: References: <20190904075444.2163-1-chaotian.jing@mediatek.com> <20190904075444.2163-3-chaotian.jing@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-09-04 at 14:11 +0000, Avri Altman wrote: > > static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct > > mmc_blk_data *md, > > struct mmc_blk_ioc_data *idata) > > { > > @@ -623,6 +675,9 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card > > *card, struct mmc_blk_data *md, > > __func__, status, err); > > } > > > > + if (!err && (cmd.flags & MMC_RSP_R1B)) > > + err = card_busy_detect(card, MMC_BLK_TIMEOUT_MS, NULL); > > + > > return err; > > } > You have both the R1B flag check, and status poll (for rpmb) few line above. > Maybe you could re-use it. > It will both simplify this patch, and save the tad optimization of your first patch. > > Thanks, > Avri So that we can drop the ioctl_rpmb_card_status_poll() as it do almost the same thing with card_busy_detect(). From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chaotian Jing Subject: Re: [PATCH 2/2] mmc: block: add CMD13 polling for ioctl() cmd with R1B response Date: Thu, 5 Sep 2019 10:55:36 +0800 Message-ID: <1567652136.11483.1.camel@mhfsdcap03> References: <20190904075444.2163-1-chaotian.jing@mediatek.com> <20190904075444.2163-3-chaotian.jing@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Avri Altman Cc: Ulf Hansson , Matthias Brugger , Jens Axboe , Hannes Reinecke , YueHaibing , Wolfram Sang , Ming Lei , Chris Boot , Zachary Hays , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , "srv_heupstream@mediatek.com" List-Id: linux-mmc@vger.kernel.org On Wed, 2019-09-04 at 14:11 +0000, Avri Altman wrote: > > static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct > > mmc_blk_data *md, > > struct mmc_blk_ioc_data *idata) > > { > > @@ -623,6 +675,9 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card > > *card, struct mmc_blk_data *md, > > __func__, status, err); > > } > > > > + if (!err && (cmd.flags & MMC_RSP_R1B)) > > + err = card_busy_detect(card, MMC_BLK_TIMEOUT_MS, NULL); > > + > > return err; > > } > You have both the R1B flag check, and status poll (for rpmb) few line above. > Maybe you could re-use it. > It will both simplify this patch, and save the tad optimization of your first patch. > > Thanks, > Avri So that we can drop the ioctl_rpmb_card_status_poll() as it do almost the same thing with card_busy_detect(). From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 206B2C3A5A9 for ; Thu, 5 Sep 2019 02:55:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E652C20882 for ; Thu, 5 Sep 2019 02:55:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="V7aJtqO6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E652C20882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mrVoKZnOBz0BSF5dLlgwRFrhewv+NJT4QZo6QSrE1+4=; b=V7aJtqO6aeHvjP bNQ6M/KUaBOKUwlkg9aah0P57/xm1SLLuAKFKbOUBzQ+LKK7UF2Gyc+PNQ3Tb5KGizkr/Nt0KCKh1 QR+OifIOlJfvMeNE7A3MfFTwLyEtGR4H1SY29I07XRjkVyZt88z4ZQupiBOWvaDMQrXpcjP+sylag IR4rbUdBxz6j/xDS+selGWxnwlKI+1Nf4NMoxqT/ARbw6CN6QtroYDn/TrBzGAtIromTrQfQ4dj6m 9zXvivfo/pR6HmGp7tQ0J07leq+SsUstoeeVNs8b60HlyVIO3AwbkHGTlX3VOva9SrwnX0JpIYvwe kS88XOBzGau6B+UCkf2A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5hw9-0000GY-SY; Thu, 05 Sep 2019 02:55:53 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5hw5-0000F7-Th; Thu, 05 Sep 2019 02:55:51 +0000 X-UUID: 2a4163641d4d48c185f742c31b1324ae-20190904 X-UUID: 2a4163641d4d48c185f742c31b1324ae-20190904 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 784677791; Wed, 04 Sep 2019 18:55:39 -0800 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 4 Sep 2019 19:55:38 -0700 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 5 Sep 2019 10:55:36 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 5 Sep 2019 10:55:34 +0800 Message-ID: <1567652136.11483.1.camel@mhfsdcap03> Subject: Re: [PATCH 2/2] mmc: block: add CMD13 polling for ioctl() cmd with R1B response From: Chaotian Jing To: Avri Altman Date: Thu, 5 Sep 2019 10:55:36 +0800 In-Reply-To: References: <20190904075444.2163-1-chaotian.jing@mediatek.com> <20190904075444.2163-3-chaotian.jing@mediatek.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190904_195549_969375_C76CC5B7 X-CRM114-Status: GOOD ( 11.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , Ulf Hansson , Chris Boot , "srv_heupstream@mediatek.com" , "linux-mmc@vger.kernel.org" , Zachary Hays , YueHaibing , "linux-kernel@vger.kernel.org" , Ming Lei , Wolfram Sang , "linux-mediatek@lists.infradead.org" , Hannes Reinecke , Matthias Brugger , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 2019-09-04 at 14:11 +0000, Avri Altman wrote: > > static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct > > mmc_blk_data *md, > > struct mmc_blk_ioc_data *idata) > > { > > @@ -623,6 +675,9 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card > > *card, struct mmc_blk_data *md, > > __func__, status, err); > > } > > > > + if (!err && (cmd.flags & MMC_RSP_R1B)) > > + err = card_busy_detect(card, MMC_BLK_TIMEOUT_MS, NULL); > > + > > return err; > > } > You have both the R1B flag check, and status poll (for rpmb) few line above. > Maybe you could re-use it. > It will both simplify this patch, and save the tad optimization of your first patch. > > Thanks, > Avri So that we can drop the ioctl_rpmb_card_status_poll() as it do almost the same thing with card_busy_detect(). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel