[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZM1VET3hymOZEG4/@smile.fi.intel.com>
Date: Fri, 4 Aug 2023 22:44:17 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Tony Lindgren <tony@...mide.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>, Dhruva Gole <d-gole@...com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
John Ogness <john.ogness@...utronix.de>,
Johan Hovold <johan@...nel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Vignesh Raghavendra <vigneshr@...com>,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH] serial: 8250: Reinit port_id when adding back
serial8250_isa_devs
On Fri, Aug 04, 2023 at 03:35:44PM +0300, Tony Lindgren wrote:
> After fixing the serial core port device to use port->port_id instead of
> port->line, unloading a hardware specific 8250 port driver started
> producing an error for "sysfs: cannot create duplicate filename".
>
> This is happening as we are wrongly initializing port->port_id to zero
> when adding back serial8250_isa_devs instances, and the serial8250:0.0
> sysfs entry may already exist. For serial8250 devices, we typically have
> multiple devices mapped to a single driver instance. For the
> serial8250_isa_devs instances, the port->port_id is the same as port->line.
>
> Let's fix the issue by re-initializing port_id when adding back the
> serial8250_isa_devs instances in serial8250_unregister_port().
Good catch and fix, thank you!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists