Re: [PATCH] serial: 8250: Clear port->pm on port specific driver unbind

From: Tony Lindgren
Date: Tue Apr 18 2023 - 05:41:54 EST


* Tony Lindgren <tony@xxxxxxxxxxx> [230414 09:40]:
> I'm now wondering still if we should clear all the conditional hardware
> specific functions too in addition to port->pm that get set in
> serial8250_register_8250_port(). Maybe best done in a separate patch
> as needed.. Any suggestions?

Well we can't do memset on the port for sure at this point.. But what
we can do is call serial8250_set_defaults() instead of clearing just
port->pm. This will set the port back to serial8250 default functions,
and will set port->pm too.

I'll send v2 patch after some more testing.

Regards,

Tony