@@ -2205,6 +2205,10 @@ int serial8250_do_startup(struct uart_port *port)
2205
2205
2206
2206
if (port -> irq ) {
2207
2207
unsigned char iir1 ;
2208
+
2209
+ if (port -> irqflags & IRQF_SHARED )
2210
+ disable_irq_nosync (port -> irq );
2211
+
2208
2212
/*
2209
2213
* Test for UARTs that do not reassert THRE when the
2210
2214
* transmitter is idle and the interrupt has already
@@ -2214,8 +2218,6 @@ int serial8250_do_startup(struct uart_port *port)
2214
2218
* allow register changes to become visible.
2215
2219
*/
2216
2220
spin_lock_irqsave (& port -> lock , flags );
2217
- if (up -> port .irqflags & IRQF_SHARED )
2218
- disable_irq_nosync (port -> irq );
2219
2221
2220
2222
wait_for_xmitr (up , UART_LSR_THRE );
2221
2223
serial_port_out_sync (port , UART_IER , UART_IER_THRI );
@@ -2227,9 +2229,10 @@ int serial8250_do_startup(struct uart_port *port)
2227
2229
iir = serial_port_in (port , UART_IIR );
2228
2230
serial_port_out (port , UART_IER , 0 );
2229
2231
2232
+ spin_unlock_irqrestore (& port -> lock , flags );
2233
+
2230
2234
if (port -> irqflags & IRQF_SHARED )
2231
2235
enable_irq (port -> irq );
2232
- spin_unlock_irqrestore (& port -> lock , flags );
2233
2236
2234
2237
/*
2235
2238
* If the interrupt is not reasserted, or we otherwise
0 commit comments