FROMGIT: usb: typec: tcpm: Clear send_discover in tcpm_check_send_discover
tcpm_check_send_discover does not clear the send_discover flag
when any of the following conditions are not met.
1. data_role is TYPEC_HOST
2. link is pd_capable
Discovery indentity would anyways not be attempted during
the current session anymore when the above conditions are not
met. Hence clear the send_discover flag here to prevent
tcpm_enable_frs_work from rescheduling indefinetly.
Bug: 174693433
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20201203031908.1491542-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3bac42f02d upstream)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I69d3137d373e303396cf37d885a9bb797331d13d
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
dafdf1e861
commit
79f52095e7
@@ -3056,10 +3056,9 @@ static inline enum tcpm_state unattached_state(struct tcpm_port *port)
|
||||
static void tcpm_check_send_discover(struct tcpm_port *port)
|
||||
{
|
||||
if (port->data_role == TYPEC_HOST && port->send_discover &&
|
||||
port->pd_capable) {
|
||||
port->pd_capable)
|
||||
tcpm_send_vdm(port, USB_SID_PD, CMD_DISCOVER_IDENT, NULL, 0);
|
||||
port->send_discover = false;
|
||||
}
|
||||
port->send_discover = false;
|
||||
}
|
||||
|
||||
static void tcpm_swap_complete(struct tcpm_port *port, int result)
|
||||
|
||||
Reference in New Issue
Block a user