diff options
author | jhb <jhb@FreeBSD.org> | 2008-11-16 17:42:02 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-11-16 17:42:02 +0000 |
commit | 51d2cc2053b7f7f5b8d7d908edfbe54ce19e0e2a (patch) | |
tree | b65bdf61a799cb56906bea0847235a1bd148de23 /sys/dev/ppbus/ppb_1284.c | |
parent | f5d16a4d6617f527e4a33953e48f82272ee8d572 (diff) | |
download | FreeBSD-src-51d2cc2053b7f7f5b8d7d908edfbe54ce19e0e2a.zip FreeBSD-src-51d2cc2053b7f7f5b8d7d908edfbe54ce19e0e2a.tar.gz |
Various whitespace and style fixes.
Diffstat (limited to 'sys/dev/ppbus/ppb_1284.c')
-rw-r--r-- | sys/dev/ppbus/ppb_1284.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/sys/dev/ppbus/ppb_1284.c b/sys/dev/ppbus/ppb_1284.c index 5663503..28ee321 100644 --- a/sys/dev/ppbus/ppb_1284.c +++ b/sys/dev/ppbus/ppb_1284.c @@ -92,7 +92,8 @@ ppb_1284_reset_error(device_t bus, int state) int ppb_1284_get_state(device_t bus) { - return (DEVTOSOFTC(bus)->state); + + return (DEVTOSOFTC(bus)->state); } /* @@ -293,7 +294,7 @@ ppb_peripheral_terminate(device_t bus, int how) } /* Event 24 */ - ppb_wctr(bus, (nINIT | STROBE) & ~(AUTOFEED | SELECTIN)); + ppb_wctr(bus, (nINIT | STROBE) & ~(AUTOFEED | SELECTIN)); /* Event 25 - wait up to host response time (1s) */ if ((error = do_peripheral_wait(bus, nBUSY, nBUSY))) { @@ -302,17 +303,17 @@ ppb_peripheral_terminate(device_t bus, int how) } /* Event 26 */ - ppb_wctr(bus, (SELECTIN | nINIT | STROBE) & ~(AUTOFEED)); + ppb_wctr(bus, (SELECTIN | nINIT | STROBE) & ~(AUTOFEED)); DELAY(1); /* Event 27 */ - ppb_wctr(bus, (SELECTIN | nINIT) & ~(STROBE | AUTOFEED)); + ppb_wctr(bus, (SELECTIN | nINIT) & ~(STROBE | AUTOFEED)); /* Event 28 - wait up to host response time (1s) */ if ((error = do_peripheral_wait(bus, nBUSY, 0))) { ppb_1284_set_error(bus, PPB_TIMEOUT, 28); goto error; } - + error: ppb_set_mode(bus, PPB_COMPATIBLE); ppb_1284_set_state(bus, PPB_FORWARD_IDLE); @@ -538,7 +539,7 @@ spp_1284_read(device_t bus, int mode, char *buffer, int max, int *read) case PPB_REVERSE_IDLE: terminate_after_transfer = 0; break; - + default: ppb_1284_terminate(bus); if ((error = ppb_1284_negociate(bus, mode, 0))) @@ -689,9 +690,9 @@ ppb_1284_negociate(device_t bus, int mode, int options) #ifdef PERIPH_1284 /* request remote host attention */ - ppb_wctr(bus, (nINIT | STROBE) & ~(AUTOFEED | SELECTIN)); - DELAY(1); - ppb_wctr(bus, (nINIT) & ~(STROBE | AUTOFEED | SELECTIN)); + ppb_wctr(bus, (nINIT | STROBE) & ~(AUTOFEED | SELECTIN)); + DELAY(1); + ppb_wctr(bus, (nINIT) & ~(STROBE | AUTOFEED | SELECTIN)); #else DELAY(1); @@ -701,14 +702,14 @@ ppb_1284_negociate(device_t bus, int mode, int options) ppb_wctr(bus, (nINIT | AUTOFEED) & ~(STROBE | SELECTIN)); #ifdef PERIPH_1284 - /* ignore the PError line, wait a bit more, remote host's + /* ignore the PError line, wait a bit more, remote host's * interrupts don't respond fast enough */ if (ppb_poll_bus(bus, 40, nACK | SELECT | nFAULT, SELECT | nFAULT, PPB_NOINTR | PPB_POLL)) { - ppb_1284_set_error(bus, PPB_NOT_IEEE1284, 2); - error = ENODEV; - goto error; - } + ppb_1284_set_error(bus, PPB_NOT_IEEE1284, 2); + error = ENODEV; + goto error; + } #else /* Event 2 - trying IEEE1284 dialog */ if (do_1284_wait(bus, nACK | PERROR | SELECT | nFAULT, @@ -770,11 +771,11 @@ ppb_1284_negociate(device_t bus, int mode, int options) #ifdef PERIPH_1284 /* ignore PError line */ if (do_1284_wait(bus, nACK | SELECT | nBUSY, - nACK | SELECT | nBUSY)) { - ppb_1284_set_error(bus, PPB_TIMEOUT, 30); - error = ENODEV; - goto error; - } + nACK | SELECT | nBUSY)) { + ppb_1284_set_error(bus, PPB_TIMEOUT, 30); + error = ENODEV; + goto error; + } #else if (do_1284_wait(bus, nACK | SELECT | PERROR | nBUSY, nACK | SELECT | PERROR | nBUSY)) { @@ -824,8 +825,8 @@ ppb_1284_terminate(device_t bus) #ifdef PERIPH_1284 /* request remote host attention */ - ppb_wctr(bus, (nINIT | STROBE | SELECTIN) & ~(AUTOFEED)); - DELAY(1); + ppb_wctr(bus, (nINIT | STROBE | SELECTIN) & ~(AUTOFEED)); + DELAY(1); #endif /* PERIPH_1284 */ /* Event 22 - set nSelectin low and nAutoFeed high */ |