summaryrefslogtreecommitdiff
path: root/sys/dev/usb/usbdi.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/usbdi.h')
-rw-r--r--sys/dev/usb/usbdi.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index a38a953031d..9aaa0bba5f9 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi.h,v 1.40 2011/02/04 08:21:39 jakemsr Exp $ */
+/* $OpenBSD: usbdi.h,v 1.41 2011/02/09 04:25:32 jakemsr Exp $ */
/* $NetBSD: usbdi.h,v 1.62 2002/07/11 21:14:35 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */
@@ -139,7 +139,6 @@ usbd_status usbd_set_interface(usbd_interface_handle, int);
int usbd_get_no_alts(usb_config_descriptor_t *, int);
usbd_status usbd_get_interface(usbd_interface_handle iface, u_int8_t *aiface);
void usbd_fill_deviceinfo(usbd_device_handle, struct usb_device_info *, int);
-void usbd_fill_di_task(void *);
int usbd_get_interface_altindex(usbd_interface_handle iface);
usb_interface_descriptor_t *usbd_find_idesc(usb_config_descriptor_t *cd,
@@ -188,33 +187,28 @@ const usb_descriptor_t *usb_desc_iter_next(usbd_desc_iter_t *);
* has been detected. But it may also be used by drivers that need to
* perform (short) tasks that must have a process context.
*/
-enum usb_task_state {
- USB_TASK_STATE_NONE,
- USB_TASK_STATE_ONQ,
- USB_TASK_STATE_RUN
-};
-
struct usb_task {
TAILQ_ENTRY(usb_task) next;
usbd_device_handle dev;
void (*fun)(void *);
void *arg;
char type;
-#define USB_TASK_TYPE_GENERIC 0
+#define USB_TASK_TYPE_GENERIC 0
#define USB_TASK_TYPE_EXPLORE 1
#define USB_TASK_TYPE_ABORT 2
- enum usb_task_state state;
+ char onqueue;
+ char running;
};
void usb_add_task(usbd_device_handle, struct usb_task *);
void usb_rem_task(usbd_device_handle, struct usb_task *);
-void usb_wait_task(usbd_device_handle, struct usb_task *);
void usb_rem_wait_task(usbd_device_handle, struct usb_task *);
#define usb_init_task(t, f, a, y) \
((t)->fun = (f), \
(t)->arg = (a), \
(t)->type = (y), \
- (t)->state = USB_TASK_STATE_NONE)
+ (t)->onqueue = 0, \
+ (t)->running = 0)
struct usb_devno {
u_int16_t ud_vendor;