Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1407151pxb; Fri, 21 Jan 2022 17:57:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgherhO2786tU8HZN68M519D22ZugbJxU4x5AvLoBaKkEH+Il2LYBiffr1wcc7cPf7Hv7+ X-Received: by 2002:a17:90a:1b28:: with SMTP id q37mr3296259pjq.48.1642816636369; Fri, 21 Jan 2022 17:57:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642816636; cv=none; d=google.com; s=arc-20160816; b=p6NdeZeJ8QR/8q/+pCWmK5e9H8G6JI5uXRSW/3d5VGnCLCZBCUc3mgfor5P4OXgiWv AZT3tJ8eBIKcbTuHINfOB7zKdGPfc3J+g4M3YCsF1h2SbeIDZSS2rj75I1dobjhjT2jd 24El+RoHwCmxT/VsMS55HojSIbPA1MQGdjUb6pt47lKPwiueFq3yZ0SkdDYsiqoH0w34 fr4mJcw0Mev1wnS9hMY0Vc7pvffJqXJgqKx3WIHRnw7M7O47TudrQETcyypDvLBM8lz/ yalB/8KwRfal9pOefyNLaukP9kLNKo0KvqUSOP/sl48y+1bsVx57CHqAbaC9ly2gdjh+ SGAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fnf2q063vcpul5gnvS1u13+cbRBXFdLS+LpaLMcSRW0=; b=Cmcl/o8ZaSnJA3Lef/ea05C64xGSGnGWRGKk0jO5HUy/LrXEzRCRvWLfBR91U4u80s Y3c194nuduqKe3BveiEK3H2m7AFgq8dMtOz6yM/G1ZQl/W/dP17BInvxz8jeR7q4fE5h lze6acgSJyZW8R1aPdKw4zBR7fjTdRUqSzWp2MzBCX/XtB9ctVTj92mHpExBRzeFQ4OP Qt4PJfAqusW8a95Wz6IafNIQJynQ1Qt9OnUdZxC1cWJ8M7uiI2egUwKoUjMoRobQKVuc KYrp32cLE2UxZMyC5P0WfFL8lzFeEgx5CekDz+LwNEtlJKAuPsm2GMk+Da0IICvWj4/3 6P4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DL9NwM1k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr17si15850955pjb.102.2022.01.21.17.57.04; Fri, 21 Jan 2022 17:57:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DL9NwM1k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381753AbiAUQBe (ORCPT + 99 others); Fri, 21 Jan 2022 11:01:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381745AbiAUQB2 (ORCPT ); Fri, 21 Jan 2022 11:01:28 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FAD5C06173B; Fri, 21 Jan 2022 08:01:27 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id m1so34842354lfq.4; Fri, 21 Jan 2022 08:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=fnf2q063vcpul5gnvS1u13+cbRBXFdLS+LpaLMcSRW0=; b=DL9NwM1kK1Y5IImBYJ5I3+kL5frmhk0ZyBnGvMOmlIXOH5hbzhTHI9FdGWrEoq7xPj VmAxvtd/Eofu7nRtS//4UGtevm+FiTLCWjZYNBVjTpH6lFJudD3nQdNecZ3WbT1vNLKR Dtj407KCBoDQkRnxyKfcMYO8kWxGm7YKp4suFzt5L8HmutPvF98RSUUxj+7zSiNzm2dD puopdbMsKAe3cRvrcfBtCm+vgaKrIV2QFjkZfBdjfv1Yyc2eHKwqNNf3HLRIcxhh3AVQ LB7Q72xzfg8kvBSspW1woE22h82lcqQZv+kOohQuBY7pesAR+tRu0lfJLhRggV7qBWhv w80A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=fnf2q063vcpul5gnvS1u13+cbRBXFdLS+LpaLMcSRW0=; b=UyuJ0b25efeq1XaZLpaVsGnHAqjAZndh/Tal7Qeb4BNFMUmi1fxrXk7oawVkYJzO2a LMKT5oY++7mrJh6oZwYtNc+7RcSCRGigr6uFu107qKWX1RmZKXmeKXrEe1EBvcDm6e89 9vz93v3qt/4N7ShN4XAdHFE4nrIKy7dTD4F6qq7dM9oXzcbHtEFyPF5jfvNW9J+OOvxk 1Csa52a/IilQp0okXDtOmIzfJ0fRaVSeZ80eyYllnAIBnDDEEZeh47s4r/NEvEFSpOGe DbT7ytZV3shAFhY17yBoOkZtYyloud2KxzUb5OVcm4bImd4Sm3JnbP6XSU2rYcfJcHQG idgA== X-Gm-Message-State: AOAM532j+0J2xV1pep4sqoqy8K5x7n0IKg0AlprwZBJZDndUgu2BNeLg 9zvRW9+Bp6trkq+FNVd/Em0= X-Received: by 2002:a19:640f:: with SMTP id y15mr3987172lfb.638.1642780885420; Fri, 21 Jan 2022 08:01:25 -0800 (PST) Received: from localhost ([2a05:3580:f312:6c01:1b6d:df4d:cbec:e4a2]) by smtp.gmail.com with ESMTPSA id r24sm294615lfi.127.2022.01.21.08.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:01:24 -0800 (PST) Date: Fri, 21 Jan 2022 19:01:23 +0300 From: Andrey Skvortsov To: Ulf Hansson Cc: Arnaud Ferraris , Linus Walleij , Avri Altman , Shawn Lin , Huijin Park , Christian =?utf-8?B?TMO2aGxl?= , Yue Hu , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mmc: core: Wait for command setting 'Power Off Notification' bit to complete Message-ID: Mail-Followup-To: Andrey Skvortsov , Ulf Hansson , Arnaud Ferraris , Linus Walleij , Avri Altman , Shawn Lin , Huijin Park , Christian =?utf-8?B?TMO2aGxl?= , Yue Hu , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220115121447.641524-1-andrej.skvortzov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22-01-21 15:32, Ulf Hansson wrote: > On Sat, 15 Jan 2022 at 13:15, Andrey Skvortsov > wrote: > > > > SD card is allowed to signal busy on DAT0 up to 1s after the > > CMD49. According to SD spec (version 6.0 section 5.8.1.3) first host > > waits until busy of CMD49 is released and only then polls Power > > Management Status register up to 1s until the card indicates ready to > > power off. > > > > Without waiting for busy before polling status register sometimes card > > becomes unresponsive and system fails to suspend: > > > > [ 205.907459] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. > > [ 206.421274] sunxi-mmc 1c0f000.mmc: data error, sending stop command > > [ 206.421321] sunxi-mmc 1c0f000.mmc: send stop command failed > > [ 206.421347] mmc0: error -110 reading status reg of PM func > > [ 206.421366] PM: dpm_run_callback(): mmc_bus_suspend+0x0/0x74 returns -110 > > [ 206.421402] mmcblk mmc0:aaaa: PM: failed to suspend async: error -110 > > [ 206.437064] PM: Some devices failed to suspend, or early wake event detected > > > > Tested with Sandisk Extreme PRO A2 64GB on Allwinner A64 system. > > > > Signed-off-by: Andrey Skvortsov > > I did some tests at my side too, using a Qcom platform and it worked > fine. However, I also used the same type of card as you, as I didn't > have any other try with at this moment. > So, applied for fixes and by adding a fixes/stable tag, thanks! Thank you very much. There is one another test report, that this patch fixes suspend with KLEVV CRAS 128GB (K128GUSD6U3-CA). [1] 1. https://gitlab.com/mobian1/issues/-/issues/389#note_816636364 > I also did a minor amendment to the patch, see below. > > Kind regards > Uffe -- Best regards, Andrey Skvortsov