Skip to contentSkip to conversation

linux-next: manual merge of the scsi-mkp tree with Linus' tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Mar 21, 2025 – Mar 23, 2025 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the scsi-mkp tree got a conflict in:

drivers/ufs/core/ufshcd.c

between commit:

fe06b7c07f3f ("scsi: ufs: core: Set default runtime/system PM levels before ufshcd_hba_init()")

from Linus' tree and commit:

20b97acc4caf ("scsi: ufs: core: Fix a race condition related to device commands")

from the scsi-mkp tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 31 lines
Cheers,
Stephen Rothwell

diff --cc drivers/ufs/core/ufshcd.c
index 0534390c2a35,3288a7da73dc..000000000000
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@@ -10475,21 -10460,8 +10460,23 @@@ int ufshcd_init(struct ufs_hba *hba, vo
  	 */
  	spin_lock_init(&hba->clk_gating.lock);
  
 +	/*
 +	 * Set the default power management level for runtime and system PM.
 +	 * Host controller drivers can override them in their
 +	 * 'ufs_hba_variant_ops::init' callback.
 +	 *
 +	 * Default power saving mode is to keep UFS link in Hibern8 state
 +	 * and UFS device in sleep state.
 +	 */
 +	hba->rpm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
 +						UFS_SLEEP_PWR_MODE,
 +						UIC_LINK_HIBERN8_STATE);
 +	hba->spm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
 +						UFS_SLEEP_PWR_MODE,
 +						UIC_LINK_HIBERN8_STATE);
 +
+ 	init_completion(&hba->dev_cmd.complete);
+ 
  	err = ufshcd_hba_init(hba);
  	if (err)
  		goto out_error;
#1 lore raw
Quoted 14 lines · Stephen Rothwell

Hi all,

Today's linux-next merge of the scsi-mkp tree got a conflict in:

drivers/ufs/core/ufshcd.c

between commit:

fe06b7c07f3f ("scsi: ufs: core: Set default runtime/system PM levels before ufshcd_hba_init()")

from Linus' tree and commit:

20b97acc4caf ("scsi: ufs: core: Fix a race condition related to device commands")

Quoted 8 lines

from the scsi-mkp tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Hi Stephen,

Thank you for having resolved this conflict. While the conflict resolution looks good to me and should result in working code, it may be desirable to resolve it differently (init_completion() before the ufs_get_desired_pm_lvl_for_dev_link_state() calls). This way the
spin_lock_init() and init_completion() calls stay close to each other.

Thanks,

Bart.

#2 lore raw

Hi Bart,

Quoted 6 lines · On Fri, 21 Mar 2025 09:29:20 -0700 Bart Van Assche <[email protected]> wrote:

Thank you for having resolved this conflict. While the conflict resolution looks good to me and should result in working code, it may be desirable to resolve it differently (init_completion() before the ufs_get_desired_pm_lvl_for_dev_link_state() calls). This way the spin_lock_init() and init_completion() calls stay close to each other.

I have fixed this up from today. Thanks for checking.

Signature · 2 lines
Cheers,
Stephen Rothwell