Re: [PATCH] serial: Revert serial: core: Fix serial core port id to not use port->line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 1 Sep 2023, Tony Lindgren wrote:
> * Matthew Howell <matthew.howell@xxxxxxxxxxxx> [230831 14:58]:
> > On Tue, 29 Aug 2023, Tony Lindgren wrote:
> > > If it is a port_id conflict I'm not sure why commit 3d9e6f556e23 is not
> > > working for your as it has commit a4a79e03bab5 ("serial: core: Revert
> > > port_id use"). Care to check that again, or maybe try with v6.5 with just
> > > the commit below reverted?
> > >
> > > 04c7f60ca477 ("serial: core: Fix serial core port id, including multiport devices")
> >
> > Just tried that, but no difference. Same error.
> 
> OK thanks to testing it. So it's starting to look like the issue is
> somehow related to the serial8250_setup_port() change in commit d962de6ae51f
> ("serial: core: Fix serial core port id to not use port->line").
> 
> The experimental patch below should confirm if the issue is related to the
> port_id usage or serial8250_setup_port(). Care to give this a try against
> v6.5 without other patches?

For some reason I am unable to apply the patch using either git apply or 
the patch command. I made the change manually though and the issue still 
occurs.
 
> > > Dmesg output might help also to figure out if this happens on the first
> > > port or the second port.
> >
> > The full error in dmesg is:
> > [Aug30 15:48] exar_serial 0000:04:00.0: Couldn't register serial port 0, irq 24, type 2, error -22
> >
> > This is on a 2-port adapter. I don't see any indication in dmesg that it
> > attempted to register the other port.
> 
> OK. Are there other 8520 related uarts probing before that?

Not that I can see. The only earlier entries I see are from before I load 
the patched driver. If I add another card in I can see that both are 
probed, but both have the error:

[  +0.005929] exar_serial 0000:01:00.0: Couldn't register serial port 0, 
irq 24, type 2, error -22
[  +0.003431] exar_serial 0000:04:00.0: Couldn't register serial port 0, 
irq 25, type 2, error -22

04:00.0 is a Sealevel card and the other is a reference Exar XR17V352.

> Regards,
> 
> Tony
> 
> 8< --------------------
> diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
> --- a/drivers/tty/serial/serial_base_bus.c
> +++ b/drivers/tty/serial/serial_base_bus.c
> @@ -169,7 +169,7 @@ struct serial_port_device *serial_base_port_add(struct uart_port *port,
>         err = serial_base_device_init(port, &port_dev->dev,
>                                       &ctrl_dev->dev, &serial_port_type,
>                                       serial_base_port_release,
> -                                     port->ctrl_id, port->port_id);
> +                                     port->ctrl_id, port->line);
>         if (err)
>                 goto err_put_device;
> 
> 



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux