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

On Wed, Jun 02, 2021 at 05:57:09PM +0800, Li Jun wrote:
> Like the state_machine_timer, we should also cancel possible pending
> send discover identity hrtimer when unregister tcpm port.
> 
> Fixes: c34e85fa69b9 ("usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work")
> Signed-off-by: Li Jun <jun.li@nxp.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  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 c7460df2119d..2899c9de6d20 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->send_discover_timer);
>  	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 11:00 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 ` [PATCH 2/3] usb: typec: tcpm: cancel frs " Li Jun
2021-06-02 10:59   ` 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 [this message]
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=20210602110007.GI1865238@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jun.li@nxp.com \
    --cc=linux-usb@vger.kernel.org \
    /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.