Subject: linux-next: manual merge of the scsi-mkp tree with the scsi-fixes, scsi trees

From: Stephen Rothwell <[email-masked]>
Date: Tue, 6 Apr 2021 19:32:18 +1000

Hi all,

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

  drivers/scsi/ufs/ufshcd.c

between commit:

  4b42d557a8ad ("scsi: ufs: core: Fix wrong Task Tag used in task management request UPIUs")

from the scsi-fixes, scsi trees and commit:

  1352eec8c0da ("scsi: ufs: core: Fix out-of-bounds warnings in ufshcd_exec_raw_upiu_cmd()")

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/scsi/ufs/ufshcd.c
index a5f3ae3b6170,58d7f264c664..000000000000
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@@ -6392,16 -6398,17 +6396,16 @@@ static int __ufshcd_issue_tm_cmd(struc
  	ufshcd_hold(hba, false);
  
  	spin_lock_irqsave(host->host_lock, flags);
 -	task_tag = hba->nutrs + free_slot;
 +	blk_mq_start_request(req);
  
 +	task_tag = req->tag;
- 	treq->req_header.dword_0 |= cpu_to_be32(task_tag);
+ 	treq->upiu_req.req_header.dword_0 |= cpu_to_be32(task_tag);
  
 -	memcpy(hba->utmrdl_base_addr + free_slot, treq, sizeof(*treq));
 -	ufshcd_vops_setup_task_mgmt(hba, free_slot, tm_function);
 +	memcpy(hba->utmrdl_base_addr + task_tag, treq, sizeof(*treq));
 +	ufshcd_vops_setup_task_mgmt(hba, task_tag, tm_function);
  
  	/* send command to the controller */
 -	__set_bit(free_slot, &hba->outstanding_tasks);
 +	__set_bit(task_tag, &hba->outstanding_tasks);
  
  	/* Make sure descriptors are ready before ringing the task doorbell */
  	wmb();