public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: Revert serial: core: Fix serial core port id to not use port->line
@ 2023-08-28 20:41 Matthew Howell
  2023-08-29  3:52 ` Tony Lindgren
  0 siblings, 1 reply; 14+ messages in thread
From: Matthew Howell @ 2023-08-28 20:41 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, tony, ryan.wenglarz, james.olson

From: Matthew Howell <matthew.howell@sealevel.com>
XR17V35X cards seemingly unable to register serial port. Confirmed on 
Sealevel 7202C, 7204EC, and Exar XR17V352 reference board. 
dmesg states: "Couldn't register serial port 0, irq 24, type 2, error -22"

I first identified the problem when I pulled down 6.6-rc1 and I was able 
to trace it to d962de6ae51f9b76ad736220077cda83084090b1. I understand that this 
commit is noted as being reverted in 1ef2c2df1199, but I was only able to 
resolve the issue by reverting d962de6ae51f myself using this patch.

I suggest reverting using this patch unless someone more knowledgeable 
about what these changes actually do has a better suggestion.

Revert "serial: core: serial core port id to not use port->line"
This reverts commit d962de6ae51f9b76ad736220077cda83084090b1

Link: https://lore.kernel.org/all/20230725054216.45696-3-tony@atomide.com/

Fixes: d962de6ae51f9b76ad736220077cda83084090b1 ("serial: core: Fix serial 
core port id to not use port->line")
Signed-off-by: Matthew Howell <matthew.howell@sealevel.com>
---
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 3449f8790e46..ab4da98332ab 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -497,7 +497,6 @@ static struct uart_8250_port *serial8250_setup_port(int index)
 
 	up = &serial8250_ports[index];
 	up->port.line = index;
-	up->port.port_id = index;
 
 	serial8250_init_port(up);
 	if (!base_ops)
@@ -1041,7 +1040,6 @@ int serial8250_register_8250_port(const struct uart_8250_port *up)
 			uart_remove_one_port(&serial8250_reg, &uart->port);
 
 		uart->port.ctrl_id	= up->port.ctrl_id;
-		uart->port.port_id	= up->port.port_id;
 		uart->port.iobase       = up->port.iobase;
 		uart->port.membase      = up->port.membase;
 		uart->port.irq          = up->port.irq;
diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
index 3dfcf20c4eb6..53ae87ae337b 100644
--- a/drivers/tty/serial/serial_base_bus.c
+++ b/drivers/tty/serial/serial_base_bus.c
@@ -169,7 +169,8 @@ 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->line);
+
 	if (err)
 		goto err_put_device;
 
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index a156d2ed8d9e..201813d888df 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -460,7 +460,6 @@ struct uart_port {
 	int			(*iso7816_config)(struct uart_port *,
 						  struct serial_iso7816 *iso7816);
 	unsigned int		ctrl_id;		/* optional serial core controller id */
-	unsigned int		port_id;		/* optional serial core port id */
 	unsigned int		irq;			/* irq number */
 	unsigned long		irqflags;		/* irq flags  */
 	unsigned int		uartclk;		/* base uart clock */

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-09-11 21:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-28 20:41 [PATCH] serial: Revert serial: core: Fix serial core port id to not use port->line Matthew Howell
2023-08-29  3:52 ` Tony Lindgren
2023-08-29 13:42   ` Matthew Howell
2023-08-29 20:15     ` Tony Lindgren
2023-08-31 14:58       ` Matthew Howell
2023-09-01  4:47         ` Tony Lindgren
2023-09-01 18:48           ` Matthew Howell
2023-09-02  4:34             ` Tony Lindgren
     [not found]               ` <c4b1db31-7814-0d22-36de-a7e6f117d89c@sealevel.com>
2023-09-05 15:55                 ` Tony Lindgren
2023-09-05 16:43                   ` Matthew Howell
2023-09-05 16:51                     ` Tony Lindgren
2023-09-11 13:04                       ` Matthew Howell
2023-09-11 13:15                         ` Greg KH
2023-09-11 13:58                           ` Matthew Howell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox