Re: pl2303/usb-serial driver problem in 2.4.27-pre6

Greg KH
2004-10-30T16:16:53Z

On Wed, Oct 27, 2004 at 03:16:46PM -0500, Paul Fulghum wrote:
> On Sat, 2004-10-23 at 19:14, Paul Fulghum wrote:
> > This change fits the reported symptom (loss of receive data).
> >
> > The change preserves line status errors
> > across multiple read interrupt callbacks until the error
> > can be applied to the contents of the next read bulk callback.
> >
> > What looks wrong to me is that the line status error,
> > which should be associated with an individual character,
> > is applied to the entire contents of the next bulk read.
> > Wouldn't this potentially invalidate good data?
> >
> > I'm not familiar with the operation of USB-serial converters,
> > so I don't know exactly how the flow of read interrupt and
> > read bulk callbacks are implemented to handle character errors.
> >
> > If I was to guess, before the change, errors were lost
> > (overwritten by the next read interrupt callback)
> > so the mask was added to preserve the error.
> > But the error is applied to more data than it should,
> > causing loss of valid receive data.
>
> USB CDC 1.1 does not specify how these error indications
> relate to subsequent bulk data packets. I could not find
> manufacturer info that helps. BSD drivers don't do
> error processing at all.
>
> Here is a patch that applies the error only to the
> next receive byte instead of all bytes in the
> next read bulk packet.
>
> Greg: Any comment?

Your patch looks sane, thanks.

> Oleksiy: Can you try this patch?

Let us know if this works or not. If so, Paul, care to resend this for
2.6 also?

thanks,

greg k-h