summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2008-04-24 12:49:41 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2008-04-24 12:49:41 +0000
commit6147b0de4acb3bc351ef8418b42e364d4a3017de (patch)
treee49d9abdceb714b1e77012b151e046a91dcfba63
parent05a077b09174cb24abd3bc3c03b0e5f232cf77ff (diff)
Clean up comments.
-rw-r--r--sys/dev/ic/com.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index 443c4e64744..49c08b7362a 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com.c,v 1.123 2008/04/24 12:29:34 jsing Exp $ */
+/* $OpenBSD: com.c,v 1.124 2008/04/24 12:49:40 jsing Exp $ */
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*
@@ -204,7 +204,7 @@ com_detach(struct device *self, int flags)
sc->sc_swflags |= COM_SW_DEAD;
- /* locate the major number */
+ /* Locate the major number. */
for (maj = 0; maj < nchrdev; maj++)
if (cdevsw[maj].d_open == comopen)
break;
@@ -400,10 +400,11 @@ comopen(dev_t dev, int flag, int mode, struct proc *p)
bus_space_write_1(iot, ioh, com_lcr, lcr);
}
- /* flush any pending I/O */
+ /* Flush any pending I/O. */
while (ISSET(bus_space_read_1(iot, ioh, com_lsr), LSR_RXRDY))
(void) bus_space_read_1(iot, ioh, com_data);
- /* you turn me on, baby */
+
+ /* You turn me on, baby! */
sc->sc_mcr = MCR_DTR | MCR_RTS;
if (!ISSET(sc->sc_hwflags, COM_HW_NOIEN))
SET(sc->sc_mcr, MCR_IENABLE);
@@ -441,12 +442,12 @@ comopen(dev_t dev, int flag, int mode, struct proc *p)
splx(s);
return EBUSY;
}
- sc->sc_cua = 1; /* We go into CUA mode */
+ sc->sc_cua = 1; /* We go into CUA mode. */
} else {
- /* tty (not cua) device; wait for carrier if necessary */
+ /* tty (not cua) device; wait for carrier if necessary. */
if (ISSET(flag, O_NONBLOCK)) {
if (sc->sc_cua) {
- /* Opening TTY non-blocking... but the CUA is busy */
+ /* Opening TTY non-blocking... but the CUA is busy. */
splx(s);
return EBUSY;
}
@@ -749,7 +750,7 @@ comparam(struct tty *tp, struct termios *t)
u_char lcr;
tcflag_t oldcflag;
- /* check requested parameters */
+ /* Check requested parameters. */
if (ospeed < 0 || (t->c_ispeed && t->c_ispeed != t->c_ospeed))
return EINVAL;
@@ -1127,7 +1128,7 @@ comintr(void *arg)
u_char lsr, data, msr, delta;
if (!sc->sc_tty)
- return (0); /* can't do squat. */
+ return (0); /* Can't do squat. */
if (ISSET(bus_space_read_1(iot, ioh, com_iir), IIR_NOPEND))
return (0);
@@ -1237,12 +1238,13 @@ com_common_getc(bus_space_tag_t iot, bus_space_handle_t ioh)
bus_space_write_1(iot, ioh, com_isr, ISR_RECV);
#endif
- /* block until a character becomes available */
+ /* Block until a character becomes available. */
while (!ISSET(stat = bus_space_read_1(iot, ioh, com_lsr), LSR_RXRDY))
continue;
c = bus_space_read_1(iot, ioh, com_data);
- /* clear any interrupts generated by this transmission */
+
+ /* Clear any interrupts generated by this transmission. */
stat = bus_space_read_1(iot, ioh, com_iir);
splx(s);
return (c);
@@ -1254,7 +1256,7 @@ com_common_putc(bus_space_tag_t iot, bus_space_handle_t ioh, int c)
int s = spltty();
int timo;
- /* wait for any pending transmission to finish */
+ /* Wait for any pending transmission to finish. */
timo = 2000;
while (!ISSET(bus_space_read_1(iot, ioh, com_lsr), LSR_TXRDY) && --timo)
delay(1);
@@ -1267,14 +1269,14 @@ com_common_putc(bus_space_tag_t iot, bus_space_handle_t ioh, int c)
bus_space_barrier(iot, ioh, 0, COM_NPORTS,
(BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE));
- /* wait for this transmission to complete */
+ /* Wait for this transmission to complete. */
timo = 2000;
while (!ISSET(bus_space_read_1(iot, ioh, com_lsr), LSR_TXRDY) && --timo)
delay(1);
#ifdef COM_PXA2X0
if (com_is_console(iot, comsiraddr)) {
- /* wait for transmit shift register to become empty */
+ /* Wait for transmit shift register to become empty. */
timo = 20000;
while (!ISSET(bus_space_read_1(iot, ioh, com_lsr), LSR_TSRE)
&& --timo)