lkml.org 
[lkml]   [1999]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: fixed bugs in TI16750 serial driver.
From
Hi Fredrik,

You're right, the 16750 autodetect is currently broken; the
problem with your fix is that there are some broken UART's out there
that will falsely autodetect as the 16750 with your change; yup, they're
broken, but this is the PC hardware market we're talking about. There's
a lot of cheap, broken trash out there, and we have to do our best to
support it all....

I *think* this autodetection code should do a better job of
avoiding the false positives while still correctly detecting the 16750.
Could you check and see if this properly detects your 16750 uart?
Thanks!!

- Ted

----------------------------------------------------

Replace the relevant 16750 detection code in autoconfig() with the
following:

if (state->type == PORT_16550A) {
/* Check for TI 16750 */
serial_outp(info, UART_LCR, scratch2 | UART_LCR_DLAB);
serial_outp(info, UART_FCR,
UART_FCR_ENABLE_FIFO | UART_FCR7_64BYTE);
scratch = serial_in(info, UART_IIR) >> 5;
if (scratch == 7) {
/*
* If this is a 16750, and not a cheap UART
* clone, then it should only go into 64 byte
* mode if the UART_FCR7_64BYTE bit was set
* while UART_LCR_DLAB was latched.
*/
serial_outp(info, UART_FCR, UART_FCR_ENABLE_FIFO);
serial_outp(info, UART_LCR, 0);
serial_outp(info, UART_FCR,
UART_FCR_ENABLE_FIFO | UART_FCR7_64BYTE);
scratch = serial_in(info, UART_IIR) >> 5;
if (scratch == 6)
state->type = PORT_16750;
}
serial_outp(info, UART_FCR, UART_FCR_ENABLE_FIFO);
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.459 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site