* Re: Unreliable register being read in max310x UART driver
[not found] <CAESxSQttZTWe8byjD+0u34=NtsnFysWfLBTmyTKGCBmpHQPaTA@mail.gmail.com>
@ 2015-11-03 7:27 ` Alexander Shiyan
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Shiyan @ 2015-11-03 7:27 UTC (permalink / raw)
To: Alexander Shi; +Cc: James Nuss, linux-serial, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1536 bytes --]
Hello.
> ÐонеделÑник, 2 ноÑбÑÑ 2015, 10:24 -05:00 Ð¾Ñ Alexander Shi <alexandershi@nanometrics.ca>:
>
> Hello all,
> Â
> The datasheet for MAX3107 UART ( http://datasheets.maximintegrated.com/en/ds/MAX3107.pdf ) was updated in February 2015 with a notice that the RxFIFOLvl register may be inaccurate if read while being updated. The respective max310x.c driver in the kernel actively makes use of the RxFIFOLvl register, but has not been updated since the notice was posted. Does anyone have a workaround to this bug?
> Â
> The notice was phrased as follows:
> âThe RxFIFOLvl register represents the current number of words in the receive FIFO whenever the receive UART is idle. When the receive UART actively receives characters, the value in this register can sometimes be inaccurate if this register is read at the same time that the receive UART updates the receive FIFO. To manage the receive FIFO even when the receive UART is active, do not use this register to determine receive FIFO state. Use the RFIFOEmptyInt bit, the RxTrgInt bit, and the RTimeOut bit instead.â
> Â
> Thanks,
> Alex
On my opinion this should not be a problem.
The RX interrupt will be triggered once again if we lost RX level value.
Anyway, you can add one check after reading rxfifolvl register:
if (!(ists & MAX310X_IRQ_RXEMPTY_BIT))
rxlen = 1;
Thanks.
---
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unreliable register being read in max310x UART driver
@ 2015-11-03 7:27 ` Alexander Shiyan
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Shiyan @ 2015-11-03 7:27 UTC (permalink / raw)
To: Alexander Shi; +Cc: James Nuss, linux-serial, linux-kernel
Hello.
> Понедельник, 2 ноября 2015, 10:24 -05:00 от Alexander Shi <alexandershi@nanometrics.ca>:
>
> Hello all,
>
> The datasheet for MAX3107 UART ( http://datasheets.maximintegrated.com/en/ds/MAX3107.pdf ) was updated in February 2015 with a notice that the RxFIFOLvl register may be inaccurate if read while being updated. The respective max310x.c driver in the kernel actively makes use of the RxFIFOLvl register, but has not been updated since the notice was posted. Does anyone have a workaround to this bug?
>
> The notice was phrased as follows:
> “The RxFIFOLvl register represents the current number of words in the receive FIFO whenever the receive UART is idle. When the receive UART actively receives characters, the value in this register can sometimes be inaccurate if this register is read at the same time that the receive UART updates the receive FIFO. To manage the receive FIFO even when the receive UART is active, do not use this register to determine receive FIFO state. Use the RFIFOEmptyInt bit, the RxTrgInt bit, and the RTimeOut bit instead.”
>
> Thanks,
> Alex
On my opinion this should not be a problem.
The RX interrupt will be triggered once again if we lost RX level value.
Anyway, you can add one check after reading rxfifolvl register:
if (!(ists & MAX310X_IRQ_RXEMPTY_BIT))
rxlen = 1;
Thanks.
---
^ permalink raw reply [flat|nested] 3+ messages in thread
* Unreliable register being read in max310x UART driver
@ 2015-11-02 15:30 Alexander Shi
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Shi @ 2015-11-02 15:30 UTC (permalink / raw)
To: linux-kernel, linux-serial; +Cc: James Nuss, shc_work
Hello all,
The datasheet for MAX3107 UART
(http://datasheets.maximintegrated.com/en/ds/MAX3107.pdf) was updated
in February 2015 with a notice that the RxFIFOLvl register may be
inaccurate if read while being updated. The respective max310x.c
driver actively makes use of the RxFIFOLvl register, but has not been
updated since the notice was posted. Does anyone have a workaround to
this bug?
The notice was phrased as follows:
“The RxFIFOLvl register represents the current number of words in the
receive FIFO whenever the receive UART is idle. When the receive UART
actively receives characters, the value in this register can sometimes
be inaccurate if this register is read at the same time that the
receive UART updates the receive FIFO. To manage the receive FIFO even
when the receive UART is active, do not use this register to determine
receive FIFO state. Use the RFIFOEmptyInt bit, the RxTrgInt bit, and
the RTimeOut bit instead.”
Thanks,
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-03 9:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAESxSQttZTWe8byjD+0u34=NtsnFysWfLBTmyTKGCBmpHQPaTA@mail.gmail.com>
2015-11-03 7:27 ` Unreliable register being read in max310x UART driver Alexander Shiyan
2015-11-03 7:27 ` Alexander Shiyan
2015-11-02 15:30 Alexander Shi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.