All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Jun <jun.li@nxp.com>
To: linux@roeck-us.net, heikki.krogerus@linux.intel.com
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org
Subject: [PATCH 2/3] usb: typec: tcpm: cancel frs hrtimer when unregister tcpm port
Date: Wed,  2 Jun 2021 17:57:08 +0800	[thread overview]
Message-ID: <1622627829-11070-2-git-send-email-jun.li@nxp.com> (raw)
In-Reply-To: <1622627829-11070-1-git-send-email-jun.li@nxp.com>

Like the state_machine_timer, we should also cancel possible pending
frs hrtimer when unregister tcpm port.

Fixes: 8dc4bd073663 ("usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS)")
Signed-off-by: Li Jun <jun.li@nxp.com>
---
 drivers/usb/typec/tcpm/tcpm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index f47685e7923d..c7460df2119d 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -6328,6 +6328,7 @@ void tcpm_unregister_port(struct tcpm_port *port)
 {
 	int i;
 
+	hrtimer_cancel(&port->enable_frs_timer);
 	hrtimer_cancel(&port->vdm_state_machine_timer);
 	hrtimer_cancel(&port->state_machine_timer);
 
-- 
2.25.1


  reply	other threads:[~2021-06-02 10:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02  9:57 [PATCH 1/3] usb: typec: tcpm: cancel vdm and state machine hrtimer when unregister tcpm port Li Jun
2021-06-02  9:57 ` Li Jun [this message]
2021-06-02 10:59   ` [PATCH 2/3] usb: typec: tcpm: cancel frs " Guenter Roeck
2021-06-07  9:17   ` Heikki Krogerus
2021-06-02  9:57 ` [PATCH 3/3] usb: typec: tcpm: cancel send discover " Li Jun
2021-06-02 11:00   ` Guenter Roeck
2021-06-07  9:18   ` Heikki Krogerus
2021-06-02 10:59 ` [PATCH 1/3] usb: typec: tcpm: cancel vdm and state machine " Guenter Roeck
2021-06-07  9:16 ` Heikki Krogerus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1622627829-11070-2-git-send-email-jun.li@nxp.com \
    --to=jun.li@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.