patch-2.4.25 linux-2.4.25/drivers/char/serial.c

Next file: linux-2.4.25/drivers/char/sgiserial.c
Previous file: linux-2.4.25/drivers/char/sb1250_duart.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/drivers/char/serial.c linux-2.4.25/drivers/char/serial.c
@@ -3746,7 +3746,14 @@
 		/* Check for Startech UART's */
 		serial_outp(info, UART_LCR, UART_LCR_DLAB);
 		if (serial_in(info, UART_EFR) == 0) {
+			serial_outp(info, UART_EFR, 0xA8);
+			if (serial_in(info, UART_EFR) == 0) {
+				/* We are a NS16552D/Motorola
+				 * 8xxx DUART, stop. */
+				goto out;
+			}
 			state->type = PORT_16650;
+			serial_outp(info, UART_EFR, 0);
 		} else {
 			serial_outp(info, UART_LCR, 0xBF);
 			if (serial_in(info, UART_EFR) == 0)
@@ -3795,6 +3802,7 @@
 		}
 	}
 #endif
+out:
 	serial_outp(info, UART_LCR, save_lcr);
 	if (state->type == PORT_16450) {
 		scratch = serial_in(info, UART_SCR);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)