All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] scsi: ufs: core: support WB buffer resize function
@ 2023-09-08 10:20 Lu Hongfei
  2023-09-08 10:20 ` [PATCH v2 1/3] scsi: ufs: core: add wb buffer resize related attr_idn Lu Hongfei
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Lu Hongfei @ 2023-09-08 10:20 UTC (permalink / raw)
  To: Alim Akhtar, Avri Altman, Bart Van Assche, James E.J. Bottomley,
	Martin K. Petersen, Lu Hongfei, Can Guo, Bean Huo,
	Arthur Simchaev, Stanley Chu, Manivannan Sadhasivam, Asutosh Das,
	Bao D. Nguyen, zhanghui, Po-Wen Kao, Eric Biggers, Keoseong Park,
	linux-kernel, linux-scsi
  Cc: opensource.kernel

Hello,

This v2 series implements the function of controlling the wb buffer resize
via sysfs that will be supported in UFS4.1.

The patch 1 add WB buffer resize related attr_idns.
The patch 2 Add ufshcd_wb_buf_resize function to enable WB buffer resize.
The patch 3 Add sysfs attributes to control WB buffer resize function.

version 2 changes
-Using sysfs to control WB buffer resize instead of exception event handler
-Removed content related to exception event
-Solved several issues that caused compilation errors

Of course, there may be better ways to implement this feature.
If necessary, please point it out and I will optimize it as soon as
possible.

As of now, there have been no UFS device releases that support this
feature, so I have not tested the code on real hardware.

------------------------------------------------------------------------

Lu Hongfei (3):
  scsi: ufs: core: add wb buffer resize related attr_idn
  scsi: ufs: core: Add ufshcd_wb_buf_resize function to enable WB buffer
    resize
  scsi: ufs: core: Add sysfs attributes to control WB buffer resize
    function

 Documentation/ABI/testing/sysfs-driver-ufs | 52 ++++++++++++++++
 drivers/ufs/core/ufs-sysfs.c               | 71 ++++++++++++++++++++++
 drivers/ufs/core/ufshcd-priv.h             |  1 +
 drivers/ufs/core/ufshcd.c                  | 21 +++++++
 include/ufs/ufs.h                          |  5 +-
 include/ufs/ufshcd.h                       |  1 +
 6 files changed, 150 insertions(+), 1 deletion(-)

-- 
2.39.0


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [PATCH v2 2/3] scsi: ufs: core: Add ufshcd_wb_buf_resize function to enable WB buffer resize
@ 2023-09-09  8:05 kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2023-09-09  8:05 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230908102113.547-3-luhongfei@vivo.com>
References: <20230908102113.547-3-luhongfei@vivo.com>
TO: Lu Hongfei <luhongfei@vivo.com>
TO: Alim Akhtar <alim.akhtar@samsung.com>
TO: Avri Altman <avri.altman@wdc.com>
TO: Bart Van Assche <bvanassche@acm.org>
TO: "James E.J. Bottomley" <jejb@linux.ibm.com>
TO: "Martin K. Petersen" <martin.petersen@oracle.com>
TO: Lu Hongfei <luhongfei@vivo.com>
TO: Can Guo <quic_cang@quicinc.com>
TO: Bean Huo <beanhuo@micron.com>
TO: Arthur Simchaev <arthur.simchaev@wdc.com>
TO: Stanley Chu <stanley.chu@mediatek.com>
TO: Manivannan Sadhasivam <mani@kernel.org>
TO: Asutosh Das <quic_asutoshd@quicinc.com>
TO: "Bao D. Nguyen" <quic_nguyenb@quicinc.com>
TO: zhanghui <zhanghui31@xiaomi.com>
TO: "Po-Wen Kao" <powen.kao@mediatek.com>
TO: Eric Biggers <ebiggers@google.com>
TO: Keoseong Park <keosung.park@samsung.com>
TO: linux-kernel@vger.kernel.org
TO: linux-scsi@vger.kernel.org
CC: opensource.kernel@vivo.com

Hi Lu,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on jejb-scsi/for-next linus/master v6.5 next-20230908]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Lu-Hongfei/scsi-ufs-core-add-wb-buffer-resize-related-attr_idn/20230908-182656
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20230908102113.547-3-luhongfei%40vivo.com
patch subject: [PATCH v2 2/3] scsi: ufs: core: Add ufshcd_wb_buf_resize function to enable WB buffer resize
:::::: branch date: 22 hours ago
:::::: commit date: 22 hours ago
config: i386-randconfig-141-20230909 (https://download.01.org/0day-ci/archive/20230909/202309091536.TRk3mftu-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230909/202309091536.TRk3mftu-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202309091536.TRk3mftu-lkp@intel.com/

New smatch warnings:
drivers/ufs/core/ufshcd.c:6067 ufshcd_wb_buf_resize() error: uninitialized symbol 'ret'.

Old smatch warnings:
drivers/ufs/core/ufshcd.c:5353 ufshcd_uic_cmd_compl() error: we previously assumed 'hba->active_uic_cmd' could be null (see line 5341)
drivers/ufs/core/ufshcd.c:7560 ufshcd_abort() error: uninitialized symbol 'reg'.
drivers/ufs/core/ufshcd.c:9124 ufshcd_setup_clocks() warn: 'clki->clk' from clk_prepare_enable() not released on lines: 9104.

vim +/ret +6067 drivers/ufs/core/ufshcd.c

3d17b9b5ab1155 drivers/scsi/ufs/ufshcd.c Asutosh Das 2020-04-22  6048  
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6049  int ufshcd_wb_buf_resize(struct ufs_hba *hba, u32 resize_op)
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6050  {
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6051  	int ret;
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6052  	u8 index;
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6053  
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6054  	ufshcd_scsi_block_requests(hba);
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6055  	if (ufshcd_wait_for_doorbell_clr(hba, 1 * USEC_PER_SEC))
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6056  		goto out;
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6057  
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6058  	index = ufshcd_wb_get_query_index(hba);
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6059  	ret = ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_WRITE_ATTR,
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6060  		QUERY_ATTR_IDN_WB_BUF_RESIZE_EN, index, 0, &resize_op);
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6061  	if (ret)
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6062  		dev_err(hba->dev,
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6063  			"%s: Enable WB buf resize operation failed %d\n",
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6064  			__func__, ret);
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6065  out:
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6066  	ufshcd_scsi_unblock_requests(hba);
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08 @6067  	return ret;
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6068  }
7b70b34c503067 drivers/ufs/core/ufshcd.c Lu Hongfei  2023-09-08  6069  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-09-11  8:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-08 10:20 [PATCH v2 0/3] scsi: ufs: core: support WB buffer resize function Lu Hongfei
2023-09-08 10:20 ` [PATCH v2 1/3] scsi: ufs: core: add wb buffer resize related attr_idn Lu Hongfei
2023-09-08 15:31   ` Bart Van Assche
2023-09-08 10:20 ` [PATCH v2 2/3] scsi: ufs: core: Add ufshcd_wb_buf_resize function to enable WB buffer resize Lu Hongfei
2023-09-08 14:11   ` kernel test robot
2023-09-08 15:38   ` Bart Van Assche
2023-09-11  8:21   ` Dan Carpenter
2023-09-08 10:20 ` [PATCH v2 3/3] scsi: ufs: core: Add sysfs attributes to control WB buffer resize function Lu Hongfei
2023-09-08 15:43   ` Bart Van Assche
2023-09-10  1:56 ` [PATCH v2 0/3] scsi: ufs: core: support " Can Guo
  -- strict thread matches above, loose matches on Subject: below --
2023-09-09  8:05 [PATCH v2 2/3] scsi: ufs: core: Add ufshcd_wb_buf_resize function to enable WB buffer resize kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.