lkml.org 
[lkml]   [2006]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-usb-devel] Serial-Core: USB-Serial port current issues.
Luiz Fernando N. Capitulino wrote:
> | take mutex
> | take port lock
> | again:
> | save local copy of icount
> | release port lock
> | get_mctrl
> | take port lock
> | if (icount changed)
> | goto again
> | update tty->hw_stopped
> | release port lock
> | release mutex
>
> Well, I think it'd work. But how can we keep track of 'icount'?
> Should the driver add 1 if it updates 'tty->hw_stopped'?

The only thing about icount that needs to be
tracked is that it changes, which indicates
an interrupt might have changed hw_stopped.
If icount changes at all, invalidate the last
reading of the state and do it again. The way
icount is incremented is not changed.

Like I said, it is really ugly. I was just looking
for a way of allowing get_mctrl to sleep if necessary.

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

\
 
 \ /
  Last update: 2006-07-05 15:45    [W:0.192 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site