Messages in this thread | | | Date | Mon, 07 May 2007 11:11:27 +0200 | From | Diego Zuccato <> | Subject | Re: [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/
| |