Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92f1b4ea authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufs: Crash the system on unrecoverable state"

parents dba0ff46 8d765278
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -7169,6 +7169,12 @@ static int ufshcd_reset_and_restore(struct ufs_hba *hba)
		err = ufshcd_detect_device(hba);
	} while (err && --retries);

	/*
	 * There is no point proceeding even after failing
	 * to recover after multiple retries.
	 */
	if (err && ufshcd_is_embedded_dev(hba))
		BUG();
	/*
	 * After reset the door-bell might be cleared, complete
	 * outstanding requests in s/w here.
+8 −0
Original line number Diff line number Diff line
@@ -1198,6 +1198,14 @@ static inline bool ufshcd_is_hs_mode(struct ufs_pa_layer_attr *pwr_info)
		pwr_info->pwr_tx == FASTAUTO_MODE);
}

static inline bool ufshcd_is_embedded_dev(struct ufs_hba *hba)
{
	if ((hba->dev_info.b_device_sub_class == UFS_DEV_EMBEDDED_BOOTABLE) ||
	    (hba->dev_info.b_device_sub_class == UFS_DEV_EMBEDDED_NON_BOOTABLE))
		return true;
	return false;
}

#ifdef CONFIG_DEBUG_FS
static inline void ufshcd_init_req_stats(struct ufs_hba *hba)
{