From: Martin K. Petersen <martin.petersen@oracle.com>
Date: Tue, 12 Oct 2021 15:58:12 +0000 (-0400)
Subject: Merge branch '5.15/scsi-fixes' into 5.16/scsi-staging
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ec65e6beb02e09e34f3811dd85f7247da35edafc;p=linux.git

Merge branch '5.15/scsi-fixes' into 5.16/scsi-staging

Merge the 5.15/scsi-fixes branch into the staging tree to resolve UFS
conflict reported by sfr.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---

ec65e6beb02e09e34f3811dd85f7247da35edafc
diff --cc drivers/scsi/ufs/ufshcd.c
index d91a405fd1815,95be7ecdfe10b..9283ab4ca2da3
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@@ -6063,23 -6034,22 +6053,24 @@@ static bool ufshcd_is_pwr_mode_restore_
  
  /**
   * ufshcd_err_handler - handle UFS errors that require s/w attention
-  * @host: SCSI host pointer
+  * @work: pointer to work structure
   */
- static void ufshcd_err_handler(struct Scsi_Host *host)
+ static void ufshcd_err_handler(struct work_struct *work)
  {
- 	struct ufs_hba *hba = shost_priv(host);
 +	int retries = MAX_ERR_HANDLER_RETRIES;
+ 	struct ufs_hba *hba;
  	unsigned long flags;
 -	bool err_xfer = false;
 -	bool err_tm = false;
 -	int err = 0, pmc_err;
 +	bool needs_restore;
 +	bool needs_reset;
 +	bool err_xfer;
 +	bool err_tm;
 +	int pmc_err;
  	int tag;
 -	bool needs_reset = false, needs_restore = false;
  
+ 	hba = container_of(work, struct ufs_hba, eh_work);
+ 
  	down(&hba->host_sem);
  	spin_lock_irqsave(hba->host->host_lock, flags);
- 	hba->host->host_eh_scheduled = 0;
  	if (ufshcd_err_handling_should_stop(hba)) {
  		if (hba->ufshcd_state != UFSHCD_STATE_ERROR)
  			hba->ufshcd_state = UFSHCD_STATE_OPERATIONAL;