Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/dev/ic Pull up revision 1.145 (requested by ryoon in ...



details:   https://anonhg.NetBSD.org/src/rev/5ad1cfabefcb
branches:  netbsd-6
changeset: 774362:5ad1cfabefcb
user:      jdc <jdc%NetBSD.org@localhost>
date:      Wed Jul 25 20:55:36 2012 +0000

description:
Pull up revision 1.145 (requested by ryoon in ticket #439).

When issuing a non-dma command, make sure to set the "remaining length of
command to be transfered via dma" (sc_cmdlen) to zero upfront, otherwise we
might get confused on command completition interrupt (no dma active but still
data left to transfer).

diffstat:

 sys/dev/ic/ncr53c9x.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (50 lines):

diff -r 296734e3ed28 -r 5ad1cfabefcb sys/dev/ic/ncr53c9x.c
--- a/sys/dev/ic/ncr53c9x.c     Wed Jul 25 20:52:53 2012 +0000
+++ b/sys/dev/ic/ncr53c9x.c     Wed Jul 25 20:55:36 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ncr53c9x.c,v 1.143.8.1 2012/03/19 23:13:59 riz Exp $   */
+/*     $NetBSD: ncr53c9x.c,v 1.143.8.2 2012/07/25 20:55:36 jdc Exp $   */
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.143.8.1 2012/03/19 23:13:59 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.143.8.2 2012/07/25 20:55:36 jdc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -735,6 +735,7 @@
                } else {
                        ncr53c9x_wrfifo(sc, (uint8_t *)&ecb->cmd.cmd,
                            ecb->clen);
+                       sc->sc_cmdlen = 0;
                        NCRCMD(sc, NCRCMD_SELNATN);
                }
                return;
@@ -804,6 +805,7 @@
         */
 
        /* Now get the command into the FIFO */
+       sc->sc_cmdlen = 0;
        ncr53c9x_wrfifo(sc, cmd, clen);
 
        /* And get the targets attention */
@@ -2054,6 +2056,7 @@
                 */
                ncr53c9x_flushfifo(sc);
                ncr53c9x_wrfifo(sc, sc->sc_omp, sc->sc_omlen);
+               sc->sc_cmdlen = 0;
                NCRCMD(sc, NCRCMD_TRANS);
        } else {
                /* (re)send the message */
@@ -2759,6 +2762,7 @@
                } else {
                        ncr53c9x_wrfifo(sc, (uint8_t *)&ecb->cmd.cmd,
                            ecb->clen);
+                       sc->sc_cmdlen = 0;
                        NCRCMD(sc, NCRCMD_TRANS);
                }
                sc->sc_prevphase = COMMAND_PHASE;



Home | Main Index | Thread Index | Old Index