[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-serial
Subject: Re: question about drivers/serial/jsm/jsm_neo.c
From: Julia Lawall <julia () diku ! dk>
Date: 2009-10-17 13:07:23
Message-ID: Pine.LNX.4.64.0910171506330.8556 () pc-004 ! diku ! dk
[Download RAW message or body]
On Sat, 17 Oct 2009, Julia Lawall wrote:
> The file drivers/serial/jsm/jsm_neo.c contains the following code in the
> function neo_parse_modem:
>
> jsm_printk(MSIGS, INFO, &ch->ch_bd->pci_dev,
> "Port: %d DTR: %d RTS: %d CTS: %d DSR: %d " "RI: %d CD: %d\n",
> ch->ch_portnum,
> !!((ch->ch_mistat | ch->ch_mostat) & UART_MCR_DTR),
> !!((ch->ch_mistat | ch->ch_mostat) & UART_MCR_RTS),
> !!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_CTS),
> !!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_DSR),
> !!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_RI),
> !!((ch->ch_mistat | ch->ch_mostat) & UART_MSR_DCD));
>
> The whole function uses constants with the name "UART_MSR_..." except for
> the first two lines of this print statement, which uses constants with the
> name "UART_MCR_...". Furthermore, UART_MCR_DTR is equivalent to
> UART_MSR_DCTS and UART_MCR_RTS is equivalent to UART_MSR_DDSR. Is this
> intentional?
Hmm, maybe it is intentional because the | seems to be mixing both input
(Status) and output (Control).
julia
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic