On 9/21/23 9:07 PM, Damien Le Moal wrote: > ata_port_suspend_async() is only called by ata_sas_port_suspend(). > Modify ata_port_suspend() with an additional bool argument indicating an > asynchronous or synchronous suspend to allow removing that helper > function. With this change, the variable ata_port_resume_ehi can also be > removed and its value (ATA_EHI_XXX flags passed directly to > ata_port_request_pm(). > > Signed-off-by: Damien Le Moal <dlemoal@xxxxxxxxxx> > Reviewed-by: Hannes Reinecke <hare@xxxxxxx> > Tested-by: Chia-Lin Kao (AceLan) <acelan.kao@xxxxxxxxxxxxx> > Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > --- > drivers/ata/libata-core.c | 46 +++++++++++++++------------------------ > 1 file changed, 17 insertions(+), 29 deletions(-) > > diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c > index 6b38ebaad019..b3615862ea30 100644 > --- a/drivers/ata/libata-core.c > +++ b/drivers/ata/libata-core.c [...] > @@ -5187,20 +5177,18 @@ static void ata_port_suspend(struct ata_port *ap, pm_message_t mesg) > */ > cancel_delayed_work_sync(&ap->scsi_rescan_task); > > - ata_port_request_pm(ap, mesg, 0, ata_port_suspend_ehi, false); > -} > - > -static void ata_port_suspend_async(struct ata_port *ap, pm_message_t mesg) > -{ > /* > - * We are about to suspend the port, so we do not care about > - * scsi_rescan_device() calls scheduled by previous resume operations. > - * The next resume will schedule the rescan again. So cancel any rescan > - * that is not done yet. > + * On some hardware, device fails to respond after spun down for > + * suspend. As the device wil not t be used until being resumed, we Will not be used? There were no typos in the original comment... :-) [...] MBR, Sergey