public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Exar ST16C2550 rev A2 bug
@ 2004-11-17 18:26 Alex Williamson
  2004-11-28 11:10 ` Russell King
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Williamson @ 2004-11-17 18:26 UTC (permalink / raw)
  To: rmk+serial; +Cc: linux-kernel

Hi Russell,

   There seem to be an increasing number of the above UARTs floating
around and I'm wondering if we can do something to better detect and
work around their flaw.  Exar has documented the problem and their
proposed serial driver changes to work around the issue here:

http://www.exar.com/info.php?pdf=dan180_oct2004.pdf

In short, they had a mask problem that inadvertently exposes the DVID,
DREV and EFR registers on the chip.  This causes us to detect the device
as a 16650V2 and try to make use of the FIFO as if it were 32 bytes.
The previous version of the UART detected correctly as a 16550A and
worked fine.  Exar's proposed solution is simply to only set the port
type to 16650V2 if size_fifo() == 32, or simply:

===== drivers/serial/8250.c 1.91 vs edited =====
--- 1.91/drivers/serial/8250.c  2004-11-13 17:43:56 -07:00
+++ edited/drivers/serial/8250.c        2004-11-17 11:13:05 -07:00
@@ -570,7 +570,7 @@
         */
        if (size_fifo(up) == 64)
                up->port.type = PORT_16654;
-       else
+       else if (size_fifo(up) == 32)
                up->port.type = PORT_16650V2;
 }
 
The proposed 2.4 solution is quite similar.  It seems reasonable to
verify the reported FIFO size, but perhaps you have a better solution.
For anyone currently impacted by this bug, a simple yet limited
workaround is to change the uart type using setserial.  Thanks,

	Alex

-- 
Alex Williamson                             HP Linux & Open Source Lab


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-12-13 22:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-17 18:26 Exar ST16C2550 rev A2 bug Alex Williamson
2004-11-28 11:10 ` Russell King
2004-11-28 16:26   ` Alex Williamson
2004-12-03 21:06     ` Alex Williamson
2004-12-13 22:15       ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox