Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2656049pxb; Tue, 19 Jan 2021 02:48:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMbHBv3gfYa7dbSYix1fAcAYIc2UNLNIMZwlzmhvb3DNCA20OcTkMpyjiZOpKYsYfdmffK X-Received: by 2002:a17:906:fc3:: with SMTP id c3mr2709645ejk.474.1611053318460; Tue, 19 Jan 2021 02:48:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611053318; cv=none; d=google.com; s=arc-20160816; b=CQDeQoRE7Jlb84b6B4/7u6HVOlKzWk3NsWfK2Jefnrt4U9/i9lyOpyreSYPUdSAH4+ aS1kR85AyqsYzYfifiVruzIAN6qeq62H/XKe9oFiMvnLdbE8kGefgn7FN13ZdADJyfru OzUXANP4KAefKqc3gTmgsVUYm0n+HPqAxMzCgKlPy1Frxfq89JcXKiGKph/WwgUeShD4 jcmV6CTF7zQBF+o5aT84D+paW+LvVR0yOO/C9S82MA/Npbr7+SpQLEAWBTsbhh1JM3VJ ohp5gZAM/LOwY+hvGyfPKcvQiORL1wqii7TG5ZKHyKkaDSaQYwCJlWOJBePJxEYdjjYy kJ3Q== 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=IABaVdUYHRPsPlVF0/vawd3QW8nnC9cA4OeVAWdYtLE=; b=Y98xFGVABSdVapHuLW0Q0Jx5Fu52ulozQGGdriYYzyGXcaK7ybBMX09knZliqSJExs 76E8+su5DCgoo8bzIouAvjUJ7Ea9IcLQVx0Ouvu86lr6PKY0tYE9hwteTCPTbhwRssdt KEZDNPd9JFAlNLEc1yJoRGNtSfzMSXG1rHm8lWYUugfqJ9E632k4WpXCI9OEXWkNfhWC r1Kftqxpb/Qy+PYltGk0IS69uIKLcS8pfV3okxOCYwG1H4P3FfGVDZkAHaiKhv++HPMg SnINYzMp7uZUpG/3CX8By/X1/w34IkJtuoBQ2NLHh2eKoVl83cS6XtKyV8XWMa+SEWDq X8Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PIy+DGZ2; 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 x19si8818850edr.378.2021.01.19.02.48.12; Tue, 19 Jan 2021 02:48:38 -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=PIy+DGZ2; 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 S2388995AbhASJum (ORCPT + 99 others); Tue, 19 Jan 2021 04:50:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387584AbhASJec (ORCPT ); Tue, 19 Jan 2021 04:34:32 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E881C061575; Tue, 19 Jan 2021 01:33:48 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id 6so27538006ejz.5; Tue, 19 Jan 2021 01:33:48 -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=IABaVdUYHRPsPlVF0/vawd3QW8nnC9cA4OeVAWdYtLE=; b=PIy+DGZ2JkAycV25VNA6uFUpYlhxHe++FXERzwkz3I+7Rw0aeWELb5mNYl5Lw66Vor VTmj3l2tCPjYAV7Z4i+HNEzlGh2JRqPAuf3JCNt4OB4YZK4TY/1vooAIEKM3WhvPERjQ s1fcvywcuWUc3hcWH0ldLODeL1m5jgHF6e3pfwI4uOgw62ahLVT0vAadNcE61l/zgmmO bvpbFhR/HflzuGDcVuyQ5mD6dB9VTE/KcW2geM/76dTH5Nxv08T9V66LYZ7AiHqBOVpc ezDnqI/9t5+MfUHuhoAt0R39xtV97SHtfKf6UYLwhHv3YCuPuB2SSPOrROby9KdjWkj9 zxEw== 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=IABaVdUYHRPsPlVF0/vawd3QW8nnC9cA4OeVAWdYtLE=; b=B5K9/YkXluzqa6GdfMaAk8vA4yOr9xcA6bKyaV2sJQoCd9PKgiyQcLnvxd9CUsEbfZ n3vspM2aXmi4kNZRXgY+ZhTZaXQlRl8ThwJb18NgxQBzVhIJ9hlSiqM8CYG6ngxc1rPy Vfm7diUHgn2TaDlTwqkHZSFK9Bu5zvCwEY0uAOWBca79Q8p6rRW6Mu6vODTHef9RRJiO Ewdq/uhLh0zXW/OPzV/IQjokeVhdMiuLA+sC/DmZDcr8xMzcqI4sMmWsJdOGkPHM069D ZmnMIvAFosxbknUXQbXuafDoi1Q/YjTKu3s0Kkdv7WYwXNGAQg/nqdHI2YxGxL5Xyq/f zbTg== X-Gm-Message-State: AOAM532yrfPnP+HZ322yPYmLbEWfbqsk2dxS2mBaNhSV5lP4IB9+YivE A77/Kt2SR6oKaRUYFSX9A7M= X-Received: by 2002:a17:906:2f83:: with SMTP id w3mr2543434eji.292.1611048826844; Tue, 19 Jan 2021 01:33:46 -0800 (PST) Received: from ubuntu-laptop (ip5f5bee1b.dynamic.kabel-deutschland.de. [95.91.238.27]) by smtp.googlemail.com with ESMTPSA id pj11sm7657845ejb.58.2021.01.19.01.33.45 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Jan 2021 01:33:46 -0800 (PST) Message-ID: Subject: Re: [PATCH v6 1/6] scsi: ufs: Add "wb_on" sysfs node to control WB on/off From: Bean Huo To: Adrian Hunter , alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, bvanassche@acm.org, tomas.winkler@intel.com, cang@codeaurora.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 19 Jan 2021 10:33:45 +0100 In-Reply-To: <0a9971aa-e508-2aaa-1379-fb898471a252@intel.com> References: <20210118201039.2398-1-huobean@gmail.com> <20210118201039.2398-2-huobean@gmail.com> <0a9971aa-e508-2aaa-1379-fb898471a252@intel.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, 2021-01-19 at 09:01 +0200, Adrian Hunter wrote: > On 18/01/21 10:10 pm, Bean Huo wrote: > > From: Bean Huo > > > > Currently UFS WriteBooster driver uses clock scaling up/down to set > > WB on/off, for the platform which doesn't support > > UFSHCD_CAP_CLK_SCALING, > > WB will be always on. Provide a sysfs attribute to enable/disable > > WB > > during runtime. Write 1/0 to "wb_on" sysfs node to enable/disable > > UFS WB. > > Is it so, that after a full reset, WB is always enabled again? Is > that > intended? Hello Adrian Good questions. yes, after a full reset, the UFS device side by default is wb disabled, then WB will be always enabled agaion in ufshcd_wb_config(hba). but, for the platform which supports UFSHCD_CAP_CLK_SCALING, wb will be disabled again while clk scaling down and enabled while clk scaling up. Regarding the last question, I think OEM wants to do that. maybe they suppose there will be a lot of writing after reset?? From the UFS device's point of view, the control of WB is up to the user. Thanks, Bean