Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2116227ioo; Mon, 23 May 2022 10:24:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoYJlpoU7F2BvniWDCzk4Sf8JdqEX2JgAFU9GXu8UaLYICTURXFkjcQSB2xRlvpXqzt/pR X-Received: by 2002:a17:902:f684:b0:161:8b4d:adf5 with SMTP id l4-20020a170902f68400b001618b4dadf5mr23796232plg.112.1653326648735; Mon, 23 May 2022 10:24:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653326648; cv=none; d=google.com; s=arc-20160816; b=oS+gl72CK3TDO4l5AMjINGb10cO3tIt7GHVjeIvgTn+xX6jw8U5hyEGaNOTSYQpw+7 mdkPwh+EcuoyaEgauiDEO7c+D2QQllco3hQXWWFHpS9GeG929G777fyGfXdPK72+W03G v48o9+9ql585LFgVK8C0TFwFaElzGIrJTCziwVbZGZ7JWuDlk8dEZ6MIrjWWXihtBZz8 XDEttpzAGMEYrdErIR1uTvGk5zP4bCnN8epPKqiOHIi84ZSawifYN8tRSeAR8T8uaQRA SlLp9Q9DoUsiTmvYzPcnF+XNO3xm4fxfqKIwWutPd2586x6fNZWSug0IH/HFMTDyBely x6cQ== 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=C450kysAlRltbzpv+5sN/dyqdHGlMthBzzR+GNWE/Dk=; b=LhTmq1YcXjsYyswPdkaf2tIQ0W5zHpMxMr9jtvmygtYrXT9LoQSf/jT2U5L5iUCdX5 l5b7MdFsrQ5vlTra6QbB6Ni2QcNA+6gJy64uraVzpGyPXBDfaxz9FjSNbLUK3mRefivP VDI7iha/S+Pt4Mrf4ag2kFsWCznRTEqkAj7qEjIg5LH/tp0duzrw5H/SX78SGPzoDZ2h E5i1hNId5nMk3V9cMqDV0OkQdsMlKNyeMgd5OA3g2CSINJWDl3TPqzsAdQ+p1na4YWBX rqVAp50hVV3lrpdSokEyFAZkkxjbiQcBTNSxxSbI/+eAoNTAjXDb4SQSprOT5OmA1KCc LGhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jRodq6Hw; 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 q187-20020a632ac4000000b003aa55f5cad4si9742317pgq.457.2022.05.23.10.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 10:24:08 -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=jRodq6Hw; 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 8272382165; Mon, 23 May 2022 10:23:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240276AbiEWRS7 (ORCPT + 99 others); Mon, 23 May 2022 13:18:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240211AbiEWRQK (ORCPT ); Mon, 23 May 2022 13:16:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53EA769B4E; Mon, 23 May 2022 10:12:47 -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 ams.source.kernel.org (Postfix) with ESMTPS id 3621DB81202; Mon, 23 May 2022 17:12:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F43FC385A9; Mon, 23 May 2022 17:12:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653325950; bh=dJC52LsQXQSZFqjHlNkBmh1vXiFgwOEY/KbXbxy7Beg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jRodq6HwD+YMa3j3M3OCB6PH0/9WY47RkQ0YdZybOtp10iAlhExEJpeZ/6IpABX/R hD1yETTCuKcp8KaYzDfiGPrfTIuLLfRKUVJI1kEY1gsRea71PY/WGXpsXJmjI96Tnr BRXb6PeNzvEyQbgNsylfs9+Mv4Hz6Z4HTjWWjcb0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Ulf Hansson , Florian Fainelli Subject: [PATCH 5.4 20/68] mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD Date: Mon, 23 May 2022 19:04:47 +0200 Message-Id: <20220523165805.976597021@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165802.500642349@linuxfoundation.org> References: <20220523165802.500642349@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 @@ -1126,7 +1126,7 @@ static void mmc_blk_issue_discard_rq(str card->erase_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, card->erase_arg); @@ -1168,7 +1168,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; } @@ -1186,7 +1186,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; }