summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_dynamic.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-12-17 21:42:10 +0000
committerthompsa <thompsa@FreeBSD.org>2009-12-17 21:42:10 +0000
commit6710b5f1158d9772396ba4f7e6f664bb6aa04c7b (patch)
tree3535f54927ebbbe970fa40aa0f99e835ff224bf8 /sys/dev/usb/usb_dynamic.c
parent86f640f7c3d9105c55e07ee1ec79221f09771fb8 (diff)
downloadFreeBSD-src-6710b5f1158d9772396ba4f7e6f664bb6aa04c7b.zip
FreeBSD-src-6710b5f1158d9772396ba4f7e6f664bb6aa04c7b.tar.gz
Use the EVENTHANDLER system to hook into the usb device configuration and
perform a function such as ejecting a 3G autoinstaller disk. The eventhandler system properly tracks threads and is safe to unload, remove the setting/clearing of a function pointer in the kernel by u3g(4) which included a tsleep for safety.
Diffstat (limited to 'sys/dev/usb/usb_dynamic.c')
-rw-r--r--sys/dev/usb/usb_dynamic.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/sys/dev/usb/usb_dynamic.c b/sys/dev/usb/usb_dynamic.c
index b64712f..add01ce 100644
--- a/sys/dev/usb/usb_dynamic.c
+++ b/sys/dev/usb/usb_dynamic.c
@@ -57,7 +57,6 @@ static usb_handle_req_t usb_temp_get_desc_w;
static usb_temp_setup_by_index_t usb_temp_setup_by_index_w;
static usb_temp_unsetup_t usb_temp_unsetup_w;
static usb_test_quirk_t usb_test_quirk_w;
-static usb_test_huawei_autoinst_t usb_test_huawei_autoinst_w;
static usb_quirk_ioctl_t usb_quirk_ioctl_w;
/* global variables */
@@ -65,7 +64,6 @@ usb_handle_req_t *usb_temp_get_desc_p = &usb_temp_get_desc_w;
usb_temp_setup_by_index_t *usb_temp_setup_by_index_p = &usb_temp_setup_by_index_w;
usb_temp_unsetup_t *usb_temp_unsetup_p = &usb_temp_unsetup_w;
usb_test_quirk_t *usb_test_quirk_p = &usb_test_quirk_w;
-usb_test_huawei_autoinst_t *usb_test_huawei_autoinst_p = &usb_test_huawei_autoinst_w;
usb_quirk_ioctl_t *usb_quirk_ioctl_p = &usb_quirk_ioctl_w;
devclass_t usb_devclass_ptr = NULL;
@@ -105,13 +103,6 @@ usb_temp_unsetup_w(struct usb_device *udev)
}
}
-static usb_error_t
-usb_test_huawei_autoinst_w(struct usb_device *udev,
- struct usb_attach_arg *uaa)
-{
- return (USB_ERR_INVAL);
-}
-
void
usb_quirk_unload(void *arg)
{
@@ -156,17 +147,3 @@ usb_bus_unload(void *arg)
pause("WAIT", hz);
}
-
-void
-usb_test_huawei_unload(void *arg)
-{
- /* reset function pointers */
-
- usb_test_huawei_autoinst_p = &usb_test_huawei_autoinst_w;
-
- /* wait for CPU to exit the loaded functions, if any */
-
- /* XXX this is a tradeoff */
-
- pause("WAIT", 16*hz);
-}
OpenPOWER on IntegriCloud