All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Fulghum <paulkf@microgate.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Greg KH <greg@kroah.com>, Oleksiy <Oleksiy@kharkiv.com.ua>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: pl2303/usb-serial driver problem in 2.4.27-pre6
Date: Wed, 27 Oct 2004 15:16:46 -0500	[thread overview]
Message-ID: <1098908206.2856.17.camel@deimos.microgate.com> (raw)
In-Reply-To: <1098576844.5996.27.camel@at2.pipehead.org>

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?

Oleksiy: Can you try this patch?

Thanks,
Paul

-- 
Paul Fulghum
paulkf@microgate.com

--- linux-2.4.28-pre4/drivers/usb/serial/pl2303.c	2004-08-07 18:26:05.000000000 -0500
+++ linux-2.4.28-pre4-mg/drivers/usb/serial/pl2303.c	2004-10-27 15:09:09.000000000 -0500
@@ -799,6 +799,7 @@ static void pl2303_read_bulk_callback (s
 				tty_flip_buffer_push(tty);
 			}
 			tty_insert_flip_char (tty, data[i], tty_flag);
+			tty_flag = TTY_NORMAL;
 		}
 		tty_flip_buffer_push (tty);
 	}



  reply	other threads:[~2004-10-27 20:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-11 11:22 pl2303/usb-serial driver problem in 2.4.27-pre6 Oleksiy
2004-10-11 11:36 ` Marcelo Tosatti
2004-10-12 14:34   ` Oleksiy
2004-10-12 17:48   ` Pete Zaitcev
2004-10-13 19:32     ` Alexander Wigen
2004-10-13 17:42       ` Greg KH
2004-10-14 14:06         ` Alexander Wigen
2004-10-14  7:50           ` Jan-Benedict Glaw
2004-10-12 17:10 ` Greg KH
2004-10-23 18:06   ` Marcelo Tosatti
2004-10-23 23:00     ` Paul Fulghum
2004-10-24  0:14       ` Paul Fulghum
2004-10-27 20:16         ` Paul Fulghum [this message]
2004-10-30  3:49           ` Greg KH
2004-10-30 15:36             ` Paul Fulghum
2004-10-30 23:52               ` Paul Fulghum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1098908206.2856.17.camel@deimos.microgate.com \
    --to=paulkf@microgate.com \
    --cc=Oleksiy@kharkiv.com.ua \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.