Messages in this thread | | | Date | Wed, 5 May 1999 12:30:09 -0400 | Subject | Re: fixed bugs in TI16750 serial driver. | From | tytso@mit ... |
| |
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/
| |