File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9950,6 +9950,7 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
99509950 ioa_cfg -> max_devs_supported = ipr_max_devs ;
99519951
99529952 if (ioa_cfg -> sis64 ) {
9953+ host -> max_channel = IPR_MAX_SIS64_BUSES ;
99539954 host -> max_id = IPR_MAX_SIS64_TARGETS_PER_BUS ;
99549955 host -> max_lun = IPR_MAX_SIS64_LUNS_PER_TARGET ;
99559956 if (ipr_max_devs > IPR_MAX_SIS64_DEVS )
@@ -9958,6 +9959,7 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
99589959 + ((sizeof (struct ipr_config_table_entry64 )
99599960 * ioa_cfg -> max_devs_supported )));
99609961 } else {
9962+ host -> max_channel = IPR_VSET_BUS ;
99619963 host -> max_id = IPR_MAX_NUM_TARGETS_PER_BUS ;
99629964 host -> max_lun = IPR_MAX_NUM_LUNS_PER_TARGET ;
99639965 if (ipr_max_devs > IPR_MAX_PHYSICAL_DEVS )
@@ -9967,7 +9969,6 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
99679969 * ioa_cfg -> max_devs_supported )));
99689970 }
99699971
9970- host -> max_channel = IPR_VSET_BUS ;
99719972 host -> unique_id = host -> host_no ;
99729973 host -> max_cmd_len = IPR_MAX_CDB_LEN ;
99739974 host -> can_queue = ioa_cfg -> max_cmds ;
Original file line number Diff line number Diff line change @@ -1300,6 +1300,7 @@ struct ipr_resource_entry {
13001300#define IPR_ARRAY_VIRTUAL_BUS 0x1
13011301#define IPR_VSET_VIRTUAL_BUS 0x2
13021302#define IPR_IOAFP_VIRTUAL_BUS 0x3
1303+ #define IPR_MAX_SIS64_BUSES 0x4
13031304
13041305#define IPR_GET_RES_PHYS_LOC (res ) \
13051306 (((res)->bus << 24) | ((res)->target << 8) | (res)->lun)
Original file line number Diff line number Diff line change @@ -3884,18 +3884,25 @@ EXPORT_SYMBOL_GPL(ufshcd_uic_hibern8_exit);
38843884void ufshcd_auto_hibern8_update (struct ufs_hba * hba , u32 ahit )
38853885{
38863886 unsigned long flags ;
3887+ bool update = false;
38873888
3888- if (!(hba -> capabilities & MASK_AUTO_HIBERN8_SUPPORT ))
3889+ if (!ufshcd_is_auto_hibern8_supported (hba ))
38893890 return ;
38903891
38913892 spin_lock_irqsave (hba -> host -> host_lock , flags );
3892- if (hba -> ahit == ahit )
3893- goto out_unlock ;
3894- hba -> ahit = ahit ;
3895- if (!pm_runtime_suspended (hba -> dev ))
3896- ufshcd_writel (hba , hba -> ahit , REG_AUTO_HIBERNATE_IDLE_TIMER );
3897- out_unlock :
3893+ if (hba -> ahit != ahit ) {
3894+ hba -> ahit = ahit ;
3895+ update = true;
3896+ }
38983897 spin_unlock_irqrestore (hba -> host -> host_lock , flags );
3898+
3899+ if (update && !pm_runtime_suspended (hba -> dev )) {
3900+ pm_runtime_get_sync (hba -> dev );
3901+ ufshcd_hold (hba , false);
3902+ ufshcd_auto_hibern8_enable (hba );
3903+ ufshcd_release (hba );
3904+ pm_runtime_put (hba -> dev );
3905+ }
38993906}
39003907EXPORT_SYMBOL_GPL (ufshcd_auto_hibern8_update );
39013908
You can’t perform that action at this time.
0 commit comments