Revert "serial: 8250: Toggle IER bits on only after irq has been set up"

This reverts commit 572fb97fce which is
commit 039d4926379b1d1c17b51cf21c500a5eed86899e upstream.

It breaks the kernel abi and is not needed for any supported Android
devices at this point in time, so it can be safely reverted.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I07e784e722762dab69f031063317350379e59b76
This commit is contained in:
Greg Kroah-Hartman 2022-11-16 09:54:40 +00:00
parent 7bcea6c5c9
commit 3905cfd1d6
3 changed files with 8 additions and 17 deletions

View File

@ -310,9 +310,10 @@ static void serial8250_backup_timeout(struct timer_list *t)
jiffies + uart_poll_timeout(&up->port) + HZ / 5);
}
static void univ8250_setup_timer(struct uart_8250_port *up)
static int univ8250_setup_irq(struct uart_8250_port *up)
{
struct uart_port *port = &up->port;
int retval = 0;
/*
* The above check will only give an accurate result the first time
@ -333,16 +334,10 @@ static void univ8250_setup_timer(struct uart_8250_port *up)
*/
if (!port->irq)
mod_timer(&up->timer, jiffies + uart_poll_timeout(port));
}
else
retval = serial_link_irq_chain(up);
static int univ8250_setup_irq(struct uart_8250_port *up)
{
struct uart_port *port = &up->port;
if (port->irq)
return serial_link_irq_chain(up);
return 0;
return retval;
}
static void univ8250_release_irq(struct uart_8250_port *up)
@ -398,7 +393,6 @@ static struct uart_ops univ8250_port_ops;
static const struct uart_8250_ops univ8250_driver_ops = {
.setup_irq = univ8250_setup_irq,
.release_irq = univ8250_release_irq,
.setup_timer = univ8250_setup_timer,
};
static struct uart_8250_port serial8250_ports[UART_NR];

View File

@ -2276,10 +2276,6 @@ int serial8250_do_startup(struct uart_port *port)
if (port->irq && (up->port.flags & UPF_SHARE_IRQ))
up->port.irqflags |= IRQF_SHARED;
retval = up->ops->setup_irq(up);
if (retval)
goto out;
if (port->irq && !(up->port.flags & UPF_NO_THRE_TEST)) {
unsigned char iir1;
@ -2322,7 +2318,9 @@ int serial8250_do_startup(struct uart_port *port)
}
}
up->ops->setup_timer(up);
retval = up->ops->setup_irq(up);
if (retval)
goto out;
/*
* Now, initialize the UART

View File

@ -74,7 +74,6 @@ struct uart_8250_port;
struct uart_8250_ops {
int (*setup_irq)(struct uart_8250_port *);
void (*release_irq)(struct uart_8250_port *);
void (*setup_timer)(struct uart_8250_port *);
};
struct uart_8250_em485 {