lkml.org 
[lkml]   [2007]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Linux-usb-users] [SOLVED] Serial buffer corruption [was Re: FTDI usb-serial possible bug]
Paul Fulghum ha scritto:
> There is no one policy here that will make everyone happy.
> Some will want all the data before some was lost,
> others the data after some was lost.
IMVHO the only sane thing is ALWAYS avoid "holes" (some old data, then
the "hole" of lost data, then some new data) after a flush().
HW buffers (and buffers on the remote end) are not an issue: they
contain fresher data (usually in "sliding window" mode) than buffered.

Thinking with a 300bps modem (anybody else remembers such an ancient
thing?):
- Sender have to transmit the alphabet;
- On the sender's modem there's a 4 char buffer
- On the receiver's modem there's another 4 char buffer
- The receiver's driver have another 4 char buffer

If the receiver issues a flush() after reading 'C', then the next read()
should return FGHIJKL...Z (or anything IN SEQUENCE), but *NEVER* DEFGKLM
(skipped H,I and J).

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

\
 
 \ /
  Last update: 2007-05-07 11:43    [W:0.068 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site