Date: Mon, 22 Dec 2008 12:42:05 GMT From: Weongyo Jeong <weongyo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 155117 for review Message-ID: <200812221242.mBMCg5M2053245@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=155117 Change 155117 by weongyo@weongyo_ws on 2008/12/22 12:41:27 change our tactics to detach USB NDIS driver already attached and working to send a `SURPRISE REMOVED' PNP event to the NDIS driver's handler if they have then try to cacel timers for buggy NDIS driver. As last, it try to halt the device using ndis_halt_nic(). Until the previous version, most drivers I've tested worked to attach the device but there were problems to detach, for example, panics, page faults or unknown system hang (serial-console didn't work to enter DDB). Now it looks it becomes more stable to detach USB adapters. Affected files ... .. //depot/projects/ndisusb/sys/dev/if_ndis/if_ndis_usb.c#5 edit Differences ... ==== //depot/projects/ndisusb/sys/dev/if_ndis/if_ndis_usb.c#5 (text+ko) ==== @@ -65,6 +65,7 @@ #include <compat/ndis/resource_var.h> #include <compat/ndis/ntoskrnl_var.h> #include <compat/ndis/ndis_var.h> +#include <compat/ndis/usbd_var.h> #include <dev/if_ndis/if_ndisvar.h> SYSCTL_NODE(_hw, OID_AUTO, ndisusb, CTLFLAG_RD, 0, "NDIS USB driver parameters"); @@ -233,6 +234,9 @@ sc->ndisusb_iin_buf = NULL; } + ndis_pnpevent_nic(self, NDIS_PNP_EVENT_SURPRISE_REMOVED); + ndis_cancel_timerlist(); + usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, uaa->device, self); return ndis_detach(self);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812221242.mBMCg5M2053245>