From patchwork Mon Jul 27 12:17:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SEO HOYOUNG X-Patchwork-Id: 11686803 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C2311392 for ; Mon, 27 Jul 2020 12:17:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD2042075D for ; Mon, 27 Jul 2020 12:17:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="KZAv1/Hv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728282AbgG0MRM (ORCPT ); Mon, 27 Jul 2020 08:17:12 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:12112 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbgG0MRJ (ORCPT ); Mon, 27 Jul 2020 08:17:09 -0400 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20200727121706epoutp019ddbc7db7e763612871298d92fe2fd5f~lmyUbY9HZ1385313853epoutp01e for ; Mon, 27 Jul 2020 12:17:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20200727121706epoutp019ddbc7db7e763612871298d92fe2fd5f~lmyUbY9HZ1385313853epoutp01e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1595852226; bh=NcDAWn5vlX20tOOFq44rTlKVPc14UwSVPaRdJqF9rXc=; h=From:To:Cc:Subject:Date:References:From; b=KZAv1/HvFQYaLZGLQ1YCiSSr1SKC83FOSEchKByN60s4Bq9rbv8kKViKo5Ktv7yec lYsKfZFAivS9Kw54iZcczxkC1sYrQggylhjfGCG4NsoSGByXMiJQIrFtDXF7kLKQ3N oKhfXzp+7L2X1L6rg1twjwGGCH9Z/PZRw8YRVdAw= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20200727121705epcas2p48b558016fc0df0715d909e4a77f9262a~lmyTwh8su2057320573epcas2p4E; Mon, 27 Jul 2020 12:17:05 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.189]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4BFf1p5PH0zMqYkV; Mon, 27 Jul 2020 12:17:02 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 49.D5.27441.EB5CE1F5; Mon, 27 Jul 2020 21:17:02 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20200727121701epcas2p345545e515b2f3ef8b951d0134a92d7b8~lmyP2E89E0841408414epcas2p3Q; Mon, 27 Jul 2020 12:17:01 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200727121701epsmtrp1390cf0722e14388497c1b11e666e2887~lmyP1WENB1270612706epsmtrp1f; Mon, 27 Jul 2020 12:17:01 +0000 (GMT) X-AuditID: b6c32a47-fc5ff70000006b31-0d-5f1ec5be1a20 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 69.2B.08382.DB5CE1F5; Mon, 27 Jul 2020 21:17:01 +0900 (KST) Received: from rack03.dsn.sec.samsung.com (unknown [12.36.155.109]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200727121701epsmtip209e5f06ec9ce13f2df55133978f78807~lmyPpIBlX1877718777epsmtip2k; Mon, 27 Jul 2020 12:17:01 +0000 (GMT) From: SEO HOYOUNG To: linux-scsi@vger.kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, beanhuo@micron.com, asutoshd@codeaurora.org, cang@codeaurora.org, bvanassche@acm.org, grant.jung@samsung.com, junwoo80.lee@samsung.com Cc: SEO HOYOUNG Subject: [RFC PATCH v4 0/2] Support vendor specific operations for WB Date: Mon, 27 Jul 2020 21:17:22 +0900 Message-Id: X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGJsWRmVeSWpSXmKPExsWy7bCmqe6+o3LxBjeXaVs8mLeNzWJv2wl2 i5c/r7JZHHzYyWIx7cNPZotP65exWvz6u57dYvXiBywWi25sY7LY9beZyaL7+g42i+XH/zE5 8HhcvuLtcbmvl8ljwqIDjB7f13eweXx8eovFo2/LKkaPz5vkPNoPdDMFcETl2GSkJqakFimk 5iXnp2TmpdsqeQfHO8ebmhkY6hpaWpgrKeQl5qbaKrn4BOi6ZeYAXaukUJaYUwoUCkgsLlbS t7Mpyi8tSVXIyC8usVVKLUjJKTA0LNArTswtLs1L10vOz7UyNDAwMgWqTMjJ+Hu8g7XgCE/F m62bWBoYf3B2MXJySAiYSCzd2sLexcjFISSwg1Hi7pfFbBDOJ0aJTRfmMUI43xglVvyeAFTG AdayfrYeRHwvo8TntRuh2n8wSmz4Mp0NZC6bgIbEmmOHmEASIgJdTBIPd35jAkkwC6hJfL67 jAXEFhZwleia0QjWwCKgKrG/tQUszitgLnFl4x8miAPlJRY1/GaCiAtKnJz5hAVijrxE89bZ zBA1nRwSG7o9IGwXiSlnDrJB2MISr45vYYewpSRe9rdB2fUSU+6tYgE5TkKgh1Fiz4oTUMuM JWY9a2cEeZNZQFNi/S59iI+VJY7cglrLJ9Fx+C80IHglOtqEIBqVJM7MvQ0VlpA4ODsHIuwh 8f3zN7AjhQRiJX6+/842gVF+FpJfZiH5ZRbC2gWMzKsYxVILinPTU4u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fiTUmsrEotyo8vKs1JLT7EKM3BoiTOe6NwYZyQQHpiSWp2ampBahFM lomDU6qBSaSPZXf+9Jfp8rPfWIT5e6o2XP78bX9Ak862SS0MKkwBh3JdL5/9elSlOKaVd9PM SW4F1/a+yuj88qOr0pd95bkbB0ocP/CYzUkOr73UVNEbfmP3zeYFWQ5xKTtbbfr9ssx2dPUG Fh7btpKpWUvt6LdAiWlWk6MTqs58LNjwQ6hZnb1vnsnRf+yxBjvPNBxoEz9972VcyPyL5gcm enY+CRUtkr5gf+Nx0KYXhlvOnPlzfMVPubqufXde5idd/c/JI5U7Oev0Dvme3Tlb++sWldX0 +r5Qc9vou5XhK+/FpSee3uzV4HjMecRoZ5lajIrv7x6fRGklmQYFee+XV2vvzY+U2yfNtT1p 8cMzYnbblViKMxINtZiLihMBc8P7PekCAAA= X-CMS-MailID: 20200727121701epcas2p345545e515b2f3ef8b951d0134a92d7b8 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200727121701epcas2p345545e515b2f3ef8b951d0134a92d7b8 References: Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Hi all, Here is v4 of the patchset. This patchs for supporting WB of vendor specific. - when UFS reset and restore, need to cleare WB buffer. - need to check WB buffer and flush operate before enter suspend - do not enable WB with UFS probe. our vendor device did not support gear scaling. So we can't use gear scaling code at mainline. And we want to WB disable after probe. If IO state busy, then we will enable WB with IO monitoring. I think always enable WB, then maybe occur power related problems. If this patch merged, we will select to function sequence for performance of WB. I think the current WB mainline will not be able to satisfy the performance and operation of each vendor. [v1 -> v2] - The ufshcd_reset_vendor() fuction for WB reset. So I modified function name. - uploade vendor wb code. [v2 -> v3] - modified minor details about blank, typing error etc.. [v3 -> v4] - squash about fucntion name - remove export symbol about function. because occur HPB patch. SEO HOYOUNG (2): scsi: ufs: modify write booster scsi: ufs: add vendor specific write booster drivers/scsi/ufs/Kconfig | 8 + drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-exynos.c | 6 + drivers/scsi/ufs/ufs_ctmwb.c | 270 ++++++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufs_ctmwb.h | 26 ++++ drivers/scsi/ufs/ufshcd.c | 19 ++- drivers/scsi/ufs/ufshcd.h | 39 +++++ 7 files changed, 365 insertions(+), 4 deletions(-) create mode 100644 drivers/scsi/ufs/ufs_ctmwb.c create mode 100644 drivers/scsi/ufs/ufs_ctmwb.h