Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp636980iog; Mon, 13 Jun 2022 09:37:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+wFrk1lmWW45WCN1ccm7gxMJJJSP45kXqJXw85ctqCX94AYb0DcSxeG9037hNmI8Fjl8h X-Received: by 2002:a63:f0d:0:b0:401:9819:c6ee with SMTP id e13-20020a630f0d000000b004019819c6eemr415925pgl.450.1655138223952; Mon, 13 Jun 2022 09:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655138223; cv=none; d=google.com; s=arc-20160816; b=SPDg7l7dNCNwgCsnfcy8AjEcjkRusvMcSRFMjXn66v5DoTtObmAHi0MMI+27E9w35Y zc1VyZS/LHe8hZqtBf/JuYtUpgwHWpKr2ytdugRNHzBFL2tgjtAK6/RXbYYNrkPg4s2g WORq6+ub43syOVv3fzpHVjpq/zV8m0ZmRIGZLdB7msnC+sPQnk6BXTarwpxMKVrVSdFv ZvS4ADaIaZcKR26dfrf6cwudWl6jkgBstA1+unVqHmw6kamjKMwjT1S+wS17ZG27Txhb GUCE8klVanXceL/2rH1B8VBnoEkkiLQNP0arW4B213gEfFtWMB48KQU+91vZFbsbiK7J h3iQ== 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=1Qi/gOgLN4HJYNoygWpqgLkKi1Ru4BgcdZDdWzBk8Nw=; b=OAUXqqX7dZaTxXhq5G3emmYgp+dhvZQi6aFYX3xItBYAxPCIPBj1ivFGPS+EWjN7ZZ 3krzUv4z93V1lXzPJ+h62/IDRWkWe/pkrnyFn1/5d1ysMgh1vgR4GfCEpyOGOH4aUWct Q0FjYCuuXRPLeILgsUXnB9k1XT6aQ6GARIZvycqCsoW0u0h2UptzCfV1oifj+owwsUiy 8pZiiLHKNqYdea1REQ5CQ/kqd0S+5gE4BQDGWfNXLKpe9tPNzS09qKkLO0QCv8h9Ty0L h5RtnsNRCDgb4EzuxpbChVh/6OXGd8rclr2T1I6pOlpSOx25jYTJuuqcbzThK/9jdvU3 iGWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iEdfJF5k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a170902b11600b0016793c0c617si10009344plr.355.2022.06.13.09.36.50; Mon, 13 Jun 2022 09:37:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iEdfJF5k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240537AbiFMOGu (ORCPT + 99 others); Mon, 13 Jun 2022 10:06:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380006AbiFMN7t (ORCPT ); Mon, 13 Jun 2022 09:59:49 -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 3210D8D683; Mon, 13 Jun 2022 04:37:55 -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 0D82C61323; Mon, 13 Jun 2022 11:37:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D16DC34114; Mon, 13 Jun 2022 11:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655120273; bh=9uKvnoG4B7uUYhEFbCpI+laNOBVB1oTWCNAqi04Sf4U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iEdfJF5k8YxPFU7UMPAa0AMpKwbCKXaJKXvI/KHLd/+oqgB9EBmwMWlFSkxusmoY/ tkTw9wq9zUJnVK5HdOrXqaEHGhWO1g5kkgLp4TLtuVoFSRLqgAfthjkO/ChttktHke 6206laWORg1MeLM2gI8mR35GgZ5YmD5xGun2N12M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Ulf Hansson Subject: [PATCH 5.18 313/339] mmc: block: Fix CQE recovery reset success Date: Mon, 13 Jun 2022 12:12:18 +0200 Message-Id: <20220613094936.244498816@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094926.497929857@linuxfoundation.org> References: <20220613094926.497929857@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=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: Adrian Hunter commit a051246b786af7e4a9d9219cc7038a6e8a411531 upstream. The intention of the use of mmc_blk_reset_success() in mmc_blk_cqe_recovery() was to prevent repeated resets when retrying and getting the same error. However, that may not be the case - any amount of time and I/O may pass before another recovery is needed, in which case there would be no reason to deny it the opportunity to recover via a reset if necessary. CQE recovery is expected seldom and failure to recover (if the clear tasks command fails), even more seldom, so it is better to allow the reset always, which can be done by calling mmc_blk_reset_success() always. Fixes: 1e8e55b67030c6 ("mmc: block: Add CQE support") Cc: stable@vger.kernel.org Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20220531171922.76080-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/block.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -1482,8 +1482,7 @@ void mmc_blk_cqe_recovery(struct mmc_que err = mmc_cqe_recovery(host); if (err) mmc_blk_reset(mq->blkdata, host, MMC_BLK_CQE_RECOVERY); - else - mmc_blk_reset_success(mq->blkdata, MMC_BLK_CQE_RECOVERY); + mmc_blk_reset_success(mq->blkdata, MMC_BLK_CQE_RECOVERY); pr_debug("%s: CQE recovery done\n", mmc_hostname(host)); }