Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pcmcia Swap the order of disabling the function and ...
details: https://anonhg.NetBSD.org/src/rev/e270667609a2
branches: trunk
changeset: 485890:e270667609a2
user: augustss <augustss%NetBSD.org@localhost>
date: Mon May 08 13:53:32 2000 +0000
description:
Swap the order of disabling the function and disestablishing the interrupt
on detach. This avoid accessing unmapped registers on multi-function cards.
diffstat:
sys/dev/pcmcia/if_ep_pcmcia.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 650aa489db9e -r e270667609a2 sys/dev/pcmcia/if_ep_pcmcia.c
--- a/sys/dev/pcmcia/if_ep_pcmcia.c Mon May 08 13:51:36 2000 +0000
+++ b/sys/dev/pcmcia/if_ep_pcmcia.c Mon May 08 13:53:32 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ep_pcmcia.c,v 1.32 2000/03/13 23:36:02 cgd Exp $ */
+/* $NetBSD: if_ep_pcmcia.c,v 1.33 2000/05/08 13:53:32 augustss Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -250,8 +250,13 @@
{
struct ep_pcmcia_softc *psc = (struct ep_pcmcia_softc *) sc;
+ /*
+ * We must disestablish the interrupt before disabling the function,
+ * because on a multifunction card the interrupt disestablishment
+ * accesses CCR registers.
+ */
+ pcmcia_intr_disestablish(psc->sc_pf, sc->sc_ih);
ep_pcmcia_disable1(sc);
- pcmcia_intr_disestablish(psc->sc_pf, sc->sc_ih);
}
void
@@ -301,7 +306,7 @@
}
if (pa->product == PCMCIA_PRODUCT_3COM_3C562) {
- bus_addr_t maxaddr = (pa->pf->sc->iobase + pa->pf->sc->iosize);
+ bus_addr_t maxaddr = pa->pf->sc->iobase + pa->pf->sc->iosize;
for (i = pa->pf->sc->iobase; i < maxaddr; i += 0x10) {
/*
Home |
Main Index |
Thread Index |
Old Index