* Re: [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8
2026-10-26 5:26 ` [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8 HOYOUNG SEO
@ 2026-10-26 14:42 ` Stanley Jhu
2026-10-26 15:34 ` Bart Van Assche
2026-10-26 17:44 ` kernel test robot
2026-10-26 18:44 ` kernel test robot
2 siblings, 1 reply; 5+ messages in thread
From: Stanley Jhu @ 2026-10-26 14:42 UTC (permalink / raw)
To: HOYOUNG SEO
Cc: Martin K. Petersen, linux-scsi, linux-kernel, alim.akhtar,
bvanassche, kwangwon.min, kwmad.kim, cpgs, h10.kim
On Mon, Oct 26, 2026 at 02:26:32PM +0900, HOYOUNG SEO wrote:
> v2:
> https://lore.kernel.org/linux-scsi/20261022074249.3098100-1-hy50.seo@samsung.com/
> Signed-off-by: HOYOUNG SEO <hy50.seo@samsung.com>
> ---
Please move it above "---".
> + if (ufshcd_is_auto_hibern8_error(hba, intr_status)) {
> + hba->errors |= (UFSHCD_UIC_HIBERN8_MASK & intr_status);
> +
> cmd = hba->active_uic_cmd;
This brace is never closed, so ufshcd.c does not build.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8
2026-10-26 14:42 ` Stanley Jhu
@ 2026-10-26 15:34 ` Bart Van Assche
0 siblings, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2026-10-26 15:34 UTC (permalink / raw)
To: Stanley Jhu, HOYOUNG SEO
Cc: Martin K. Petersen, linux-scsi, linux-kernel, alim.akhtar,
kwangwon.min, kwmad.kim, cpgs, h10.kim
On 10/26/26 7:42 AM, Stanley Jhu wrote:
> On Mon, Oct 26, 2026 at 02:26:32PM +0900, HOYOUNG SEO wrote:
>> v2: https://lore.kernel.org/linux-scsi/20261022074249.3098100-1-
>> hy50.seo@samsung.com/
>
>> Signed-off-by: HOYOUNG SEO <hy50.seo@samsung.com>
>> ---
>
> Please move it above "---".
>
>> + if (ufshcd_is_auto_hibern8_error(hba, intr_status)) {
>> + hba->errors |= (UFSHCD_UIC_HIBERN8_MASK & intr_status);
>> +
>> cmd = hba->active_uic_cmd;
>
> This brace is never closed, so ufshcd.c does not build.
Hi Hoyoung,
Stanley's comments need to be addressed: please compile-test v5 and move
the Signed-off-by above "---". Additionally, please consider using a
local bool for the ufshcd_is_auto_hibern8_error() result instead of
testing hba->errors, describe the actual changes in the changelog, link
to all previous versions and Cc stable. With these addressed the
approach looks good to me.
Thanks,
Bart.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8
2026-10-26 5:26 ` [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8 HOYOUNG SEO
2026-10-26 14:42 ` Stanley Jhu
@ 2026-10-26 17:44 ` kernel test robot
2026-10-26 18:44 ` kernel test robot
2 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-10-26 17:44 UTC (permalink / raw)
To: HOYOUNG SEO, linux-scsi, linux-kernel, alim.akhtar, avri.altman,
jejb, martin.petersen, bvanassche, kwangwon.min, kwmad.kim, cpgs,
h10.kim
Cc: oe-kbuild-all, HOYOUNG SEO
Hi HOYOUNG,
kernel test robot noticed the following build errors:
[auto build test ERROR on jejb-scsi/for-next]
[also build test ERROR on mkp-scsi/for-next linus/master next-20261023]
[cannot apply to linux-review/HOYOUNG-SEO/scsi-ufs-Change-the-error-check-sequence-for-auto-hibern8/20261022-164249 v7.3]
[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/HOYOUNG-SEO/scsi-ufs-Change-the-error-check-sequence-for-auto-hibern8/20261026-142632
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link: https://lore.kernel.org/r/20261026052632.1848929-1-hy50.seo%40samsung.com
patch subject: [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8
config: i386-randconfig-1006-20261026 (https://download.01.org/0day-ci/archive/20261027/202610270143.Imt9oS4A-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261027/202610270143.Imt9oS4A-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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610270143.Imt9oS4A-lkp@intel.com/
All errors (new ones prefixed by >>):
9598 | static void ufshcd_async_scan(void *data, async_cookie_t cookie)
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9624:33: error: invalid storage class for function 'ufshcd_eh_timed_out'
9624 | static enum scsi_timeout_action ufshcd_eh_timed_out(struct scsi_cmnd *scmd)
| ^~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9695:35: error: initializer element is not constant
9695 | .mq_poll = ufshcd_poll,
| ^~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9695:35: note: (near initialization for 'ufshcd_driver_template.mq_poll')
drivers/ufs/core/ufshcd.c:9700:35: error: initializer element is not constant
9700 | .eh_abort_handler = ufshcd_abort,
| ^~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9700:35: note: (near initialization for 'ufshcd_driver_template.eh_abort_handler')
drivers/ufs/core/ufshcd.c:9701:36: error: initializer element is not constant
9701 | .eh_device_reset_handler = ufshcd_eh_device_reset_handler,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9701:36: note: (near initialization for 'ufshcd_driver_template.eh_device_reset_handler')
drivers/ufs/core/ufshcd.c:9702:36: error: initializer element is not constant
9702 | .eh_host_reset_handler = ufshcd_eh_host_reset_handler,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9702:36: note: (near initialization for 'ufshcd_driver_template.eh_host_reset_handler')
drivers/ufs/core/ufshcd.c:9703:35: error: initializer element is not constant
9703 | .eh_timed_out = ufshcd_eh_timed_out,
| ^~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9703:35: note: (near initialization for 'ufshcd_driver_template.eh_timed_out')
drivers/ufs/core/ufshcd.c:9715:12: error: invalid storage class for function 'ufshcd_config_vreg_load'
9715 | static int ufshcd_config_vreg_load(struct device *dev, struct ufs_vreg *vreg,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9741:19: error: invalid storage class for function 'ufshcd_config_vreg_lpm'
9741 | static inline int ufshcd_config_vreg_lpm(struct ufs_hba *hba,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9747:19: error: invalid storage class for function 'ufshcd_config_vreg_hpm'
9747 | static inline int ufshcd_config_vreg_hpm(struct ufs_hba *hba,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9756:12: error: invalid storage class for function 'ufshcd_config_vreg'
9756 | static int ufshcd_config_vreg(struct device *dev,
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9765:12: error: invalid storage class for function 'ufshcd_enable_vreg'
9765 | static int ufshcd_enable_vreg(struct device *dev, struct ufs_vreg *vreg)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9785:12: error: invalid storage class for function 'ufshcd_disable_vreg'
9785 | static int ufshcd_disable_vreg(struct device *dev, struct ufs_vreg *vreg)
| ^~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9806:12: error: invalid storage class for function 'ufshcd_setup_vreg'
9806 | static int ufshcd_setup_vreg(struct ufs_hba *hba, bool on)
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9831:12: error: invalid storage class for function 'ufshcd_setup_hba_vreg'
9831 | static int ufshcd_setup_hba_vreg(struct ufs_hba *hba, bool on)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9854:19: error: non-static declaration of 'ufshcd_get_vreg' follows static declaration
9854 | EXPORT_SYMBOL_GPL(ufshcd_get_vreg);
| ^~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
90 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9854:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
9854 | EXPORT_SYMBOL_GPL(ufshcd_get_vreg);
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9838:5: note: previous definition of 'ufshcd_get_vreg' with type 'int(struct device *, struct ufs_vreg *)'
9838 | int ufshcd_get_vreg(struct device *dev, struct ufs_vreg *vreg)
| ^~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9856:12: error: invalid storage class for function 'ufshcd_init_vreg'
9856 | static int ufshcd_init_vreg(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9873:12: error: invalid storage class for function 'ufshcd_init_hba_vreg'
9873 | static int ufshcd_init_hba_vreg(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9880:12: error: invalid storage class for function 'ufshcd_setup_clocks'
9880 | static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on)
| ^~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9948:30: error: invalid storage class for function 'ufshcd_parse_ref_clk_property'
9948 | static enum ufs_ref_clk_freq ufshcd_parse_ref_clk_property(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:9961:12: error: invalid storage class for function 'ufshcd_init_clocks'
9961 | static int ufshcd_init_clocks(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10019:12: error: invalid storage class for function 'ufshcd_variant_hba_init'
10019 | static int ufshcd_variant_hba_init(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10030:12: error: invalid storage class for function 'ufshcd_hba_init'
10030 | static int ufshcd_hba_init(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10088:13: error: invalid storage class for function 'ufshcd_hba_exit'
10088 | static void ufshcd_hba_exit(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10107:12: error: invalid storage class for function 'ufshcd_execute_start_stop'
10107 | static int ufshcd_execute_start_stop(struct scsi_device *sdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10142:12: error: invalid storage class for function 'ufshcd_set_dev_pwr_mode'
10142 | static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10193:12: error: invalid storage class for function 'ufshcd_link_state_transition'
10193 | static int ufshcd_link_state_transition(struct ufs_hba *hba,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10251:13: error: invalid storage class for function 'ufshcd_vreg_set_lpm'
10251 | static void ufshcd_vreg_set_lpm(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10302:12: error: invalid storage class for function 'ufshcd_vreg_set_hpm'
10302 | static int ufshcd_vreg_set_hpm(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10343:13: error: invalid storage class for function 'ufshcd_hba_vreg_set_lpm'
10343 | static void ufshcd_hba_vreg_set_lpm(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10349:13: error: invalid storage class for function 'ufshcd_hba_vreg_set_hpm'
10349 | static void ufshcd_hba_vreg_set_hpm(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10355:12: error: invalid storage class for function '__ufshcd_wl_suspend'
10355 | static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10541:12: error: invalid storage class for function '__ufshcd_wl_resume'
10541 | static int __ufshcd_wl_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
| ^~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10641:12: error: invalid storage class for function 'ufshcd_wl_runtime_suspend'
10641 | static int ufshcd_wl_runtime_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10661:12: error: invalid storage class for function 'ufshcd_wl_runtime_resume'
10661 | static int ufshcd_wl_runtime_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10683:12: error: invalid storage class for function 'ufshcd_wl_suspend'
10683 | static int ufshcd_wl_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10712:12: error: invalid storage class for function 'ufshcd_wl_resume'
10712 | static int ufshcd_wl_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10747:12: error: invalid storage class for function 'ufshcd_suspend'
10747 | static int ufshcd_suspend(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10789:12: error: invalid storage class for function 'ufshcd_resume'
10789 | static int ufshcd_resume(struct ufs_hba *hba)
| ^~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10846:15: error: non-static declaration of 'ufshcd_system_suspend' follows static declaration
10846 | EXPORT_SYMBOL(ufshcd_system_suspend);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:89:41: note: in expansion of macro '_EXPORT_SYMBOL'
89 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10846:1: note: in expansion of macro 'EXPORT_SYMBOL'
10846 | EXPORT_SYMBOL(ufshcd_system_suspend);
| ^~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10830:5: note: previous definition of 'ufshcd_system_suspend' with type 'int(struct device *)'
10830 | int ufshcd_system_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10875:15: error: non-static declaration of 'ufshcd_system_resume' follows static declaration
10875 | EXPORT_SYMBOL(ufshcd_system_resume);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:89:41: note: in expansion of macro '_EXPORT_SYMBOL'
89 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10875:1: note: in expansion of macro 'EXPORT_SYMBOL'
10875 | EXPORT_SYMBOL(ufshcd_system_resume);
| ^~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10857:5: note: previous definition of 'ufshcd_system_resume' with type 'int(struct device *)'
10857 | int ufshcd_system_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10900:15: error: non-static declaration of 'ufshcd_runtime_suspend' follows static declaration
10900 | EXPORT_SYMBOL(ufshcd_runtime_suspend);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:89:41: note: in expansion of macro '_EXPORT_SYMBOL'
89 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10900:1: note: in expansion of macro 'EXPORT_SYMBOL'
10900 | EXPORT_SYMBOL(ufshcd_runtime_suspend);
| ^~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10887:5: note: previous definition of 'ufshcd_runtime_suspend' with type 'int(struct device *)'
10887 | int ufshcd_runtime_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10927:15: error: non-static declaration of 'ufshcd_runtime_resume' follows static declaration
10927 | EXPORT_SYMBOL(ufshcd_runtime_resume);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:89:41: note: in expansion of macro '_EXPORT_SYMBOL'
89 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10927:1: note: in expansion of macro 'EXPORT_SYMBOL'
10927 | EXPORT_SYMBOL(ufshcd_runtime_resume);
| ^~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10914:5: note: previous definition of 'ufshcd_runtime_resume' with type 'int(struct device *)'
10914 | int ufshcd_runtime_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10930:13: error: invalid storage class for function 'ufshcd_wl_shutdown'
10930 | static void ufshcd_wl_shutdown(struct scsi_device *sdev)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10987:19: error: non-static declaration of 'ufshcd_remove' follows static declaration
10987 | EXPORT_SYMBOL_GPL(ufshcd_remove);
| ^~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
90 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10987:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
10987 | EXPORT_SYMBOL_GPL(ufshcd_remove);
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10968:6: note: previous definition of 'ufshcd_remove' with type 'void(struct ufs_hba *)'
10968 | void ufshcd_remove(struct ufs_hba *hba)
| ^~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:10996:19: error: non-static declaration of 'ufshcd_system_freeze' follows static declaration
10996 | EXPORT_SYMBOL_GPL(ufshcd_system_freeze);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
90 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10996:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
10996 | EXPORT_SYMBOL_GPL(ufshcd_system_freeze);
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10990:5: note: previous definition of 'ufshcd_system_freeze' with type 'int(struct device *)'
10990 | int ufshcd_system_freeze(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:11027:19: error: non-static declaration of 'ufshcd_system_restore' follows static declaration
11027 | EXPORT_SYMBOL_GPL(ufshcd_system_restore);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
90 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11027:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
11027 | EXPORT_SYMBOL_GPL(ufshcd_system_restore);
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:10998:5: note: previous definition of 'ufshcd_system_restore' with type 'int(struct device *)'
10998 | int ufshcd_system_restore(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:11033:19: error: non-static declaration of 'ufshcd_system_thaw' follows static declaration
11033 | EXPORT_SYMBOL_GPL(ufshcd_system_thaw);
| ^~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
90 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11033:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
11033 | EXPORT_SYMBOL_GPL(ufshcd_system_thaw);
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11029:5: note: previous definition of 'ufshcd_system_thaw' with type 'int(struct device *)'
11029 | int ufshcd_system_thaw(struct device *dev)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11043:12: error: invalid storage class for function 'ufshcd_set_dma_mask'
11043 | static int ufshcd_set_dma_mask(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11059:13: error: invalid storage class for function 'ufshcd_devres_release'
11059 | static void ufshcd_devres_release(void *host)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11117:15: error: non-static declaration of 'ufshcd_alloc_host' follows static declaration
11117 | EXPORT_SYMBOL(ufshcd_alloc_host);
| ^~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:89:41: note: in expansion of macro '_EXPORT_SYMBOL'
89 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11117:1: note: in expansion of macro 'EXPORT_SYMBOL'
11117 | EXPORT_SYMBOL(ufshcd_alloc_host);
| ^~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11075:5: note: previous definition of 'ufshcd_alloc_host' with type 'int(struct device *, struct ufs_hba **)'
11075 | int ufshcd_alloc_host(struct device *dev, struct ufs_hba **hba_handle)
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11120:21: error: invalid storage class for function 'ufshcd_queue_tmf'
11120 | static blk_status_t ufshcd_queue_tmf(struct blk_mq_hw_ctx *hctx,
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11128:21: error: initializer element is not constant
11128 | .queue_rq = ufshcd_queue_tmf,
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11128:21: note: (near initialization for 'ufshcd_tmf_ops.queue_rq')
drivers/ufs/core/ufshcd.c:11131:12: error: invalid storage class for function 'ufshcd_add_scsi_host'
11131 | static int ufshcd_add_scsi_host(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11468:19: error: non-static declaration of 'ufshcd_init' follows static declaration
11468 | EXPORT_SYMBOL_GPL(ufshcd_init);
| ^~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
90 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11468:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
11468 | EXPORT_SYMBOL_GPL(ufshcd_init);
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11207:5: note: previous definition of 'ufshcd_init' with type 'int(struct ufs_hba *, void *, unsigned int)'
11207 | int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
| ^~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11479:19: error: non-static declaration of 'ufshcd_resume_complete' follows static declaration
11479 | EXPORT_SYMBOL_GPL(ufshcd_resume_complete);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
90 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11479:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
11479 | EXPORT_SYMBOL_GPL(ufshcd_resume_complete);
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11470:6: note: previous definition of 'ufshcd_resume_complete' with type 'void(struct device *)'
11470 | void ufshcd_resume_complete(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11481:13: error: invalid storage class for function 'ufshcd_rpm_ok_for_spm'
11481 | static bool ufshcd_rpm_ok_for_spm(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11531:19: error: non-static declaration of '__ufshcd_suspend_prepare' follows static declaration
11531 | EXPORT_SYMBOL_GPL(__ufshcd_suspend_prepare);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
90 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11531:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
11531 | EXPORT_SYMBOL_GPL(__ufshcd_suspend_prepare);
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11501:5: note: previous definition of '__ufshcd_suspend_prepare' with type 'int(struct device *, bool)' {aka 'int(struct device *, _Bool)'}
11501 | int __ufshcd_suspend_prepare(struct device *dev, bool rpm_ok_for_spm)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11537:19: error: non-static declaration of 'ufshcd_suspend_prepare' follows static declaration
11537 | EXPORT_SYMBOL_GPL(ufshcd_suspend_prepare);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
90 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11537:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
11537 | EXPORT_SYMBOL_GPL(ufshcd_suspend_prepare);
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11533:5: note: previous definition of 'ufshcd_suspend_prepare' with type 'int(struct device *)'
11533 | int ufshcd_suspend_prepare(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:11540:12: error: invalid storage class for function 'ufshcd_wl_poweroff'
11540 | static int ufshcd_wl_poweroff(struct device *dev)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11550:12: error: invalid storage class for function 'ufshcd_wl_probe'
11550 | static int ufshcd_wl_probe(struct scsi_device *sdev)
| ^~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11564:13: error: invalid storage class for function 'ufshcd_wl_remove'
11564 | static void ufshcd_wl_remove(struct scsi_device *sdev)
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11573:20: error: initializer element is not constant
11573 | .suspend = ufshcd_wl_suspend,
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11573:20: note: (near initialization for 'ufshcd_wl_pm_ops.suspend')
drivers/ufs/core/ufshcd.c:11574:19: error: initializer element is not constant
11574 | .resume = ufshcd_wl_resume,
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11574:19: note: (near initialization for 'ufshcd_wl_pm_ops.resume')
drivers/ufs/core/ufshcd.c:11575:19: error: initializer element is not constant
11575 | .freeze = ufshcd_wl_suspend,
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11575:19: note: (near initialization for 'ufshcd_wl_pm_ops.freeze')
drivers/ufs/core/ufshcd.c:11576:17: error: initializer element is not constant
11576 | .thaw = ufshcd_wl_resume,
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11576:17: note: (near initialization for 'ufshcd_wl_pm_ops.thaw')
drivers/ufs/core/ufshcd.c:11577:21: error: initializer element is not constant
11577 | .poweroff = ufshcd_wl_poweroff,
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11577:21: note: (near initialization for 'ufshcd_wl_pm_ops.poweroff')
drivers/ufs/core/ufshcd.c:11578:20: error: initializer element is not constant
11578 | .restore = ufshcd_wl_resume,
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11578:20: note: (near initialization for 'ufshcd_wl_pm_ops.restore')
In file included from include/linux/device.h:25,
from include/linux/async.h:14:
drivers/ufs/core/ufshcd.c:11580:28: error: initializer element is not constant
11580 | SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/pm.h:339:28: note: in definition of macro 'RUNTIME_PM_OPS'
339 | .runtime_suspend = suspend_fn, \
| ^~~~~~~~~~
drivers/ufs/core/ufshcd.c:11580:9: note: in expansion of macro 'SET_RUNTIME_PM_OPS'
11580 | SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11580:28: note: (near initialization for 'ufshcd_wl_pm_ops.runtime_suspend')
11580 | SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/pm.h:339:28: note: in definition of macro 'RUNTIME_PM_OPS'
339 | .runtime_suspend = suspend_fn, \
| ^~~~~~~~~~
drivers/ufs/core/ufshcd.c:11580:9: note: in expansion of macro 'SET_RUNTIME_PM_OPS'
11580 | SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11580:55: error: initializer element is not constant
11580 | SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/pm.h:340:27: note: in definition of macro 'RUNTIME_PM_OPS'
340 | .runtime_resume = resume_fn, \
| ^~~~~~~~~
drivers/ufs/core/ufshcd.c:11580:9: note: in expansion of macro 'SET_RUNTIME_PM_OPS'
11580 | SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11580:55: note: (near initialization for 'ufshcd_wl_pm_ops.runtime_resume')
11580 | SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/pm.h:340:27: note: in definition of macro 'RUNTIME_PM_OPS'
340 | .runtime_resume = resume_fn, \
| ^~~~~~~~~
drivers/ufs/core/ufshcd.c:11580:9: note: in expansion of macro 'SET_RUNTIME_PM_OPS'
11580 | SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11583:13: error: invalid storage class for function 'ufshcd_check_header_layout'
11583 | static void ufshcd_check_header_layout(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11641:18: error: initializer element is not constant
11641 | .probe = ufshcd_wl_probe,
| ^~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11641:18: note: (near initialization for 'ufs_dev_wlun_template.probe')
drivers/ufs/core/ufshcd.c:11642:19: error: initializer element is not constant
11642 | .remove = ufshcd_wl_remove,
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11642:19: note: (near initialization for 'ufs_dev_wlun_template.remove')
drivers/ufs/core/ufshcd.c:11643:21: error: initializer element is not constant
11643 | .shutdown = ufshcd_wl_shutdown,
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11643:21: note: (near initialization for 'ufs_dev_wlun_template.shutdown')
drivers/ufs/core/ufshcd.c:11650:19: error: invalid storage class for function 'ufshcd_core_init'
11650 | static int __init ufshcd_core_init(void)
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11664:20: error: invalid storage class for function 'ufshcd_core_exit'
11664 | static void __exit ufshcd_core_exit(void)
| ^~~~~~~~~~~~~~~~
In file included from include/linux/device/driver.h:21,
from include/linux/device.h:32:
include/linux/module.h:132:49: error: invalid storage class for function '__inittest'
132 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
drivers/ufs/core/ufshcd.c:11670:1: note: in expansion of macro 'module_init'
11670 | module_init(ufshcd_core_init);
| ^~~~~~~~~~~
drivers/ufs/core/ufshcd.c:11670:1: warning: 'alias' attribute ignored [-Wattributes]
vim +/ufshcd_vreg_set_hpm +10302 drivers/ufs/core/ufshcd.c
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10300
9bb25e5d9d2948 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-07-21 10301 #ifdef CONFIG_PM
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 @10302 static int ufshcd_vreg_set_hpm(struct ufs_hba *hba)
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10303 {
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10304 bool vcc_on = false;
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10305 int ret = 0;
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10306
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10307 if (ufshcd_is_ufs_dev_poweroff(hba) && ufshcd_is_link_off(hba) &&
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10308 !hba->dev_info.is_lu_power_on_wp) {
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10309 ret = ufshcd_setup_vreg(hba, true);
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10310 vcc_on = true;
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10311 } else if (!ufshcd_is_ufs_dev_active(hba)) {
23043dd87b153d drivers/scsi/ufs/ufshcd.c Can Guo 2021-04-25 10312 if (!ufshcd_is_link_active(hba)) {
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10313 ret = ufshcd_config_vreg_hpm(hba, hba->vreg_info.vccq);
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10314 if (ret)
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10315 goto vcc_disable;
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10316 ret = ufshcd_config_vreg_hpm(hba, hba->vreg_info.vccq2);
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10317 if (ret)
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10318 goto vccq_lpm;
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10319 }
69d72ac8369a50 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2016-10-27 10320 ret = ufshcd_toggle_vreg(hba->dev, hba->vreg_info.vcc, true);
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10321 vcc_on = true;
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10322 }
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10323 goto out;
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10324
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10325 vccq_lpm:
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10326 ufshcd_config_vreg_lpm(hba, hba->vreg_info.vccq);
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10327 vcc_disable:
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10328 ufshcd_toggle_vreg(hba->dev, hba->vreg_info.vcc, false);
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10329 out:
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10330 /*
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10331 * On platforms with a slow VCC ramp-up, a delay is needed after
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10332 * turning on VCC to ensure the voltage is stable before the
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10333 * reference clock is enabled.
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10334 */
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10335 if (hba->quirks & UFSHCD_QUIRK_VCC_ON_DELAY && !ret && vcc_on &&
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10336 hba->vreg_info.vcc && !hba->vreg_info.vcc->always_on)
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10337 usleep_range(1000, 1100);
6ab94d0194ddca drivers/ufs/core/ufshcd.c Ed Tsai 2026-03-10 10338
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10339 return ret;
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10340 }
9bb25e5d9d2948 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-07-21 10341 #endif /* CONFIG_PM */
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani 2014-09-25 10342
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8
2026-10-26 5:26 ` [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8 HOYOUNG SEO
2026-10-26 14:42 ` Stanley Jhu
2026-10-26 17:44 ` kernel test robot
@ 2026-10-26 18:44 ` kernel test robot
2 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-10-26 18:44 UTC (permalink / raw)
To: HOYOUNG SEO, linux-scsi, linux-kernel, alim.akhtar, avri.altman,
jejb, martin.petersen, bvanassche, kwangwon.min, kwmad.kim, cpgs,
h10.kim
Cc: oe-kbuild-all, HOYOUNG SEO
Hi HOYOUNG,
kernel test robot noticed the following build errors:
[auto build test ERROR on jejb-scsi/for-next]
[also build test ERROR on mkp-scsi/for-next linus/master next-20261023]
[cannot apply to linux-review/HOYOUNG-SEO/scsi-ufs-Change-the-error-check-sequence-for-auto-hibern8/20261022-164249 v7.3]
[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/HOYOUNG-SEO/scsi-ufs-Change-the-error-check-sequence-for-auto-hibern8/20261026-142632
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link: https://lore.kernel.org/r/20261026052632.1848929-1-hy50.seo%40samsung.com
patch subject: [PATCH v4] scsi: ufs: Change the error check sequence for auto hibern8
config: sh-randconfig-1001-20261026 (https://download.01.org/0day-ci/archive/20261027/202610270253.MSZEgXih-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 13.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261027/202610270253.MSZEgXih-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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610270253.MSZEgXih-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/ufs/core/ufshcd.c: In function 'ufshcd_uic_cmd_compl':
>> drivers/ufs/core/ufshcd.c:6032:13: error: invalid storage class for function '__ufshcd_transfer_req_compl'
6032 | static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6046:13: error: invalid storage class for function 'ufshcd_clear_polled'
6046 | static void ufshcd_clear_polled(struct ufs_hba *hba,
| ^~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6065:12: error: invalid storage class for function 'ufshcd_poll'
6065 | static int ufshcd_poll(struct Scsi_Host *shost, unsigned int queue_num)
| ^~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6097:13: error: invalid storage class for function 'ufshcd_mcq_force_compl_one'
6097 | static bool ufshcd_mcq_force_compl_one(struct request *rq, void *priv)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6134:13: error: invalid storage class for function 'ufshcd_mcq_compl_pending_transfer'
6134 | static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6159:20: error: invalid storage class for function 'ufshcd_transfer_req_compl'
6159 | static irqreturn_t ufshcd_transfer_req_compl(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6234:19: error: invalid storage class for function 'ufshcd_disable_ee'
6234 | static inline int ufshcd_disable_ee(struct ufs_hba *hba, u16 mask)
| ^~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6249:19: error: invalid storage class for function 'ufshcd_enable_ee'
6249 | static inline int ufshcd_enable_ee(struct ufs_hba *hba, u16 mask)
| ^~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6266:12: error: invalid storage class for function 'ufshcd_enable_auto_bkops'
6266 | static int ufshcd_enable_auto_bkops(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6306:12: error: invalid storage class for function 'ufshcd_disable_auto_bkops'
6306 | static int ufshcd_disable_auto_bkops(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6350:13: error: invalid storage class for function 'ufshcd_force_reset_auto_bkops'
6350 | static void ufshcd_force_reset_auto_bkops(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6365:19: error: invalid storage class for function 'ufshcd_get_bkops_status'
6365 | static inline int ufshcd_get_bkops_status(struct ufs_hba *hba, u32 *status)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6386:12: error: invalid storage class for function 'ufshcd_bkops_ctrl'
6386 | static int ufshcd_bkops_ctrl(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6412:19: error: invalid storage class for function 'ufshcd_get_ee_status'
6412 | static inline int ufshcd_get_ee_status(struct ufs_hba *hba, u32 *status)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6418:13: error: invalid storage class for function 'ufshcd_bkops_exception_event_handler'
6418 | static void ufshcd_bkops_exception_event_handler(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6455:12: error: invalid storage class for function '__ufshcd_wb_toggle'
6455 | static int __ufshcd_wb_toggle(struct ufs_hba *hba, bool set, enum flag_idn idn)
| ^~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6487:13: error: invalid storage class for function 'ufshcd_wb_toggle_buf_flush_during_h8'
6487 | static void ufshcd_wb_toggle_buf_flush_during_h8(struct ufs_hba *hba,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6540:13: error: invalid storage class for function 'ufshcd_wb_curr_buff_threshold_check'
6540 | static bool ufshcd_wb_curr_buff_threshold_check(struct ufs_hba *hba,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6566:13: error: invalid storage class for function 'ufshcd_wb_force_disable'
6566 | static void ufshcd_wb_force_disable(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/ufs/core/ufshcd.c:6578:13: error: invalid storage class for function 'ufshcd_is_wb_buf_lifetime_available'
6578 | static bool ufshcd_is_wb_buf_lifetime_available(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6607:13: error: invalid storage class for function 'ufshcd_wb_need_flush'
6607 | static bool ufshcd_wb_need_flush(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6646:13: error: invalid storage class for function 'ufshcd_rpm_dev_flush_recheck_work'
6646 | static void ufshcd_rpm_dev_flush_recheck_work(struct work_struct *work)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6668:13: error: invalid storage class for function 'ufshcd_exception_event_handler'
6668 | static void ufshcd_exception_event_handler(struct work_struct *work)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6704:13: error: invalid storage class for function 'ufshcd_complete_requests'
6704 | static void ufshcd_complete_requests(struct ufs_hba *hba, bool force_compl)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6721:13: error: invalid storage class for function 'ufshcd_quirk_dl_nac_errors'
6721 | static bool ufshcd_quirk_dl_nac_errors(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6786:20: error: invalid storage class for function 'ufshcd_is_saved_err_fatal'
6786 | static inline bool ufshcd_is_saved_err_fatal(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from arch/sh/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/instrumented.h:10,
from include/linux/atomic/atomic-instrumented.h:17,
from include/linux/atomic.h:82,
from include/asm-generic/bitops/atomic.h:5,
from arch/sh/include/asm/bitops.h:23,
from include/linux/bitops.h:67,
from include/linux/bitmap.h:8,
from include/linux/nodemask.h:91,
from include/linux/numa.h:6,
from include/linux/async.h:13,
from drivers/ufs/core/ufshcd.c:12:
drivers/ufs/core/ufshcd.c:6814:19: error: non-static declaration of 'ufshcd_force_error_recovery' follows static declaration
6814 | EXPORT_SYMBOL_GPL(ufshcd_force_error_recovery);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:76:28: note: in definition of macro '__EXPORT_SYMBOL'
76 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:90:41: note: in expansion of macro '_EXPORT_SYMBOL'
90 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "GPL")
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6814:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
6814 | EXPORT_SYMBOL_GPL(ufshcd_force_error_recovery);
| ^~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6807:6: note: previous definition of 'ufshcd_force_error_recovery' with type 'void(struct ufs_hba *)'
6807 | void ufshcd_force_error_recovery(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6816:13: error: invalid storage class for function 'ufshcd_clk_scaling_allow'
6816 | static void ufshcd_clk_scaling_allow(struct ufs_hba *hba, bool allow)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6825:13: error: invalid storage class for function 'ufshcd_clk_scaling_suspend'
6825 | static void ufshcd_clk_scaling_suspend(struct ufs_hba *hba, bool suspend)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6838:13: error: invalid storage class for function 'ufshcd_err_handling_prepare'
6838 | static void ufshcd_err_handling_prepare(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6882:13: error: invalid storage class for function 'ufshcd_err_handling_unprepare'
6882 | static void ufshcd_err_handling_unprepare(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6893:20: error: invalid storage class for function 'ufshcd_err_handling_should_stop'
6893 | static inline bool ufshcd_err_handling_should_stop(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6950:20: error: invalid storage class for function 'ufshcd_recover_pm_error'
6950 | static inline void ufshcd_recover_pm_error(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6955:13: error: invalid storage class for function 'ufshcd_is_pwr_mode_restore_needed'
6955 | static bool ufshcd_is_pwr_mode_restore_needed(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6971:13: error: invalid storage class for function 'ufshcd_abort_one'
6971 | static bool ufshcd_abort_one(struct request *rq, void *priv)
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:6997:13: error: invalid storage class for function 'ufshcd_abort_all'
6997 | static bool ufshcd_abort_all(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:7023:13: error: invalid storage class for function 'ufshcd_err_handler'
7023 | static void ufshcd_err_handler(struct work_struct *work)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:7230:20: error: invalid storage class for function 'ufshcd_update_uic_error'
7230 | static irqreturn_t ufshcd_update_uic_error(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:7332:20: error: invalid storage class for function 'ufshcd_check_errors'
7332 | static irqreturn_t ufshcd_check_errors(struct ufs_hba *hba, u32 intr_status)
| ^~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:7409:20: error: invalid storage class for function 'ufshcd_tmc_handler'
7409 | static irqreturn_t ufshcd_tmc_handler(struct ufs_hba *hba)
| ^~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:7437:20: error: invalid storage class for function 'ufshcd_handle_mcq_cq_events'
7437 | static irqreturn_t ufshcd_handle_mcq_cq_events(struct ufs_hba *hba, bool reset_iag)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:7480:20: error: invalid storage class for function 'ufshcd_sl_intr'
7480 | static irqreturn_t ufshcd_sl_intr(struct ufs_hba *hba, u32 intr_status)
| ^~~~~~~~~~~~~~
drivers/ufs/core/ufshcd.c:7514:20: error: invalid storage class for function 'ufshcd_intr'
7514 | static irqreturn_t ufshcd_intr(int irq, void *__hba)
| ^~~~~~~~~~~
drivers/ufs/core/ufshcd.c:7553:12: error: invalid storage class for function 'ufshcd_clear_tm_cmd'
7553 | static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag)
| ^~~~~~~~~~~~~~~~~~~
vim +/__ufshcd_transfer_req_compl +6032 drivers/ufs/core/ufshcd.c
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6026
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6027 /**
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6028 * __ufshcd_transfer_req_compl - handle SCSI and query command completion
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6029 * @hba: per adapter instance
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6030 * @completed_reqs: bitmask that indicates which requests to complete
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6031 */
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 @6032 static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6033 unsigned long completed_reqs)
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6034 {
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6035 int tag;
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6036
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6037 for_each_set_bit(tag, &completed_reqs, hba->nutrs)
c30d8d010b5efd drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6038 ufshcd_compl_one_cqe(hba, tag, NULL);
a45f937110fa6b drivers/scsi/ufs/ufshcd.c Can Guo 2021-05-24 6039 }
7a3e97b0dc4bba drivers/scsi/ufs/ufshcd.c Santosh Yaraganavi 2012-02-29 6040
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6041 /* Any value that is not an existing queue number is fine for this constant. */
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6042 enum {
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6043 UFSHCD_POLL_FROM_INTERRUPT_CONTEXT = -1
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6044 };
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6045
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 @6046 static void ufshcd_clear_polled(struct ufs_hba *hba,
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6047 unsigned long *completed_reqs)
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6048 {
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6049 int tag;
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6050
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6051 for_each_set_bit(tag, completed_reqs, hba->nutrs) {
22089c218037ca drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6052 struct scsi_cmnd *cmd = scsi_host_find_tag(hba->host, tag);
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6053
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6054 if (!cmd)
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6055 continue;
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6056 if (scsi_cmd_to_rq(cmd)->cmd_flags & REQ_POLLED)
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6057 __clear_bit(tag, completed_reqs);
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6058 }
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6059 }
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6060
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6061 /*
3a17fefe0f1960 drivers/ufs/core/ufshcd.c Bart Van Assche 2023-07-27 6062 * Return: > 0 if one or more commands have been completed or 0 if no
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6063 * requests have been completed.
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6064 */
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 @6065 static int ufshcd_poll(struct Scsi_Host *shost, unsigned int queue_num)
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6066 {
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6067 struct ufs_hba *hba = shost_priv(shost);
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6068 unsigned long completed_reqs, flags;
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6069 u32 tr_doorbell;
ed975065c31c2a drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6070 struct ufs_hw_queue *hwq;
ed975065c31c2a drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6071
0fca3318e550d4 drivers/ufs/core/ufshcd.c Bart Van Assche 2024-07-08 6072 if (hba->mcq_enabled) {
ccb23dc3435a0d drivers/ufs/core/ufshcd.c Po-Wen Kao 2023-06-10 6073 hwq = &hba->uhq[queue_num];
ed975065c31c2a drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6074
ed975065c31c2a drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6075 return ufshcd_mcq_poll_cqe_lock(hba, hwq);
ed975065c31c2a drivers/ufs/core/ufshcd.c Asutosh Das 2023-01-13 6076 }
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6077
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6078 spin_lock_irqsave(&hba->outstanding_lock, flags);
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6079 tr_doorbell = ufshcd_readl(hba, REG_UTP_TRANSFER_REQ_DOOR_BELL);
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6080 completed_reqs = ~tr_doorbell & hba->outstanding_reqs;
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6081 WARN_ONCE(completed_reqs & ~hba->outstanding_reqs,
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6082 "completed: %#lx; outstanding: %#lx\n", completed_reqs,
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6083 hba->outstanding_reqs);
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6084 if (queue_num == UFSHCD_POLL_FROM_INTERRUPT_CONTEXT) {
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6085 /* Do not complete polled requests from interrupt context. */
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6086 ufshcd_clear_polled(hba, &completed_reqs);
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6087 }
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6088 hba->outstanding_reqs &= ~completed_reqs;
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6089 spin_unlock_irqrestore(&hba->outstanding_lock, flags);
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6090
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6091 if (completed_reqs)
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6092 __ufshcd_transfer_req_compl(hba, completed_reqs);
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6093
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6094 return completed_reqs != 0;
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6095 }
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6096
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 @6097 static bool ufshcd_mcq_force_compl_one(struct request *rq, void *priv)
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6098 {
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6099 struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq);
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6100 struct scsi_device *sdev = rq->q->queuedata;
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6101 struct Scsi_Host *shost = sdev->host;
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6102 struct ufs_hba *hba = shost_priv(shost);
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6103 struct ufs_hw_queue *hwq = ufshcd_mcq_req_to_hwq(hba, rq);
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6104
4b6c0d9cca359d drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6105 if (blk_mq_is_reserved_rq(rq) || !hwq)
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6106 return true;
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6107
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6108 /*
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6109 * For those cmds of which the cqes are not present in the cq, complete
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6110 * them explicitly.
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6111 */
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6112 scoped_guard(spinlock_irqsave, &hwq->cq_lock) {
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6113 if (!test_bit(SCMD_STATE_COMPLETE, &cmd->state)) {
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6114 set_host_byte(cmd, DID_REQUEUE);
22089c218037ca drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6115 ufshcd_release_scsi_cmd(hba, cmd);
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6116 scsi_done(cmd);
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6117 }
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6118 }
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6119
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6120 return true;
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6121 }
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6122
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6123 /**
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6124 * ufshcd_mcq_compl_pending_transfer - MCQ mode function. It is
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6125 * invoked from the error handler context or ufshcd_host_reset_and_restore()
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6126 * to complete the pending transfers and free the resources associated with
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6127 * the scsi command.
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6128 *
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6129 * @hba: per adapter instance
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6130 * @force_compl: This flag is set to true when invoked
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6131 * from ufshcd_host_reset_and_restore() in which case it requires special
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6132 * handling because the host controller has been reset by ufshcd_hba_stop().
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6133 */
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 @6134 static void ufshcd_mcq_compl_pending_transfer(struct ufs_hba *hba,
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6135 bool force_compl)
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6136 {
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6137 int i;
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6138
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6139 for (i = 0; i < hba->nr_hw_queues; i++) {
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6140 if (force_compl)
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6141 ufshcd_mcq_compl_all_cqes_lock(hba, &hba->uhq[i]);
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6142 else
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6143 ufshcd_mcq_poll_cqe_lock(hba, &hba->uhq[i]);
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6144 }
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6145
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6146 if (force_compl)
63a5b959c854c3 drivers/ufs/core/ufshcd.c Bart Van Assche 2025-10-31 6147 blk_mq_tagset_busy_iter(&hba->host->tag_set,
469fa055664bfd drivers/ufs/core/ufshcd.c Stanley Jhu 2026-09-28 6148 ufshcd_mcq_force_compl_one, NULL);
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6149 }
ab248643d3d68b drivers/ufs/core/ufshcd.c Bao D. Nguyen 2023-05-29 6150
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6151 /**
1f522c5049016c drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-07-21 6152 * ufshcd_transfer_req_compl - handle SCSI and query command completion
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6153 * @hba: per adapter instance
9333d77573485c drivers/scsi/ufs/ufshcd.c Venkat Gopalakrishnan 2019-11-14 6154 *
3a17fefe0f1960 drivers/ufs/core/ufshcd.c Bart Van Assche 2023-07-27 6155 * Return:
9333d77573485c drivers/scsi/ufs/ufshcd.c Venkat Gopalakrishnan 2019-11-14 6156 * IRQ_HANDLED - If interrupt is valid
9333d77573485c drivers/scsi/ufs/ufshcd.c Venkat Gopalakrishnan 2019-11-14 6157 * IRQ_NONE - If invalid interrupt
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6158 */
11682523573c1c drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-10-20 @6159 static irqreturn_t ufshcd_transfer_req_compl(struct ufs_hba *hba)
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6160 {
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6161 /* Resetting interrupt aggregation counters first and reading the
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6162 * DOOR_BELL afterward allows us to handle all the completed requests.
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6163 * In order to prevent other interrupts starvation the DB is read once
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6164 * after reset. The down side of this solution is the possibility of
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6165 * false interrupt if device completes another request after resetting
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6166 * aggregation and before reading the DB.
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6167 */
b638b5eb624bd5 drivers/scsi/ufs/ufshcd.c Alim Akhtar 2020-05-28 6168 if (ufshcd_is_intr_aggr_allowed(hba) &&
b638b5eb624bd5 drivers/scsi/ufs/ufshcd.c Alim Akhtar 2020-05-28 6169 !(hba->quirks & UFSHCI_QUIRK_SKIP_RESET_INTR_AGGR))
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6170 ufshcd_reset_intr_aggr(hba);
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6171
045da3077bc57e drivers/ufs/core/ufshcd.c Akinobu Mita 2023-11-18 6172 if (ufs_fail_completion(hba))
c11a1ae9b8f65e drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-07-21 6173 return IRQ_HANDLED;
c11a1ae9b8f65e drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-07-21 6174
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6175 /*
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6176 * Ignore the ufshcd_poll() return value and return IRQ_HANDLED since we
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6177 * do not want polling to trigger spurious interrupt complaints.
eaab9b57305496 drivers/scsi/ufs/ufshcd.c Bart Van Assche 2021-12-03 6178 */
ee8c88cab4afbd drivers/ufs/core/ufshcd.c Bart Van Assche 2022-11-18 6179 ufshcd_poll(hba->host, UFSHCD_POLL_FROM_INTERRUPT_CONTEXT);
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6180
9333d77573485c drivers/scsi/ufs/ufshcd.c Venkat Gopalakrishnan 2019-11-14 6181 return IRQ_HANDLED;
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6182 }
9a47ec7c390e81 drivers/scsi/ufs/ufshcd.c Yaniv Gardi 2016-03-10 6183
7deedfdaeccfec drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6184 int __ufshcd_write_ee_control(struct ufs_hba *hba, u32 ee_ctrl_mask)
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6185 {
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6186 return ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_WRITE_ATTR,
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6187 QUERY_ATTR_IDN_EE_CONTROL, 0, 0,
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6188 &ee_ctrl_mask);
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6189 }
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6190
7deedfdaeccfec drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6191 int ufshcd_write_ee_control(struct ufs_hba *hba)
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6192 {
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6193 int err;
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6194
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6195 mutex_lock(&hba->ee_ctrl_mutex);
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6196 err = __ufshcd_write_ee_control(hba, hba->ee_ctrl_mask);
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6197 mutex_unlock(&hba->ee_ctrl_mutex);
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6198 if (err)
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6199 dev_err(hba->dev, "%s: failed to write ee control %d\n",
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6200 __func__, err);
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6201 return err;
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6202 }
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6203
35d11ec239e099 drivers/ufs/core/ufshcd.c Krzysztof Kozlowski 2022-06-23 @6204 int ufshcd_update_ee_control(struct ufs_hba *hba, u16 *mask,
35d11ec239e099 drivers/ufs/core/ufshcd.c Krzysztof Kozlowski 2022-06-23 6205 const u16 *other_mask, u16 set, u16 clr)
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6206 {
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6207 u16 new_mask, ee_ctrl_mask;
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6208 int err = 0;
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6209
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6210 mutex_lock(&hba->ee_ctrl_mutex);
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6211 new_mask = (*mask & ~clr) | set;
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6212 ee_ctrl_mask = new_mask | *other_mask;
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6213 if (ee_ctrl_mask != hba->ee_ctrl_mask)
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6214 err = __ufshcd_write_ee_control(hba, ee_ctrl_mask);
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6215 /* Still need to update 'mask' even if 'ee_ctrl_mask' was unchanged */
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6216 if (!err) {
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6217 hba->ee_ctrl_mask = ee_ctrl_mask;
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6218 *mask = new_mask;
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6219 }
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6220 mutex_unlock(&hba->ee_ctrl_mutex);
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6221 return err;
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6222 }
cd4694756188dc drivers/scsi/ufs/ufshcd.c Adrian Hunter 2021-02-09 6223
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread