Deleted Added
full compact
usb_device.h (302408) usb_device.h (305733)
1/* $FreeBSD: stable/11/sys/dev/usb/usb_device.h 300667 2016-05-25 07:48:36Z hselasky $ */
1/* $FreeBSD: stable/11/sys/dev/usb/usb_device.h 305733 2016-09-12 10:14:30Z 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.

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

157 uint8_t bInterfaceNumber;
158 uint8_t bAlternateSetting;
159 uint8_t bConfigurationValue;
160 usb_error_t err;
161};
162
163/*
164 * The scratch area for USB devices. Access to this structure is
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.

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

157 uint8_t bInterfaceNumber;
158 uint8_t bAlternateSetting;
159 uint8_t bConfigurationValue;
160 usb_error_t err;
161};
162
163/*
164 * The scratch area for USB devices. Access to this structure is
165 * protected by the enumeration SX lock.
165 * protected by the control SX lock.
166 */
167union usb_device_scratch {
168 struct usb_hw_ep_scratch hw_ep_scratch[1];
169 struct usb_temp_setup temp_setup[1];
170 struct {
171 struct usb_xfer dummy;
172 struct usb_setup_params parm;
173 } xfer_setup[1];

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

178 * The following structure defines an USB device. There exists one of
179 * these structures for every USB device.
180 */
181struct usb_device {
182 /* generic clear stall message */
183 struct usb_udev_msg cs_msg[2];
184 struct sx enum_sx;
185 struct sx sr_sx;
166 */
167union usb_device_scratch {
168 struct usb_hw_ep_scratch hw_ep_scratch[1];
169 struct usb_temp_setup temp_setup[1];
170 struct {
171 struct usb_xfer dummy;
172 struct usb_setup_params parm;
173 } xfer_setup[1];

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

178 * The following structure defines an USB device. There exists one of
179 * these structures for every USB device.
180 */
181struct usb_device {
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 sx ctrl_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
192 struct usb_interface ifaces[USB_IFACE_MAX];
193#endif

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

315
316uint8_t usbd_enum_lock(struct usb_device *);
317#if USB_HAVE_UGEN
318uint8_t usbd_enum_lock_sig(struct usb_device *);
319#endif
320void usbd_enum_unlock(struct usb_device *);
321void usbd_sr_lock(struct usb_device *);
322void usbd_sr_unlock(struct usb_device *);
187 struct mtx device_mtx;
188 struct cv ctrlreq_cv;
189 struct cv ref_cv;
190#if (USB_HAVE_FIXED_IFACE == 0)
191 struct usb_interface *ifaces;
192#else
193 struct usb_interface ifaces[USB_IFACE_MAX];
194#endif

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

316
317uint8_t usbd_enum_lock(struct usb_device *);
318#if USB_HAVE_UGEN
319uint8_t usbd_enum_lock_sig(struct usb_device *);
320#endif
321void usbd_enum_unlock(struct usb_device *);
322void usbd_sr_lock(struct usb_device *);
323void usbd_sr_unlock(struct usb_device *);
324uint8_t usbd_ctrl_lock(struct usb_device *);
325void usbd_ctrl_unlock(struct usb_device *);
323uint8_t usbd_enum_is_locked(struct usb_device *);
324
325#if USB_HAVE_TT_SUPPORT
326void uhub_tt_buffer_reset_async_locked(struct usb_device *, struct usb_endpoint *);
327#endif
328
329uint8_t uhub_count_active_host_ports(struct usb_device *, enum usb_dev_speed);
330
331#endif /* _USB_DEVICE_H_ */
326uint8_t usbd_enum_is_locked(struct usb_device *);
327
328#if USB_HAVE_TT_SUPPORT
329void uhub_tt_buffer_reset_async_locked(struct usb_device *, struct usb_endpoint *);
330#endif
331
332uint8_t uhub_count_active_host_ports(struct usb_device *, enum usb_dev_speed);
333
334#endif /* _USB_DEVICE_H_ */