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

Stephen Rothwell posted 1 patch 10 months, 3 weeks ago
There is a newer version of this series
linux-next: manual merge of the scsi-mkp tree with Linus' tree
Posted by Stephen Rothwell 10 months, 3 weeks ago
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.

-- 
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;
Re: linux-next: manual merge of the scsi-mkp tree with Linus' tree
Posted by Bart Van Assche 10 months, 3 weeks ago
On 3/20/25 10:47 PM, Stephen Rothwell wrote:
> 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.

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.
Re: linux-next: manual merge of the scsi-mkp tree with Linus' tree
Posted by Stephen Rothwell 10 months, 3 weeks ago
Hi Bart,

On Fri, 21 Mar 2025 09:29:20 -0700 Bart Van Assche <bvanassche@acm.org> 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.

-- 
Cheers,
Stephen Rothwell