lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Mar 2011 16:15:02 +0000
From:	Toby Gray <toby.gray@...lvnc.com>
To:	stefan.bigler@...mile.com
CC:	balbi@...com, Alan Cox <alan@...rguk.ukuu.org.uk>,
	Greg KH <greg@...ah.com>, linux-kernel@...r.kernel.org,
	linux-usb@...r.kernel.org
Subject: Re: TTY loosing data with u_serial gadget

On 24/03/2011 15:40, Stefan Bigler wrote:
> 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.

I can confirm that this combined with the last two patches from Felipe 
Balbi fix all the issues I've had as well and seems stable and without 
loss under fast data transfers.

Regards,

Toby

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ