Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sandpoint/sandpoint - fix an error which prevents s...



details:   https://anonhg.NetBSD.org/src/rev/b2108a329350
branches:  trunk
changeset: 777555:b2108a329350
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Wed Feb 22 22:56:44 2012 +0000

description:
- fix an error which prevents satmgr from sending NUL bytes.
- a bit cosmetic change for IOMEGA multibyte control sequence.

diffstat:

 sys/arch/sandpoint/sandpoint/satmgr.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (45 lines):

diff -r a945b0440890 -r b2108a329350 sys/arch/sandpoint/sandpoint/satmgr.c
--- a/sys/arch/sandpoint/sandpoint/satmgr.c     Wed Feb 22 20:59:26 2012 +0000
+++ b/sys/arch/sandpoint/sandpoint/satmgr.c     Wed Feb 22 22:56:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: satmgr.c,v 1.15 2012/01/23 16:22:58 phx Exp $ */
+/* $NetBSD: satmgr.c,v 1.16 2012/02/22 22:56:44 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -678,11 +678,11 @@
 static void
 startoutput(struct satmgr_softc *sc)
 {
-       int n, ch;
+       int n;
 
        n = min(sc->sc_wr_cnt, 16);
-       while ((ch = *sc->sc_wr_ptr) && n-- > 0) {
-               CSR_WRITE(sc, THR, ch);
+       while (n-- > 0) {
+               CSR_WRITE(sc, THR, *sc->sc_wr_ptr);
                if (++sc->sc_wr_ptr == sc->sc_wr_lim)
                        sc->sc_wr_ptr = &sc->sc_wr_buf[0];
                sc->sc_wr_cnt -= 1;
@@ -933,13 +933,13 @@
         * Construct the command packet. Values of -1 (0xff) will be
         * replaced later by the current values from the last status.
         */
-       *p++ = pow;
-       *p++ = led;
-       *p++ = rat;
-       *p++ = fan;
-       *p++ = fhi;
-       *p++ = flo;
-       *p = 7; /* host id */
+       p[0] = pow;
+       p[1] = led;
+       p[2] = rat;
+       p[3] = fan;
+       p[4] = fhi;
+       p[5] = flo;
+       p[6] = 7; /* host id */
 
        /* synchronize transmitter, before packet can be sent */
        callout_reset(&sc->sc_ch_sync, hz / 5, idosync, sc);



Home | Main Index | Thread Index | Old Index