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=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT 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 E26D6C3A5A5 for ; Thu, 5 Sep 2019 07:53:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BBE982173B for ; Thu, 5 Sep 2019 07:53:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732342AbfIEHx3 (ORCPT ); Thu, 5 Sep 2019 03:53:29 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:43556 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729366AbfIEHx2 (ORCPT ); Thu, 5 Sep 2019 03:53:28 -0400 X-UUID: c510fcd413834ba6bf1fd53ee9a77ea9-20190905 X-UUID: c510fcd413834ba6bf1fd53ee9a77ea9-20190905 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 932262458; Thu, 05 Sep 2019 15:53:22 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 5 Sep 2019 15:53:19 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 5 Sep 2019 15:53:18 +0800 From: Chaotian Jing To: Ulf Hansson CC: Matthias Brugger , Jens Axboe , Hannes Reinecke , Chaotian Jing , Avri Altman , YueHaibing , Wolfram Sang , Ming Lei , Chris Boot , Zachary Hays , , , , , Subject: [PATCH v2] fix device in programming state after ioctl() Date: Thu, 5 Sep 2019 15:53:16 +0800 Message-ID: <20190905075318.15554-1-chaotian.jing@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v2 vs v1: base on Avri's comment, drop the ioctl_rpmb_card_status_poll() the user space program may access eMMC by ioctl(), after the ioctl() was completed, it should ensure that eMMC is in transfer state, or it will cause other thread which access eMMC got timeout error, as it assume that card was in transfer state. this patch add CMD13 polling for R1B command to avoid this issue. Chaotian Jing (2): mmc: block: make the card_busy_detect() more generic mmc: block: add CMD13 polling for ioctl() cmd with R1B response drivers/mmc/core/block.c | 150 +++++++++++++++------------------------ 1 file changed, 57 insertions(+), 93 deletions(-) -- 2.18.0