mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
SCSI fixes on 20200313
Two small fixes, both in drivers: ipr and ufs. Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCXmwVQCYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishXEVAP94Qsj9 gyy8hqaX3xLZRXLcURp2Aahg5bZJ5OxsYHAc/gEAtY3ofY4rJmzuVVoj69eU8j5v sMLdbe8mJKzCmRxwi/0= =1Euq -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small fixes, both in drivers: ipr and ufs" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ipr: Fix softlockup when rescanning devices in petitboot scsi: ufs: Fix possible unclocked access to auto hibern8 timer register
This commit is contained in:
commit
fffb08b37d
@ -9950,6 +9950,7 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
|
||||
ioa_cfg->max_devs_supported = ipr_max_devs;
|
||||
|
||||
if (ioa_cfg->sis64) {
|
||||
host->max_channel = IPR_MAX_SIS64_BUSES;
|
||||
host->max_id = IPR_MAX_SIS64_TARGETS_PER_BUS;
|
||||
host->max_lun = IPR_MAX_SIS64_LUNS_PER_TARGET;
|
||||
if (ipr_max_devs > IPR_MAX_SIS64_DEVS)
|
||||
@ -9958,6 +9959,7 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
|
||||
+ ((sizeof(struct ipr_config_table_entry64)
|
||||
* ioa_cfg->max_devs_supported)));
|
||||
} else {
|
||||
host->max_channel = IPR_VSET_BUS;
|
||||
host->max_id = IPR_MAX_NUM_TARGETS_PER_BUS;
|
||||
host->max_lun = IPR_MAX_NUM_LUNS_PER_TARGET;
|
||||
if (ipr_max_devs > IPR_MAX_PHYSICAL_DEVS)
|
||||
@ -9967,7 +9969,6 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
|
||||
* ioa_cfg->max_devs_supported)));
|
||||
}
|
||||
|
||||
host->max_channel = IPR_VSET_BUS;
|
||||
host->unique_id = host->host_no;
|
||||
host->max_cmd_len = IPR_MAX_CDB_LEN;
|
||||
host->can_queue = ioa_cfg->max_cmds;
|
||||
|
@ -1300,6 +1300,7 @@ struct ipr_resource_entry {
|
||||
#define IPR_ARRAY_VIRTUAL_BUS 0x1
|
||||
#define IPR_VSET_VIRTUAL_BUS 0x2
|
||||
#define IPR_IOAFP_VIRTUAL_BUS 0x3
|
||||
#define IPR_MAX_SIS64_BUSES 0x4
|
||||
|
||||
#define IPR_GET_RES_PHYS_LOC(res) \
|
||||
(((res)->bus << 24) | ((res)->target << 8) | (res)->lun)
|
||||
|
@ -3884,18 +3884,25 @@ EXPORT_SYMBOL_GPL(ufshcd_uic_hibern8_exit);
|
||||
void ufshcd_auto_hibern8_update(struct ufs_hba *hba, u32 ahit)
|
||||
{
|
||||
unsigned long flags;
|
||||
bool update = false;
|
||||
|
||||
if (!(hba->capabilities & MASK_AUTO_HIBERN8_SUPPORT))
|
||||
if (!ufshcd_is_auto_hibern8_supported(hba))
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
if (hba->ahit == ahit)
|
||||
goto out_unlock;
|
||||
hba->ahit = ahit;
|
||||
if (!pm_runtime_suspended(hba->dev))
|
||||
ufshcd_writel(hba, hba->ahit, REG_AUTO_HIBERNATE_IDLE_TIMER);
|
||||
out_unlock:
|
||||
if (hba->ahit != ahit) {
|
||||
hba->ahit = ahit;
|
||||
update = true;
|
||||
}
|
||||
spin_unlock_irqrestore(hba->host->host_lock, flags);
|
||||
|
||||
if (update && !pm_runtime_suspended(hba->dev)) {
|
||||
pm_runtime_get_sync(hba->dev);
|
||||
ufshcd_hold(hba, false);
|
||||
ufshcd_auto_hibern8_enable(hba);
|
||||
ufshcd_release(hba);
|
||||
pm_runtime_put(hba->dev);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufshcd_auto_hibern8_update);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user