From patchwork Tue Jun 23 19:57:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 223315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 335C0C433E0 for ; Tue, 23 Jun 2020 20:59:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 060F720738 for ; Tue, 23 Jun 2020 20:59:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592945964; bh=UWQo63BRWEbXIFQzqijxRau/lIEkgntDCP9IwcNaUEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=TOF2TEJf1cB4V44MefnhPN0rn3s/IkYpGFu+47YGAAe2tEPRFXT5B5J5QNsFSQot2 XvgjxHdwQq49N2ZyxgQATK5BFRi07SjVmSo01OrrCdMbFxPNqQc9OrJGaUJf3sXTnD 67FRIweoJn5eEQB6Guk1dWI3iafoOWAtnq3JoA1Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392315AbgFWU7L (ORCPT ); Tue, 23 Jun 2020 16:59:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:37732 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387624AbgFWUlS (ORCPT ); Tue, 23 Jun 2020 16:41:18 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE66620675; Tue, 23 Jun 2020 20:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592944879; bh=UWQo63BRWEbXIFQzqijxRau/lIEkgntDCP9IwcNaUEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MB9Qo4ADA8FSii9LV6AskVFZFwONwXpXnjQyFSmjwKsXTb5c0r7DGvYJ4JsJQ2Cg5 rlYrJWaray8mUFynb45bDXpYHCAZdlh+kGbXUMBMeBheVPbhBnEPL0zLFyRrCtiJvv 0mCW3pDSuG4/JHNYeyGeXOmYB65A+NHNRcpZA54M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stanley Chu , Can Guo , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 130/206] scsi: ufs: Dont update urgent bkops level when toggling auto bkops Date: Tue, 23 Jun 2020 21:57:38 +0200 Message-Id: <20200623195323.369475361@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195316.864547658@linuxfoundation.org> References: <20200623195316.864547658@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Can Guo [ Upstream commit be32acff43800c87dc5c707f5d47cc607b76b653 ] Urgent bkops level is used to compare against actual bkops status read from UFS device. Urgent bkops level is set during initialization and might be updated in exception event handler during runtime. But it should not be updated to the actual bkops status every time when auto bkops is toggled. Otherwise, if urgent bkops level is updated to 0, auto bkops shall always be kept enabled. Link: https://lore.kernel.org/r/1590632686-17866-1-git-send-email-cang@codeaurora.org Fixes: 24366c2afbb0 ("scsi: ufs: Recheck bkops level if bkops is disabled") Reviewed-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/ufs/ufshcd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 803d67b3a1666..bd21c9cdf8183 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5122,7 +5122,6 @@ static int ufshcd_bkops_ctrl(struct ufs_hba *hba, err = ufshcd_enable_auto_bkops(hba); else err = ufshcd_disable_auto_bkops(hba); - hba->urgent_bkops_lvl = curr_status; out: return err; }