From patchwork Thu Aug 4 07:42:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinyoung CHOI X-Patchwork-Id: 596017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64ACEC19F2C for ; Thu, 4 Aug 2022 07:42:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239184AbiHDHma (ORCPT ); Thu, 4 Aug 2022 03:42:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233186AbiHDHm3 (ORCPT ); Thu, 4 Aug 2022 03:42:29 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB7092A276 for ; Thu, 4 Aug 2022 00:42:27 -0700 (PDT) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220804074226epoutp0435f233c4a4a50a4fb1c70da9b0ec5650~IFHLVOpMw1055910559epoutp04U for ; Thu, 4 Aug 2022 07:42:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220804074226epoutp0435f233c4a4a50a4fb1c70da9b0ec5650~IFHLVOpMw1055910559epoutp04U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1659598946; bh=Rm83Ec5yFCaQndyEYNktaf6vrS+E3EUgRBd9vlEqa4E=; h=Subject:Reply-To:From:To:Date:References:From; b=BcyBYWlizkylV4wi07KVSbhY3UWioAE1U9oDaZYXMptUTm1s6EZ9eIfxJrSxtgqFW mNlnnZcuc06/s2x8A8ynQpP+m++s8uL44LkiCJ/FpIaCwWqdVWn+aLPiIEAfnxLZt9 v4Q4w9E66INNgFG3ZlcZIz/dIwok2tCR5krUn/f4= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20220804074225epcas2p340956e2923a6957fcdfbb4be56442c03~IFHKqa6eo0759107591epcas2p3M; Thu, 4 Aug 2022 07:42:25 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.99]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4Lz10J6MtHz4x9Px; Thu, 4 Aug 2022 07:42:24 +0000 (GMT) X-AuditID: b6c32a48-9f7ff700000025be-55-62eb78607d6f Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id E6.E1.09662.0687BE26; Thu, 4 Aug 2022 16:42:24 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH v7 0/6] scsi: ufs: wb: Add sysfs attribute and cleanup Reply-To: j-young.choi@samsung.com Sender: Jinyoung CHOI From: Jinyoung CHOI To: ALIM AKHTAR , "avri.altman@wdc.com" , "bvanassche@acm.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "beanhuo@micron.com" , "adrian.hunter@intel.com" , "stanley.chu@mediatek.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" X-Priority: 3 X-Content-Kind-Code: NORMAL X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20220804074224epcms2p18f0ac2f92073aeed981718a9cab23866@epcms2p1> Date: Thu, 04 Aug 2022 16:42:24 +0900 X-CMS-MailID: 20220804074224epcms2p18f0ac2f92073aeed981718a9cab23866 X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y CMS-TYPE: 102P X-Brightmail-Tracker: H4sIAAAAAAAAA+Ng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+vOLpC5Nne6nZppYwVvKy5zu9cxEtT7JsX7vhmW8jtc2JxwGZtJvtpfWaVC1+zrDtuO0Wr o9LmG8+eP0EmGVf18/2F2HZ2nuA6PXHtyxcbpzhELpv89UqB5jKvB4kXndcG35DeyXuj7WdK c/yk29yv7MLf8Mn8Wu65/sbLvnd9tu+4G5/JtHMbioV+F72w6ZWOEktxRqKhFnNRcSIAxhoe rD8EAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220804074224epcms2p18f0ac2f92073aeed981718a9cab23866 References: Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org This patch series is to clean up UFS's Write Booster code and adds sysfs attribute which can control the specific feature of it. V2: - modify commit message - move & modify err messages - remove unnesscessary debug messages V3: - split patch (functional, non-functional) V4: - split patch (The number of patches from 2 to 7) - modify dev messages - modify commit message V5: - drop (scsi: ufs: wb: Move ufshcd_is_wb_allowed() to callee) - fix condition check - add document for sysfs attribute - move ufshcd_is_wb_buf_flush_allowed() to ufs-priv.h V6: - Change the function name from ufshcd_wb_config() to ufshcd_configure_wb() - modify document description for wb_buf_flush_en attribute - fix some dev_err messages V7: - renaming sysfs attribute name (wb_buf_flush_en -> enable_wb_buf_flush) - update document description - change debug message level (info -> dbg) (5.19/scsi-fixes, https://git.kernel.org/mkp/scsi/c/2ae57c995003) Jinyoung Choi (6): scsi: ufs: wb: Change wb_enabled condition test scsi: ufs: wb: Change functions name and modify parameter name scsi: ufs: wb: Add explicit flush sysfs attribute scsi: ufs: wb: Introduce ufshcd_is_wb_buf_flush_allowed() to improve readability scsi: ufs: wb: Modify messages scsi: ufs: wb: Move the comment to the right position Documentation/ABI/testing/sysfs-driver-ufs | 9 +++ drivers/ufs/core/ufs-sysfs.c | 47 ++++++++++++++- drivers/ufs/core/ufshcd-priv.h | 6 ++ drivers/ufs/core/ufshcd.c | 70 ++++++++++++---------- include/ufs/ufshcd.h | 1 + 5 files changed, 99 insertions(+), 34 deletions(-)