From: Stefan Bigler <stefan.bigler@keymile.com>
To: balbi@ti.com
Cc: Toby Gray <toby.gray@realvnc.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>, Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: TTY loosing data with u_serial gadget
Date: Thu, 24 Mar 2011 16:40:36 +0100 [thread overview]
Message-ID: <4D8B65F4.40306@keymile.com> (raw)
In-Reply-To: <20110324130006.GM14602@legolas.emea.dhcp.ti.com>
Can you try this:
> diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
> index 2f119e2..f0b9fb6 100644
> --- a/drivers/tty/tty_buffer.c
> +++ b/drivers/tty/tty_buffer.c
I tried it and the console is working again.
There is still an problem on heavy load transfer from host to gadget.
I attached the patch to fix also this problem.
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 8e0f113..95d0a9c 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -1359,6 +1359,7 @@ static unsigned int n_tty_receive_buf(struct
tty_struct *tty,
memcpy(tty->read_buf + tty->read_head, cp, i);
tty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1);
tty->read_cnt += i;
+ ret += i;
spin_unlock_irqrestore(&tty->read_lock, cpuflags);
} else {
ret = count;
With this patch I was able to transfer gigabytes without lost data.
next prev parent reply other threads:[~2011-03-24 15:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 20:47 TTY loosing data with u_serial gadget Stefan Bigler
2011-03-17 0:04 ` Greg KH
2011-03-18 16:35 ` Stefan Bigler
2011-03-18 17:08 ` Felipe Balbi
2011-03-18 18:06 ` Alan Cox
2011-03-21 9:32 ` Felipe Balbi
2011-03-22 8:53 ` Felipe Balbi
2011-03-22 11:04 ` Alan Cox
2011-03-22 17:01 ` Greg KH
2011-03-24 12:07 ` Toby Gray
2011-03-24 12:37 ` Felipe Balbi
2011-03-24 12:51 ` Toby Gray
2011-03-24 13:00 ` Felipe Balbi
2011-03-24 15:40 ` Stefan Bigler [this message]
2011-03-24 16:15 ` Toby Gray
2011-03-25 11:02 ` Felipe Balbi
2011-03-18 21:46 ` Stefan Bigler
2011-03-18 18:07 ` Alan Cox
2011-03-18 21:15 ` Stefan Bigler
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=4D8B65F4.40306@keymile.com \
--to=stefan.bigler@keymile.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=balbi@ti.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=toby.gray@realvnc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox