Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic fix negated loop condition. make break when reset.
details: https://anonhg.NetBSD.org/src/rev/b41b21c5149d
branches: trunk
changeset: 1008688:b41b21c5149d
user: nisimura <nisimura%NetBSD.org@localhost>
date: Tue Mar 31 07:50:42 2020 +0000
description:
fix negated loop condition. make break when reset.
diffstat:
sys/dev/ic/dm9000.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r eff8c62b389e -r b41b21c5149d sys/dev/ic/dm9000.c
--- a/sys/dev/ic/dm9000.c Tue Mar 31 07:08:59 2020 +0000
+++ b/sys/dev/ic/dm9000.c Tue Mar 31 07:50:42 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dm9000.c,v 1.25 2020/03/31 02:47:34 nisimura Exp $ */
+/* $NetBSD: dm9000.c,v 1.26 2020/03/31 07:50:42 nisimura Exp $ */
/*
* Copyright (c) 2009 Paul Fleischer
@@ -484,7 +484,7 @@
nsr = dme_read(sc, DM9000_NSR);
spd = Mbps[!!(nsr & DM9000_NSR_SPEED)];
/* speed/duplexity available also in reg 0x11 of internal PHY */
-#if 1
+#if 0
if (nsr & DM9000_NSR_LINKST)
printf("link up,spd%d", spd);
else
@@ -727,15 +727,16 @@
if_statinc(ifp, if_collisions);
continue;
}
- /* pick and forward the this frame to ifq */
+ /* pick and forward this frame to ifq */
if_percpuq_enqueue(ifp->if_percpuq, m);
} else if (avail != 00) {
/* Should this be logged somehow? */
printf("%s: Resetting chip\n",
device_xname(sc->sc_dev));
dme_reset(sc);
+ break;
}
- } while (avail != 01);
+ } while (avail == 01);
/* frame receieved successfully */
}
Home |
Main Index |
Thread Index |
Old Index