Deleted Added
full compact
usb_device.h (259218) usb_device.h (260589)
1/* $FreeBSD: head/sys/dev/usb/usb_device.h 259218 2013-12-11 13:20:32Z hselasky $ */
1/* $FreeBSD: head/sys/dev/usb/usb_device.h 260589 2014-01-13 15:21:11Z hselasky $ */
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 38 unchanged lines hidden (view full) ---

48#define USB_CFG_FREE 1
49#define USB_CFG_INIT 2
50
51/* "usb_unconfigure()" flags */
52
53#define USB_UNCFG_FLAG_NONE 0x00
54#define USB_UNCFG_FLAG_FREE_EP0 0x02 /* endpoint zero is freed */
55
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 38 unchanged lines hidden (view full) ---

48#define USB_CFG_FREE 1
49#define USB_CFG_INIT 2
50
51/* "usb_unconfigure()" flags */
52
53#define USB_UNCFG_FLAG_NONE 0x00
54#define USB_UNCFG_FLAG_FREE_EP0 0x02 /* endpoint zero is freed */
55
56struct usb_clear_stall_msg {
56struct usb_udev_msg {
57 struct usb_proc_msg hdr;
58 struct usb_device *udev;
59};
60
61/* The following four structures makes up a tree, where we have the
62 * leaf structure, "usb_host_endpoint", first, and the root structure,
63 * "usb_device", last. The four structures below mirror the structure
64 * of the USB descriptors belonging to an USB configuration. Please

--- 109 unchanged lines hidden (view full) ---

174 uint8_t data[255];
175};
176
177/*
178 * The following structure defines an USB device. There exists one of
179 * these structures for every USB device.
180 */
181struct usb_device {
57 struct usb_proc_msg hdr;
58 struct usb_device *udev;
59};
60
61/* The following four structures makes up a tree, where we have the
62 * leaf structure, "usb_host_endpoint", first, and the root structure,
63 * "usb_device", last. The four structures below mirror the structure
64 * of the USB descriptors belonging to an USB configuration. Please

--- 109 unchanged lines hidden (view full) ---

174 uint8_t data[255];
175};
176
177/*
178 * The following structure defines an USB device. There exists one of
179 * these structures for every USB device.
180 */
181struct usb_device {
182 struct usb_clear_stall_msg cs_msg[2]; /* generic clear stall
183 * messages */
182 /* generic clear stall message */
183 struct usb_udev_msg cs_msg[2];
184 struct sx enum_sx;
185 struct sx sr_sx;
186 struct mtx device_mtx;
187 struct cv ctrlreq_cv;
188 struct cv ref_cv;
189#if (USB_HAVE_FIXED_IFACE == 0)
190 struct usb_interface *ifaces;
191#else

--- 119 unchanged lines hidden (view full) ---

311enum usb_dev_state usb_get_device_state(struct usb_device *);
312
313uint8_t usbd_enum_lock(struct usb_device *);
314void usbd_enum_unlock(struct usb_device *);
315void usbd_sr_lock(struct usb_device *);
316void usbd_sr_unlock(struct usb_device *);
317uint8_t usbd_enum_is_locked(struct usb_device *);
318
184 struct sx enum_sx;
185 struct sx sr_sx;
186 struct mtx device_mtx;
187 struct cv ctrlreq_cv;
188 struct cv ref_cv;
189#if (USB_HAVE_FIXED_IFACE == 0)
190 struct usb_interface *ifaces;
191#else

--- 119 unchanged lines hidden (view full) ---

311enum usb_dev_state usb_get_device_state(struct usb_device *);
312
313uint8_t usbd_enum_lock(struct usb_device *);
314void usbd_enum_unlock(struct usb_device *);
315void usbd_sr_lock(struct usb_device *);
316void usbd_sr_unlock(struct usb_device *);
317uint8_t usbd_enum_is_locked(struct usb_device *);
318
319#if USB_HAVE_TT_SUPPORT
320void uhub_tt_buffer_reset_async_locked(struct usb_device *, struct usb_endpoint *);
321#endif
322
323uint8_t uhub_count_active_host_ports(struct usb_device *, enum usb_dev_speed);
324
319#endif /* _USB_DEVICE_H_ */
325#endif /* _USB_DEVICE_H_ */