[PATCH] serial: imx: cancel RS485 trigger hrtimers in shutdown and remove

Greg Kroah-Hartman gregkh at linuxfoundation.org
Thu Oct 1 01:57:56 PDT 2026


On Wed, Aug 19, 2026 at 02:39:45PM +0800, Fan Wu wrote:
> 
> > On Aug 19, 2026, at 12:26, Jiri Slaby <jirislaby at kernel.org> wrote:
> > 
> >> serial core does not call the
> >> driver shutdown on every path that reaches remove().
> > 
> > Could you be more specific on what path it does not?
> > 
> > thanks,
> > -- 
> > js
> > suse labs
> 
> Hi Jiri
> 
> Yes. The relevant path is a console port whose last TTY user closes it
> before the device is unbound.
> 
> tty_port_shutdown() skips port->ops->shutdown() for console ports. The
> last close then clears the active state and dissociates the TTY, so the
> later tty_port_tty_vhangup() in the remove path has no TTY to hang up
> and cannot invoke the driver shutdown.  That is the path the cancel in
> imx_uart_remove() covers.
> 
> trigger_stop_tx can already be pending at that point: after TXDC,
> imx_uart_stop_tx() starts it for delay_rts_after_send, whereas the close
> path only waits for TXDC.
> 
> I can add this to the changelog if you would prefer the rationale to be
> spelled out there.

Yes, please do so.

thanks,

greg k-h



More information about the linux-arm-kernel mailing list