]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
staging: typec: tcpm: Add timeout when waiting for role swap completion
authorGuenter Roeck <linux@roeck-us.net>
Fri, 11 Aug 2017 04:15:43 +0000 (21:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Aug 2017 22:57:16 +0000 (15:57 -0700)
commit9adf9f9ee71a6acb017922946ba1b8b2b2cff550
tree22abbd8a001808c424eda2d0e60efc3e33322a23
parentb46a9c9095bf1652a591149b6febe5e5413a60b3
staging: typec: tcpm: Add timeout when waiting for role swap completion

The Type-C protocol manager state machine could fail, which might result
in role swap requests from user space to hang forever. Add a generous
timeout when waiting for role swaps to complete to avoid this situation.

Originally-from: Badhri Jagan Sridharan <badhri@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/typec/tcpm.c
drivers/staging/typec/tcpm.h