kern/83247: if_cdce.c doesn't emit USB_EVENT_DRIVER_DETACH on USB_DETACH

Sangwoo Shim ssw at neo.redjade.org
Mon Jul 11 08:10:24 GMT 2005


>Number:         83247
>Category:       kern
>Synopsis:       if_cdce.c doesn't emit USB_EVENT_DRIVER_DETACH on USB_DETACH
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 11 08:10:22 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Sangwoo Shim
>Release:        6.0-CURRENT
>Organization:
Seoul Natl' Univ.
>Environment:
FreeBSD swoo.org 6.0-CURRENT FreeBSD 6.0-CURRENT #3: Sun Jul 10 15:54:18 KST 2005     root at swoo.org:/usr/obj/usr/src/sys/SWOO  amd64
>Description:
      There are usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, ...) routine in the USB_ATTACH of if_cdce.c, but no usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, ...) in the USB_DETACH. 
>How-To-Repeat:
      
>Fix:
      Following patch should take care of this.

%%%
--- if_cdce.c.orig      Mon Jul 11 16:56:58 2005
+++ if_cdce.c   Mon Jul 11 16:57:50 2005
@@ -330,6 +330,9 @@
        CDCE_UNLOCK(sc);
        mtx_destroy(&sc->cdce_mtx);
 
+       usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->cdce_udev,
+           USBDEV(sc->cdce_dev));
+
        return (0);
 }

%%%
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list