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

From: Fan Wu

Date: Wed Aug 19 2026 - 02:41:12 EST



> On Aug 19, 2026, at 12:26, Jiri Slaby <jirislaby@xxxxxxxxxx> 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.

Thanks,
Fan