[lkml]   [2009]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/7] ark3116: (3rd try) Replace cmget
2009/10/25 Oliver Neukum <>:
> Am Sonntag, 25. Oktober 2009 18:51:00 schrieb
>> +       /* read modem status */
>> +       unsigned status = atomic_read(&priv->msr);
>> +       /* modem control is output */
>> +       unsigned ctrl = atomic_read(&priv->mcr);
> What is the sense of having two atomic variables?
> You can get races where one is changed but the other is not.
>        Regards
>                Oliver

Hi Oliver,

I don't think so. The two values are not really related.

These are two separate things: mcr (modem control reg) is ultimately
changed by whatever has the serial port open, msr (modem status
register) represents the status of the handshaking lines, and is
changed (via the interrupt urb callback) by hardware.


Bart Hartgers - New e-mail:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2009-10-25 20:59    [W:0.041 / U:8.468 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site