Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci disable interrupts when resetting the device.



details:   https://anonhg.NetBSD.org/src/rev/85537e5c3f28
branches:  trunk
changeset: 755712:85537e5c3f28
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Jun 17 06:41:05 2010 +0000

description:
disable interrupts when resetting the device.

diffstat:

 sys/dev/pci/if_cas.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r d2371bbc3544 -r 85537e5c3f28 sys/dev/pci/if_cas.c
--- a/sys/dev/pci/if_cas.c      Thu Jun 17 06:40:28 2010 +0000
+++ b/sys/dev/pci/if_cas.c      Thu Jun 17 06:41:05 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cas.c,v 1.8 2010/04/05 07:20:25 joerg Exp $ */
+/*     $NetBSD: if_cas.c,v 1.9 2010/06/17 06:41:05 mrg Exp $   */
 /*     $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $    */
 
 /*
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.8 2010/04/05 07:20:25 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.9 2010/06/17 06:41:05 mrg Exp $");
 
 #include "opt_inet.h"
 
@@ -784,6 +784,9 @@
        cas_reset_rx(sc);
        cas_reset_tx(sc);
 
+       /* Disable interrupts */
+       bus_space_write_4(sc->sc_memt, sc->sc_memh, CAS_INTMASK, ~(uint32_t)0);
+
        /* Do a full reset */
        bus_space_write_4(t, h, CAS_RESET,
            CAS_RESET_RX | CAS_RESET_TX | CAS_RESET_BLOCK_PCS);



Home | Main Index | Thread Index | Old Index