Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3205506pxu; Tue, 8 Dec 2020 06:18:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2eIfnXz/94bBo/TBm8C0OMGgi7wuifLX3nj+64KzO2wIQhwhbF98Q86Au84yo5QudVpOk X-Received: by 2002:a50:a694:: with SMTP id e20mr24741369edc.261.1607437133146; Tue, 08 Dec 2020 06:18:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607437133; cv=none; d=google.com; s=arc-20160816; b=RMZobJaNOt95xWldH1uWCagQspImny/CSOGZrYxawogl0OgOkgL4qXSKtyIvCT7bJg NuHtinbeqHsldjSH5ClKHIdXP/UNRNj9PSUQRVeYYD5xIidQd3GXcl5WFqDTGKgRqqYI KrV7NklgrImk1aTzYlrzKHx+NBuJ6KonqV/U41kFK30FRdVxcdPDJj8qrIS2Z023B31v Z497LA/S5qMUhcy18AvjyLhv5PE6e9NJih3XAH9KNaC6hmuoBDeJ4wSaEPfw2v+QxTju fph+DuVsvdQLAX8idiHbRb434+SO0SkS/pd2j9VtJhKTGGMiwlPYyGtRIc28W+nLvxTK iaqg== 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 :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=eSPfpQbfD8TtnWjYs+6jj8qzhsWODAim1cckJ/MJTu0=; b=iF7G0Nv0Cd/zENu7uImNaYZoy/jVmHv0br+GucYb3h12JNRj9c3JqncLSVo0ESqEZr wLlwmhUUI1rUa67IyZAfkJv/kd+WaxYSEcz8U6cJ4HqfiBCbVnS4bD1l2ptwlndtd1yk /wwjYtQmX9nfKCtE7elqwXsrvj+li/FjDDdG3Wi0QYmoJ5L/ONG/Wme+G2Ky56paAVfh vIPdQHB6chEfrKu/whLKb/sLYAjZ7unvmVU3RhGCxo5TXTwcU+sHhPIxvGvVVtuFCF3n FXXgs5lNjMghaVGT3sY+2JtMWk6QB+MynfeJ7UwbGMd0DsvFy5OM16u74IePMFdlYGKY M4oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pMxp4TNM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id z41si10608066ede.411.2020.12.08.06.18.26; Tue, 08 Dec 2020 06:18:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pMxp4TNM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729658AbgLHOO2 (ORCPT + 99 others); Tue, 8 Dec 2020 09:14:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729457AbgLHOO1 (ORCPT ); Tue, 8 Dec 2020 09:14:27 -0500 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22BB7C061749; Tue, 8 Dec 2020 06:13:47 -0800 (PST) Received: by mail-ed1-x543.google.com with SMTP id c7so17719327edv.6; Tue, 08 Dec 2020 06:13:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=eSPfpQbfD8TtnWjYs+6jj8qzhsWODAim1cckJ/MJTu0=; b=pMxp4TNM4M+N05Yx9TQgHM79zWQBDbpvpnmuI555O1zxarA53NmboJkgdjPiAvm2rk tA5Nxy3pEFTL8n62f5NDpQA2anFbpBzV6UuZnAmMdt23xIg1F4mQWZtvO0Ea4oWZhiqR Mk788rhqKcb8Z+qCwERSPi7jnRwjPYRDARTP9lDWSyID9m+1ZcJ8ccjghI6h6AZrh5C3 2AdQvAAw5BgPumeEHZboIkxXk2yESbZyjnBCrArWoBb7TIKKaC+w3ANmYjV5CD8tdlck yGAsthsXggHQnxbc/Why3OhoTu2e/oBSBGMEEPYd2fLqeayYYbcl1HqO0wDamcPNgkdF OaGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=eSPfpQbfD8TtnWjYs+6jj8qzhsWODAim1cckJ/MJTu0=; b=Iq2Jnh3FvMXcotoSClQ3hLSw3Dwy34Lys/OGAEebO8dHjNoSuVgb1eRR9P38Bw2wub R1yKWs681GCHNrF7CEj5+sCLuW60QEbaD2QMEwZUT/BAFToxpVZ7oj9GKqISazbqC+Mp EmHrEUggY7s/UVRFDKBrp5vDUesmOg5istNKCQftQ8lQAcmkLCnQfNSUWibxN+i+SuXz tWoLIzRFZs9n2KUUcJwke6saDRFfS+EUwijzhNQcnH88zhXtjrsGJSgZa8SIojihW/cV ExbcOVdl6LQHLhciSBFieGMUeFSn3nWOo7q7ccSfmu7yQtUTd78tt3E2suCijaDojsRU 8jMg== X-Gm-Message-State: AOAM533gFVzl6m6pyfU+gxKO5ey7GbW45SKMCYCPb/EAo2CiST9j6Qyx NoaT2V+FzwTY+nHhglv6GpE= X-Received: by 2002:a50:fb1a:: with SMTP id d26mr25055415edq.101.1607436825849; Tue, 08 Dec 2020 06:13:45 -0800 (PST) Received: from ubuntu-laptop (ip5f5bfce9.dynamic.kabel-deutschland.de. [95.91.252.233]) by smtp.googlemail.com with ESMTPSA id s5sm15577093eju.98.2020.12.08.06.13.44 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Dec 2020 06:13:45 -0800 (PST) Message-ID: <970af8b1abf565184bf37c3c055bf42ad760201a.camel@gmail.com> Subject: Re: [PATCH v2 1/2] scsi: ufs: Re-enable WriteBooster after device reset From: Bean Huo To: Stanley Chu , linux-scsi@vger.kernel.org, martin.petersen@oracle.com, avri.altman@wdc.com, alim.akhtar@samsung.com, jejb@linux.ibm.com Cc: beanhuo@micron.com, asutoshd@codeaurora.org, cang@codeaurora.org, matthias.bgg@gmail.com, bvanassche@acm.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, nguyenb@codeaurora.org, bjorn.andersson@linaro.org, kuohong.wang@mediatek.com, peter.wang@mediatek.com, chun-hung.wu@mediatek.com, andy.teng@mediatek.com, chaotian.jing@mediatek.com, cc.chou@mediatek.com, jiajie.hao@mediatek.com, alice.chao@mediatek.com Date: Tue, 08 Dec 2020 15:13:43 +0100 In-Reply-To: <20201208135635.15326-2-stanley.chu@mediatek.com> References: <20201208135635.15326-1-stanley.chu@mediatek.com> <20201208135635.15326-2-stanley.chu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-12-08 at 21:56 +0800, Stanley Chu wrote: > index 08c8a591e6b0..36d367eb8139 100644 > --- a/drivers/scsi/ufs/ufshcd.h > +++ b/drivers/scsi/ufs/ufshcd.h > @@ -1221,8 +1221,13 @@ static inline void > ufshcd_vops_device_reset(struct ufs_hba *hba) > if (hba->vops && hba->vops->device_reset) { > int err = hba->vops->device_reset(hba); > > - if (!err) > + if (!err) { > ufshcd_set_ufs_dev_active(hba); > + if (ufshcd_is_wb_allowed(hba)) { > + hba->wb_enabled = false; > + hba->wb_buf_flush_enabled = false; > + } > + } Stanley, how do you think group wb_buf_flush_enabled and wb_enabled to the dev_info, since they are UFS device attributes. means they are set only when UFS device flags being set. Reviewed-by: Bean Huo