Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/stand/boot2440 - add short comments at the m...



details:   https://anonhg.NetBSD.org/src/rev/1b472de83ab9
branches:  trunk
changeset: 777580:1b472de83ab9
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Thu Feb 23 22:20:51 2012 +0000

description:
- add short comments at the most troublesome part of this device.
- remove a stale debug line.

diffstat:

 sys/arch/evbarm/stand/boot2440/dm9000.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r d22e4e90c422 -r 1b472de83ab9 sys/arch/evbarm/stand/boot2440/dm9000.c
--- a/sys/arch/evbarm/stand/boot2440/dm9000.c   Thu Feb 23 21:54:28 2012 +0000
+++ b/sys/arch/evbarm/stand/boot2440/dm9000.c   Thu Feb 23 22:20:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm9000.c,v 1.1 2012/02/22 12:08:41 nisimura Exp $ */
+/* $NetBSD: dm9000.c,v 1.2 2012/02/23 22:20:51 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -324,8 +324,6 @@
        return len;
 }
 
-void hexdump16(char *p);
-
 int
 dm9k_recv(void *dev, char *buf, unsigned int maxlen, unsigned int timo)
 {
@@ -348,7 +346,7 @@
   gotone:
        CSR_WRITE_1(l, ISR, ISR_PRS); /* clear ISR Rx complete bit */
        (void) CSR_READ_2(l, MRCMDX); /* dummy read */
-       mark = CSR_READ_2(l, MRCMDX);
+       mark = CSR_READ_2(l, MRCMDX); /* mark in [7:0] */
        if ((mark & 03) != 01) {
                stat = CSR_READ_1(l, RSR);
                printf("dm9k_recv: mark %x, RSR %x\n", mark, stat);
@@ -356,7 +354,7 @@
                goto again;
        }
 
-       stat = CSR_READ_2(l, MRCMD);
+       stat = CSR_READ_2(l, MRCMD); /* stat in [15:8] */
        len  = CSR_READ_2(l, MRCMD);
 
        /* should not happen, make sure to discard bcast/mcast frames */



Home | Main Index | Thread Index | Old Index