Subject: Re: linux-next: manual merge of the ttydev tree with the usb.current tree

From: Alan Cox <[email-masked]>
Date: Tue, 28 Jul 2009 13:29:11 +0100

> As serial_open() takes the lock, resume() must not do so.
> If however, remote wakeup is used a lock must be taken
> to look at port->count reliably. As this is impossible, the patch
> implementing use of remote wakeup for the option driver
> implements a private flag for opened ports.

I need to look at the actual diff, but the combination looks completely
bogus unless I'm misreading the fixup which is possible.

The way the core serial code and most other drivers do this is to keep
track of the port ASYNC_INITIALIZED flag, which indicates (in the non USB
cases but trivially fixable for the USB cases) that the port hardware is
initialized. We now set it on an open but we don't clear it on
serial_do_down() finishing.