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 system freeze in situation where you pop a pc...



details:   https://anonhg.NetBSD.org/src/rev/4963c161c62d
branches:  trunk
changeset: 515698:4963c161c62d
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Oct 02 19:17:07 2001 +0000

description:
fix system freeze in situation where you pop a pcmcia card out of the
slot while it is in operation

ok'd by thorpej

diffstat:

 sys/dev/ic/smc91cxx.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 886c293db5a8 -r 4963c161c62d sys/dev/ic/smc91cxx.c
--- a/sys/dev/ic/smc91cxx.c     Tue Oct 02 17:59:38 2001 +0000
+++ b/sys/dev/ic/smc91cxx.c     Tue Oct 02 19:17:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smc91cxx.c,v 1.35 2001/08/20 20:22:53 thorpej Exp $    */
+/*     $NetBSD: smc91cxx.c,v 1.36 2001/10/02 19:17:07 pooka Exp $      */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -800,10 +800,11 @@
        if (status & IM_RCV_INT) {
 #if 1 /* DIAGNOSTIC */
                packetno = bus_space_read_2(bst, bsh, FIFO_PORTS_REG_W);
-               if (packetno & FIFO_REMPTY)
+               if (packetno & FIFO_REMPTY) {
                        printf("%s: receive interrupt on empty fifo\n",
                            sc->sc_dev.dv_xname);
-               else
+                       goto out;
+               } else
 #endif
                smc91cxx_read(sc);
        }
@@ -924,6 +925,7 @@
         */
        smc91cxx_start(ifp);
 
+out:
        /*
         * Reenable the interrupts we wish to receive now that processing
         * is complete.



Home | Main Index | Thread Index | Old Index