Current-Users archive

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

Re: usb panic



On Mon, May 21, 2012 at 07:36:52PM -0500, David Young wrote:
> Usually that's because there's a missing callout_destroy(9) call in some
> device-detachment routine.

I think ulpt.c needs the following patch:

Index: sys/dev/usb/ulpt.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/ulpt.c,v
retrieving revision 1.91
diff -u -p -r1.91 ulpt.c
--- sys/dev/usb/ulpt.c  11 Mar 2012 01:06:07 -0000      1.91
+++ sys/dev/usb/ulpt.c  22 May 2012 09:50:40 -0000
@@ -572,7 +572,8 @@ ulptclose(dev_t dev, int flag, int mode,
 
        if (sc->sc_has_callout) {
                DPRINTFN(2, ("ulptclose: stopping read callout\n"));
-               callout_stop(&sc->sc_read_callout);
+               callout_halt(&sc->sc_read_callout, NULL);
+               callout_destroy(&sc->sc_read_callout);
                sc->sc_has_callout = 0;
        }
 


Martin


Home | Main Index | Thread Index | Old Index