Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2818550ybc; Mon, 18 Nov 2019 05:14:35 -0800 (PST) X-Google-Smtp-Source: APXvYqyDzeAOCcJeZpEeZC+svesru5EF9h6E6pMCPQFNFiZshqLgGBbgAV2m9eELhAwSZpqh3LKe X-Received: by 2002:a17:906:4558:: with SMTP id s24mr26640583ejq.38.1574082875186; Mon, 18 Nov 2019 05:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574082875; cv=none; d=google.com; s=arc-20160816; b=t8KyuRog5aWFQT9ZyRI+94SHDEff6nsT8gwf0xLO1sD2SfT9NmB+gRPu8wbqTngeyD Hlk2gZV7BEFBtHnTZlIeXkfEYDmI78F4BwqhS6UPZTJsXibzYKEM3lGrhQk2xp3mi/ZV LDTy1zFF3LBwgBTWizdwu+q+7OvaR4F7+6Yq0XJTDep0g1mT8C2FB8DOnvYPeUUd/SXj RKL+6T965bMn9R9TaqlFy0h5aaGNbHZl5QYqOA5L5WT8nG3SBQVkcxqqcF+g7EHu6ZiH MVT6lrfWBnlxQ1u68u6gLqEP+1bFGBwT1ZqyBqz4qx5OYEdiXwJ2DZV+8gx+XCxVB7MP eqfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=mr9WfdYenNY5j6q7FL+eHIEixX6YeeRurCUnT8vUnEs=; b=qE+ILu5d6kCYQ/xkyb/Nvs5dUYkfc1FNf1www+aiD+sJF8+iLKJiWFekf4fqiJcwCE JEHfCKcphkmRCDxbHnLEV2HVlq3iZSUHkRvAwULxxJ+rWC+bWdiwQRRS7ANdlhGO/eVO z+dsjRkoxH/7oyWtflCK5xS3mSANeoouNeb0IfXRV2fWqb60fA9TQcgzn0a2CSmS0Wa3 KdPnkTMcW2STWBh/1mnq3X7bbDje060B09Q96pjld0E1CG8u7HC2i4EdpZv3joy4yJhZ CzSI9+4LOpvUNE0Y4+VLTV831Q4LP91SmIq0L5W/iErCc9wlbHcf5pc6CEEqiPTAjy2M BF/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fqB5MnuD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o22si4785389ejr.78.2019.11.18.05.14.11; Mon, 18 Nov 2019 05:14:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fqB5MnuD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727016AbfKRNKU (ORCPT + 99 others); Mon, 18 Nov 2019 08:10:20 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:40758 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726178AbfKRNKU (ORCPT ); Mon, 18 Nov 2019 08:10:20 -0500 Received: by mail-io1-f68.google.com with SMTP id p6so18645718iod.7; Mon, 18 Nov 2019 05:10:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mr9WfdYenNY5j6q7FL+eHIEixX6YeeRurCUnT8vUnEs=; b=fqB5MnuDAxJO3/DiqejJmL5scs9pBMIq5XTY1NeMgvv58+6kp89L0dKnOjrWNtfTJg p70M1sYCh3VS4qTCizRbeoIS/4jvVPWvELlHstpA0nw9GEVek6BlAP5v1uvnHDK/ojbK cevJLmUyCIQ5qg+J8NqpwEJ+dULhmAckc+7xBvVV/JFpUDaE7iBBKuiScgD3yD3jveTt rjPvXohLFrIr0t1SnljYMG0wTN82t1yE46Ng9rqGEgz7jgyOoUMXls+ddmuQKb5pVTkX iGRU6HQ5lz/4oH5eoKImGXsyPGr0M2qd8Ya4MwAvpQThhKZV3KSKgNLEck7KD9tMu+Q7 dAxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mr9WfdYenNY5j6q7FL+eHIEixX6YeeRurCUnT8vUnEs=; b=jL2/m1tokODl8qXThbdH3Um/CDXaS58mC6IJd/qQCcobgbsHeR4ILxZ56AEqWhMfEZ rQYpjsmxfdR/cJ8cghWFgC7Ee3+CUXEnzQaxl3Gj2mdyEGv3QT7XM1NmD7jof5LDMTh4 iDJcAyWIO19lLXZkkfmqH6yNO6TCe4NMfxxVngSFSRIpfl66O3UPryKLa/J8ovDUzz/2 lWJv4vtUBTjb9YhWNDAdFhJOT7jMNjN2E1NHAicHvusRd8uIkhzQD5No6p3yahIO3TRX eolB7HJJEn8nVatTOoorrMW/M/jVJTcoMvlnnb1YZxyi7hm9UwbAg4786DiIMHuIZ0pI hdKQ== X-Gm-Message-State: APjAAAWeJWFIvIWzuPUWSCe6yDdV491XZnlFkxSLwKDVB595MXxlI5JI u7o8T8lJLlZ/t2P1BeqTpJ86AnvVJvJuoQ2NiJ8= X-Received: by 2002:a5d:9547:: with SMTP id a7mr13306711ios.198.1574082619341; Mon, 18 Nov 2019 05:10:19 -0800 (PST) MIME-Version: 1.0 References: <1574049061-11417-1-git-send-email-cang@qti.qualcomm.com> <1574049061-11417-2-git-send-email-cang@qti.qualcomm.com> In-Reply-To: <1574049061-11417-2-git-send-email-cang@qti.qualcomm.com> From: Alim Akhtar Date: Mon, 18 Nov 2019 18:39:43 +0530 Message-ID: Subject: Re: [PATCH v2 1/4] scsi: ufs: Recheck bkops level if bkops is disabled To: Can Guo Cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, Mark Salyzyn , Can Guo , Alim Akhtar , Avri Altman , Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Tomas Winkler , Venkat Gopalakrishnan , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Can On Mon, Nov 18, 2019 at 9:21 AM Can Guo wrote: > > From: Asutosh Das > > Bkops level should be rechecked upon receiving an exception. > Currently the bkops level is being cached and never updated. > > Update the same each time the level is checked. > Also do not use the cached bkops level value if it is disabled > and then enabled. > > Fixes: afdfff59a0e0 (scsi: ufs: handle non spec compliant bkops behaviour by device) > Signed-off-by: Asutosh Das > Signed-off-by: Can Guo > Reviewed-by: Bean Huo > --- Feel free to add Reviewed-by: Alim Akhtar Ran these patches on exynos7 platfrom, and no regression observed, basic read/write works, so Tested-by: Alim Akhtar > drivers/scsi/ufs/ufshcd.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index 3910c58..8e7c362 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -5099,6 +5099,7 @@ static int ufshcd_disable_auto_bkops(struct ufs_hba *hba) > > hba->auto_bkops_enabled = false; > trace_ufshcd_auto_bkops_state(dev_name(hba->dev), "Disabled"); > + hba->is_urgent_bkops_lvl_checked = false; > out: > return err; > } > @@ -5123,6 +5124,7 @@ static void ufshcd_force_reset_auto_bkops(struct ufs_hba *hba) > hba->ee_ctrl_mask &= ~MASK_EE_URGENT_BKOPS; > ufshcd_disable_auto_bkops(hba); > } > + hba->is_urgent_bkops_lvl_checked = false; > } > > static inline int ufshcd_get_bkops_status(struct ufs_hba *hba, u32 *status) > @@ -5169,6 +5171,7 @@ 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; > } > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project > -- Regards, Alim