File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Expand file tree Collapse file tree 3 files changed +17
-8
lines changed 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,
9950
9950
ioa_cfg -> max_devs_supported = ipr_max_devs ;
9951
9951
9952
9952
if (ioa_cfg -> sis64 ) {
9953
+ host -> max_channel = IPR_MAX_SIS64_BUSES ;
9953
9954
host -> max_id = IPR_MAX_SIS64_TARGETS_PER_BUS ;
9954
9955
host -> max_lun = IPR_MAX_SIS64_LUNS_PER_TARGET ;
9955
9956
if (ipr_max_devs > IPR_MAX_SIS64_DEVS )
@@ -9958,6 +9959,7 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
9958
9959
+ ((sizeof (struct ipr_config_table_entry64 )
9959
9960
* ioa_cfg -> max_devs_supported )));
9960
9961
} else {
9962
+ host -> max_channel = IPR_VSET_BUS ;
9961
9963
host -> max_id = IPR_MAX_NUM_TARGETS_PER_BUS ;
9962
9964
host -> max_lun = IPR_MAX_NUM_LUNS_PER_TARGET ;
9963
9965
if (ipr_max_devs > IPR_MAX_PHYSICAL_DEVS )
@@ -9967,7 +9969,6 @@ static void ipr_init_ioa_cfg(struct ipr_ioa_cfg *ioa_cfg,
9967
9969
* ioa_cfg -> max_devs_supported )));
9968
9970
}
9969
9971
9970
- host -> max_channel = IPR_VSET_BUS ;
9971
9972
host -> unique_id = host -> host_no ;
9972
9973
host -> max_cmd_len = IPR_MAX_CDB_LEN ;
9973
9974
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 {
1300
1300
#define IPR_ARRAY_VIRTUAL_BUS 0x1
1301
1301
#define IPR_VSET_VIRTUAL_BUS 0x2
1302
1302
#define IPR_IOAFP_VIRTUAL_BUS 0x3
1303
+ #define IPR_MAX_SIS64_BUSES 0x4
1303
1304
1304
1305
#define IPR_GET_RES_PHYS_LOC (res ) \
1305
1306
(((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);
3884
3884
void ufshcd_auto_hibern8_update (struct ufs_hba * hba , u32 ahit )
3885
3885
{
3886
3886
unsigned long flags ;
3887
+ bool update = false;
3887
3888
3888
- if (!(hba -> capabilities & MASK_AUTO_HIBERN8_SUPPORT ))
3889
+ if (!ufshcd_is_auto_hibern8_supported (hba ))
3889
3890
return ;
3890
3891
3891
3892
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
+ }
3898
3897
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
+ }
3899
3906
}
3900
3907
EXPORT_SYMBOL_GPL (ufshcd_auto_hibern8_update );
3901
3908
You can’t perform that action at this time.
0 commit comments