Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2108853ioo; Mon, 23 May 2022 10:14:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9uZYZ6K2eEeoj1KmVWMHDonEHU08Uemn28wb2IFZvg+FheI2FNXBV9y42xDKpOprZP4WK X-Received: by 2002:a05:6a00:174f:b0:4fd:aed5:b5e4 with SMTP id j15-20020a056a00174f00b004fdaed5b5e4mr24633243pfc.39.1653326053025; Mon, 23 May 2022 10:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653326053; cv=none; d=google.com; s=arc-20160816; b=Mdr2HJEn6q3Js0avuN8t4Zf7BngriOr/JeKkFjNOCV5K/kBcU1RUx0udRHfYxwtS2A 9A5TS5FE2W/7JZcDCZ0r7NtVRONjHHZiA1Ii6//bk33VzSuQU8ua8VXsa0h0vqMgz18a kHmorYwH3f2tFfFZIDXhlmhbrd3nZBhPDqZ/3cq+aVvj01FLe5KRpCsEyhawMZaKZaP1 yLsrFsAH3fbS08ERo3dO92YniHN0viZuU9VFvivizDvPRfeGqDMCyXlS8CCyrqbl8ghY QAaHDK08r6vHAypv7g1nnMrYjm++6UAwBzuWApRtn+GU2WggTEoczYhr7OjApjJdjI80 Actg== 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=FZpBSYM1UQGPYS7FRSLhjurYYWrCZ8eryVRS0hhsKYU=; b=D/FFNfWSUE9JvLlm6Mm/Qr15L+TU8cayphCYzrVFphDFCmgkJzDKsWsJUChcbqTeqB nnU0iboeBpgHeciVfPUP31bwqplNq5dpGmoFRtDIepT+dQRNL7oMUpf3debkK+JKeRSV DFsiPePYPHFknOcNgqIuO9UXMygNLKvexipd0V5veaZIDU8be6aKeISVexAQdH0T4kMm 3HAniQ50u6vH+7/Cjixze4Ofd7BDNvar6oiyLS0dhu7MdP+miYMfEUq8kzhnAcDT9VIH J8DzIdDiQu9jdmlan3rKnToCFpo6B5EtE2fHqVzEkBIbeILCBdM6k93xKc6culuLsI0n 7dfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bph8p0ZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y10-20020a170902b48a00b0015ec10f7e3bsi9501198plr.82.2022.05.23.10.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:14:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bph8p0ZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 4E6616B7D8; Mon, 23 May 2022 10:13:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239494AbiEWRJv (ORCPT + 99 others); Mon, 23 May 2022 13:09:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239642AbiEWRJW (ORCPT ); Mon, 23 May 2022 13:09:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17AB16CF4B; Mon, 23 May 2022 10:08:58 -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 F1161614E5; Mon, 23 May 2022 17:08:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED3FBC385A9; Mon, 23 May 2022 17:08:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653325714; bh=6jhRKQnWsBNV7uoEmE4x1UeX87wkijtPfVy9slE/kHA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bph8p0ZDg2sVWJWvimWeC9mkSYEdNjZmxR9fUnE+oY1w1HordoEeM5FXo2OFwhjsz iUqh06SjqemRld87wgQKrMSus8dj4xmbcBHyzM7DAvoqJ1ooRJTdVYkM/hvucD9QhU nhuen5wTLbgAPF1PKQIcLifWfftqRI29vii/XKxg= 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.14 12/33] mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD Date: Mon, 23 May 2022 19:05:01 +0200 Message-Id: <20220523165749.737323588@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165746.957506211@linuxfoundation.org> References: <20220523165746.957506211@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 @@ -1345,7 +1345,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); @@ -1387,7 +1387,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; } @@ -1405,7 +1405,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; }