[Bionic/Unstable] UBUNTU: SAUCE: usb: typec: ucsi: Increase command completion timeout value

Message ID 20180413095433.15714-1-cascardo@canonical.com
State New
Headers show
Series
  • [Bionic/Unstable] UBUNTU: SAUCE: usb: typec: ucsi: Increase command completion timeout value
Related show

Commit Message

Thadeu Lima de Souza Cascardo April 13, 2018, 9:54 a.m.
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>

BugLink: http://bugs.launchpad.net/bugs/1758797

On some boards, under heavy load, the EC firmware is
unable to complete commands even in one second. Increasing
the command completion timeout value to five seconds.

Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
Cc: <stable@vger.kernel.org>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
---
 drivers/usb/typec/ucsi/ucsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Seth Forshee April 13, 2018, 12:18 p.m. | #1
On Fri, Apr 13, 2018 at 06:54:33AM -0300, Thadeu Lima de Souza Cascardo wrote:
> From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1758797
> 
> On some boards, under heavy load, the EC firmware is
> unable to complete commands even in one second. Increasing
> the command completion timeout value to five seconds.
> 
> Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>

Acked-by: Seth Forshee <seth.forshee@canonical.com>
Colin Ian King April 13, 2018, 1:46 p.m. | #2
On 13/04/18 10:54, Thadeu Lima de Souza Cascardo wrote:
> From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1758797
> 
> On some boards, under heavy load, the EC firmware is
> unable to complete commands even in one second. Increasing
> the command completion timeout value to five seconds.
> 
> Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> ---
>  drivers/usb/typec/ucsi/ucsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index 79046fe66426..8d95b3a168d2 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -28,7 +28,7 @@
>   * difficult to estimate the time it takes for the system to process the command
>   * before it is actually passed to the PPM.
>   */
> -#define UCSI_TIMEOUT_MS		1000
> +#define UCSI_TIMEOUT_MS		5000
>  
>  /*
>   * UCSI_SWAP_TIMEOUT_MS - Timeout for role swap requests
> 

Upstream fix, seems very reasonable to me, minimal regression potential.

Acked-by: Colin Ian King <colin.king@canonical.com>
Stefan Bader April 13, 2018, 1:48 p.m. | #3
On 13.04.2018 11:54, Thadeu Lima de Souza Cascardo wrote:
> From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1758797
> 
> On some boards, under heavy load, the EC firmware is
> unable to complete commands even in one second. Increasing
> the command completion timeout value to five seconds.
> 
> Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>

> ---

Looks safe enough. Only question would be whether this is/should go upstream at
some point.

-Stefan

>  drivers/usb/typec/ucsi/ucsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index 79046fe66426..8d95b3a168d2 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -28,7 +28,7 @@
>   * difficult to estimate the time it takes for the system to process the command
>   * before it is actually passed to the PPM.
>   */
> -#define UCSI_TIMEOUT_MS		1000
> +#define UCSI_TIMEOUT_MS		5000
>  
>  /*
>   * UCSI_SWAP_TIMEOUT_MS - Timeout for role swap requests
>
Thadeu Lima de Souza Cascardo April 13, 2018, 5:31 p.m. | #4
Applied to bionic master-next.

Thanks.
Cascardo.

Patch

diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 79046fe66426..8d95b3a168d2 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -28,7 +28,7 @@ 
  * difficult to estimate the time it takes for the system to process the command
  * before it is actually passed to the PPM.
  */
-#define UCSI_TIMEOUT_MS		1000
+#define UCSI_TIMEOUT_MS		5000
 
 /*
  * UCSI_SWAP_TIMEOUT_MS - Timeout for role swap requests