SCSI fixes for 5.6-rc5
Subsystems (2)
James Bottomley
maintainerTwo small fixes, both in drivers: ipr and ufs.
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Can Guo (1):
scsi: ufs: Fix possible unclocked access to auto hibern8 timer register
Wen Xiong (1):
scsi: ipr: Fix softlockup when rescanning devices in petitboot
and the diffstat:
drivers/scsi/ipr.c | 3 ++- drivers/scsi/ipr.h | 1 + drivers/scsi/ufs/ufshcd.c | 21 ++++++++++++++------- 3 files changed, 17 insertions(+), 8 deletions(-)
With full diff below.
James
---
drivers/scsi/ipr.c +2 -1
@@ -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;
drivers/scsi/ipr.h +1 -0
@@ -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)
drivers/scsi/ufs/ufshcd.c +14 -7
@@ -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);
The pull request you sent on Fri, 13 Mar 2020 16:23:07 -0700:
The pull request you sent on Fri, 13 Mar 2020 16:23:07 -0700:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.gitscsi-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/fffb08b37df928475fef9c7f2aafddc2f6ebfaf4
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker