usb: typec: ucsi: acpi: Reduce the command completion timeout
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Mon, 20 Sep 2021 14:24:16 +0000 (17:24 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Oct 2021 10:42:38 +0000 (12:42 +0200)
The huge delay was there to workaround a problem where the
firmware did not report that it was busy with the alternate
mode commands. Now that the alternate modes are polled, the
delay can be dropped.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20210920142419.54493-5-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi_acpi.c

index 0497643..6771f05 100644 (file)
@@ -78,7 +78,7 @@ static int ucsi_acpi_sync_write(struct ucsi *ucsi, unsigned int offset,
        if (ret)
                goto out_clear_bit;
 
-       if (!wait_for_completion_timeout(&ua->complete, 60 * HZ))
+       if (!wait_for_completion_timeout(&ua->complete, HZ))
                ret = -ETIMEDOUT;
 
 out_clear_bit: