Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2163002ioo; Mon, 23 May 2022 11:35:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylvPmXmVfwPnm71J1/CWf+s6d53y503WS0Yd41tP54KAfD+yG8+h7owuNlUaa/l1Jr2+wt X-Received: by 2002:a17:902:c945:b0:161:cacb:86e3 with SMTP id i5-20020a170902c94500b00161cacb86e3mr24307541pla.51.1653330900869; Mon, 23 May 2022 11:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653330900; cv=none; d=google.com; s=arc-20160816; b=s0WWqq0cmGfWoCzpLwt2gKJyBb5U9HXtZu9Sj2zNHo2XuOnjXuevc3MRBCqeNHjPFF Hcva7a/smnIgFpbCG0dCru1HaO736EoNaZzGS2HKNNbEVcmYjzkdEaPpqWgmzG+n+i/1 rEeUjr5zNoL7AUgRik0snTxM7hjjZvyByOoQss9PSRfda2LOOSKsUAJcDRaiFq5yeNcf 37K9pMeJqhAxhThcgEolS8R0IVbJSOE/cd8s2eBtgyO5Xwa6LTJqcBBEurnMn1+L08vM HRBg1564oKwdg5uLvonqbYfgwFpJTH6sEAoAg1GKQOOuNziatL1fnfKZSjAvNwGBHlO5 SFkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Tv9kYTPhGmEmFFbz+dnTAWF876XZQCV98AAxLdCmz/g=; b=FKHHaIGsk0rl8ixkaQek6AKdttxWuoOOCZlE8wQHkvzovbiV4qf8RdYC3DFA8Q0/R1 UORViLcuVlgT2NzHKYcPa81dYsH0WaYRa4zaVqq3Sw3SHbPvoQUCuFN9KRdjuh5BMfrZ U/Ebn1euL3Juep9+4putSrjFrRJyh0i4cF2wr/xAcF6Q/C6t8nn92RRAK9JcKBBCwr8R d0nRcJN/j96qaNBSK4SNUlZD8pnSRlvvc3wDPTIfncMFI+2G72KzDWGNr5NbtCqDEnYG c9toDu+qD9ngBzBUTKJQxNmf8CnHejIV8v3+OAzqLoPqyD5myz0fLdggS9RAvTyjKT4o Ac7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mixgavmL; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t15-20020a63460f000000b003fa63edc26bsi4135373pga.495.2022.05.23.11.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 11:35:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mixgavmL; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D72892DA80; Mon, 23 May 2022 11:33:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240754AbiEWRQm (ORCPT + 99 others); Mon, 23 May 2022 13:16:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239715AbiEWRKq (ORCPT ); Mon, 23 May 2022 13:10:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BB436D399; Mon, 23 May 2022 10:10:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7C59B614CA; Mon, 23 May 2022 17:10:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E1F3C385AA; Mon, 23 May 2022 17:10:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653325812; bh=Dwk17qB8Umv7Q1FvMeueRdKSAT9rxi9ymspvcUnMfPU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mixgavmLzXX6hC+nqho9PUjW4IPTvpgAqCH44cJPSFlr0gVBRcKtoKYtD7OyA2MMC k0jtuE/GXn5K6TRcR0OZ+klCdijc3AklHTfRTE0l3NOcy2JFJYOKGzlHwdKN3F4Jmm 6KtQA4Sdqd05lHbeEZp88IDmnBrZKhd+w3TYY0j8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Ulf Hansson , Florian Fainelli Subject: [PATCH 4.19 19/44] mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD Date: Mon, 23 May 2022 19:05:03 +0200 Message-Id: <20220523165756.686861232@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165752.797318097@linuxfoundation.org> References: <20220523165752.797318097@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ulf Hansson commit ad91619aa9d78ab1c6d4a969c3db68bc331ae76c upstream The INAND_CMD38_ARG_EXT_CSD is a vendor specific EXT_CSD register, which is used to prepare an erase/trim operation. However, it doesn't make sense to use a timeout of 10 minutes while updating the register, which becomes the case when the timeout_ms argument for mmc_switch() is set to zero. Instead, let's use the generic_cmd6_time, as that seems like a reasonable timeout to use for these cases. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20200122142747.5690-3-ulf.hansson@linaro.org Signed-off-by: Florian Fainelli Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1133,7 +1133,7 @@ static void mmc_blk_issue_discard_rq(str arg == MMC_TRIM_ARG ? INAND_CMD38_ARG_TRIM : INAND_CMD38_ARG_ERASE, - 0); + card->ext_csd.generic_cmd6_time); } if (!err) err = mmc_erase(card, from, nr, arg); @@ -1175,7 +1175,7 @@ retry: arg == MMC_SECURE_TRIM1_ARG ? INAND_CMD38_ARG_SECTRIM1 : INAND_CMD38_ARG_SECERASE, - 0); + card->ext_csd.generic_cmd6_time); if (err) goto out_retry; } @@ -1193,7 +1193,7 @@ retry: err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, INAND_CMD38_ARG_EXT_CSD, INAND_CMD38_ARG_SECTRIM2, - 0); + card->ext_csd.generic_cmd6_time); if (err) goto out_retry; }