NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/40947: Thinkpad panics during shutdown
The following reply was made to PR kern/40947; it has been noted by GNATS.
From: "Jared D. McNeill" <jmcneill%invisible.ca@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost, Hauke Fath <hf%spg.tu-darmstadt.de@localhost>
Subject: Re: kern/40947: Thinkpad panics during shutdown
Date: Tue, 03 Mar 2009 12:47:31 -0500
This is a multi-part message in MIME format.
--------------050403000100050403080108
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hauke Fath wrote:
> The following reply was made to PR kern/40947; it has been noted by GNATS.
>
> From: Hauke Fath <hf%spg.tu-darmstadt.de@localhost>
> To: gnats-bugs%NetBSD.org@localhost
> Cc:
> Subject: Re: kern/40947: Thinkpad panics during shutdown
> Date: Tue, 03 Mar 2009 18:25:02 +0100
>
> The full stack trace from serial console (hmmm, looks like pcmcia
> breakage?):
Hi Hauke --
elink3.c should be adapted to use the new pmf instead of shutdownhooks.
Can you please try the attached patch?
Cheers,
Jared
--------------050403000100050403080108
Content-Type: text/plain;
name="pr40947.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="pr40947.patch"
Index: pcmcia/if_ep_pcmcia.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/if_ep_pcmcia.c,v
retrieving revision 1.62
diff -u -p -r1.62 if_ep_pcmcia.c
--- pcmcia/if_ep_pcmcia.c 27 Aug 2008 05:33:47 -0000 1.62
+++ pcmcia/if_ep_pcmcia.c 3 Mar 2009 17:46:38 -0000
@@ -322,7 +322,7 @@ ep_pcmcia_attach(device_t parent, device
if (epconfig(sc, epp->epp_chipset, enaddr))
aprint_error_dev(self, "couldn't configure controller\n");
- if (!pmf_device_register(self, NULL, NULL))
+ if (!pmf_device_register1(self, NULL, NULL, epshutdown))
aprint_error_dev(self, "couldn't establish power handler\n");
else
pmf_class_network_register(self, &sc->sc_ethercom.ec_if);
Index: ic/elink3.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/elink3.c,v
retrieving revision 1.127
diff -u -p -r1.127 elink3.c
--- ic/elink3.c 27 Aug 2008 05:33:47 -0000 1.127
+++ ic/elink3.c 3 Mar 2009 17:46:38 -0000
@@ -192,7 +192,6 @@ int epioctl(struct ifnet *, u_long, void
void epstart(struct ifnet *);
void epwatchdog(struct ifnet *);
void epreset(struct ep_softc *);
-static void epshutdown(void *);
void epread(struct ep_softc *);
struct mbuf *epget(struct ep_softc *, int);
void epmbuffill(void *);
@@ -500,9 +499,6 @@ epconfig(struct ep_softc *sc, u_short ch
sc->tx_start_thresh = 20; /* probably a good starting point. */
- /* Establish callback to reset card when we reboot. */
- sc->sd_hook = shutdownhook_establish(epshutdown, sc);
-
ep_reset_cmd(sc, ELINK_COMMAND, RX_RESET);
ep_reset_cmd(sc, ELINK_COMMAND, TX_RESET);
@@ -1798,10 +1794,10 @@ epstop(struct ifnet *ifp, int disable)
/*
* Before reboots, reset card completely.
*/
-static void
-epshutdown(void *arg)
+bool
+epshutdown(device_t dev, int how)
{
- struct ep_softc *sc = arg;
+ struct ep_softc *sc = device_private(dev); /* XXX DECL_NEW */
int s = splnet();
if (sc->enabled) {
@@ -1811,6 +1807,8 @@ epshutdown(void *arg)
sc->enabled = 0;
}
splx(s);
+
+ return true;
}
/*
Index: ic/elink3var.h
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/elink3var.h,v
retrieving revision 1.35
diff -u -p -r1.35 elink3var.h
--- ic/elink3var.h 27 Aug 2008 05:33:47 -0000 1.35
+++ ic/elink3var.h 3 Mar 2009 17:46:38 -0000
@@ -121,6 +121,7 @@ int epintr(void *);
int epenable(struct ep_softc *);
void epdisable(struct ep_softc *);
+bool epshutdown(device_t, int);
int ep_activate(device_t, enum devact);
int ep_detach(device_t, int);
--------------050403000100050403080108--
Home |
Main Index |
Thread Index |
Old Index