Re: [PATCH] cdc-acm: some enhancement on acm delayed write

From: Oliver Neukum
Date: Tue Apr 08 2014 - 06:22:34 EST


On Tue, 2014-04-08 at 09:33 +0200, Johan Hovold wrote:
> On Tue, Apr 08, 2014 at 11:05:20AM +0800, Xiao Jin wrote:
> > We find two problems on acm tty write delayed mechanism.
>
> Then you should split this into two patches.
>
> > (1) When acm resume, the delayed wb will be started. But now
> > only one write can be saved during acm suspend. More acm write
> > may be abandoned.
>
> Why not simply return 0 in write and use the tty buffering rather than
> implement another buffer in cdc_acm?

Yes. We need a single buffer because the tty layer is not happy
when you accept no data. But we should be able to refuse subsequent
writes. Could you test this patch?

Regards
Oliver