Skip to contentSkip to conversation

scsi: ufs: core: Disable the reset settle delay

PATCH Applied Bart Van Assche 4 participants 9 messages Mar 14, 2023 – Mar 24, 2023

Subsystems (2)
lore
Share & tools
lore

Bart Van Assche

author reviewer
#0 lore raw

PATCH 1/2 scsi: ufs: core: Disable the reset settle delay

Neither UFS host controllers nor UFS devices require a ten second delay after a host reset or after a bus reset. Hence this patch.

---
 drivers/ufs/core/ufshcd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/ufs/core/ufshcd.c +1 -0
index 172d25fef740..ce7b765aa2af 100644
@@ -8744,6 +8744,7 @@ static struct scsi_host_template ufshcd_driver_template = {
 	.max_sectors		= (1 << 20) / SECTOR_SIZE, /* 1 MiB */
 	.max_host_blocked	= 1,
 	.track_queue_depth	= 1,
+	.skip_settle_delay	= 1,
 	.sdev_groups		= ufshcd_driver_groups,
 	.rpm_autosuspend_delay	= RPM_AUTOSUSPEND_DELAY_MS,
 };
Acked-by on v1 1/2
#1 lore raw
Quoted 4 lines · Bart Van Assche

Neither UFS host controllers nor UFS devices require a ten second delay after a host reset or after a bus reset. Hence this patch.

Quoted 16 lines
---
 drivers/ufs/core/ufshcd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/ufs/core/ufshcd.c +1 -0
index 172d25fef740..ce7b765aa2af 100644
@@ -8744,6 +8744,7 @@ static struct scsi_host_template ufshcd_driver_template = {
 	.max_sectors		= (1 << 20) / SECTOR_SIZE, /* 1 MiB */
 	.max_host_blocked	= 1,
 	.track_queue_depth	= 1,
+	.skip_settle_delay	= 1,
 	.sdev_groups		= ufshcd_driver_groups,
 	.rpm_autosuspend_delay	= RPM_AUTOSUSPEND_DELAY_MS,
 };
reviewer
#2 lore raw
In reply to Bart Van Assche
Quoted 3 lines

Neither UFS host controllers nor UFS devices require a ten second delay after a host reset or after a bus reset. Hence this patch.

Bus reset handler is not implemented for ufs.

Thanks,
Avri

Quoted 19 lines
---
 drivers/ufs/core/ufshcd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/ufs/core/ufshcd.c +1 -0
index 172d25fef740..ce7b765aa2af 100644
@@ -8744,6 +8744,7 @@ static struct scsi_host_template
 ufshcd_driver_template = {
        .max_sectors            = (1 << 20) / SECTOR_SIZE, /* 1 MiB */
        .max_host_blocked       = 1,
        .track_queue_depth      = 1,
+       .skip_settle_delay      = 1,
        .sdev_groups            = ufshcd_driver_groups,
        .rpm_autosuspend_delay  = RPM_AUTOSUSPEND_DELAY_MS,

};

author reviewer
#3 lore raw
Quoted 4 lines · Avri Altman
Quoted 2 lines

Neither UFS host controllers nor UFS devices require a ten second delay after a host reset or after a bus reset. Hence this patch.

Bus reset handler is not implemented for ufs.

Hi Avri,

Do you perhaps want me to remove the reference to "bus reset" from the patch description?

Thanks,

Bart.

reviewer
#4 lore raw
Quoted 10 lines · Avri Altman
Quoted 4 lines
Quoted 2 lines

Neither UFS host controllers nor UFS devices require a ten second delay after a host reset or after a bus reset. Hence this patch.

Bus reset handler is not implemented for ufs.

Hi Avri,

Do you perhaps want me to remove the reference to "bus reset" from the patch description?

Yes - this what I meant.

But aren’t we calling now scsi_report_bus_reset too soon?

Thanks,
Avri

Quoted 4 lines

Thanks,

Bart.

author reviewer
#5 lore raw
Quoted 1 line · Avri Altman

But aren’t we calling now scsi_report_bus_reset too soon?

Hi Avri,

I think that calling scsi_report_bus_reset() immediately after a host reset has finished is fine. My understanding is that the purpose of the reset settle delay is to prevent that commands get submitted to a SCSI device while it is not responsive. I'm not aware of a need to wait after a host reset has been submitted to a UFS device?

Thanks,

Bart.

reviewer
#6 lore raw
Quoted 10 lines · Avri Altman
Quoted 1 line

But aren’t we calling now scsi_report_bus_reset too soon?

Hi Avri,

I think that calling scsi_report_bus_reset() immediately after a host reset has finished is fine. My understanding is that the purpose of the reset settle delay is to prevent that commands get submitted to a SCSI device while it is not responsive. I'm not aware of a need to wait after a host reset has been submitted to a UFS device?

OK. Thanks.

Avri

Quoted 4 lines

Thanks,

Bart.

#7 lore raw
In reply to Bart Van Assche

Bart,

Quoted 2 lines

Neither UFS host controllers nor UFS devices require a ten second delay after a host reset or after a bus reset. Hence this patch.

Applied to 6.4/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering