Deleted Added
full compact
usbd_var.h (186507) usbd_var.h (189488)
1/*-
2 * Copyright (c) 2003
3 * Bill Paul <wpaul@windriver.com>. 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

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
1/*-
2 * Copyright (c) 2003
3 * Bill Paul <wpaul@windriver.com>. 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

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

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/compat/ndis/usbd_var.h 186507 2008-12-27 08:03:32Z weongyo $
32 * $FreeBSD: head/sys/compat/ndis/usbd_var.h 189488 2009-03-07 07:26:22Z weongyo $
33 */
34
35#ifndef _USBD_VAR_H_
36#define _USBD_VAR_H_
37
38#define IOCTL_INTERNAL_USB_SUBMIT_URB 0x00220003
39
40#define URB_FUNCTION_SELECT_CONFIGURATION 0x0000
33 */
34
35#ifndef _USBD_VAR_H_
36#define _USBD_VAR_H_
37
38#define IOCTL_INTERNAL_USB_SUBMIT_URB 0x00220003
39
40#define URB_FUNCTION_SELECT_CONFIGURATION 0x0000
41#define URB_FUNCTION_ABORT_PIPE 0x0002
41#define URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER 0x0009
42#define URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE 0x000B
43#define URB_FUNCTION_VENDOR_DEVICE 0x0017
44#define URB_FUNCTION_VENDOR_INTERFACE 0x0018
45#define URB_FUNCTION_VENDOR_ENDPOINT 0x0019
46#define URB_FUNCTION_CLASS_DEVICE 0x001A
47#define URB_FUNCTION_CLASS_INTERFACE 0x001B
48#define URB_FUNCTION_CLASS_ENDPOINT 0x001C

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

114 uint8_t uii_reserved;
115 void *uii_handle;
116 uint32_t uii_numeps;
117 struct usbd_pipe_information uii_pipes[1];
118};
119
120struct usbd_urb_select_interface {
121 struct usbd_urb_header usi_hdr;
42#define URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER 0x0009
43#define URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE 0x000B
44#define URB_FUNCTION_VENDOR_DEVICE 0x0017
45#define URB_FUNCTION_VENDOR_INTERFACE 0x0018
46#define URB_FUNCTION_VENDOR_ENDPOINT 0x0019
47#define URB_FUNCTION_CLASS_DEVICE 0x001A
48#define URB_FUNCTION_CLASS_INTERFACE 0x001B
49#define URB_FUNCTION_CLASS_ENDPOINT 0x001C

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

115 uint8_t uii_reserved;
116 void *uii_handle;
117 uint32_t uii_numeps;
118 struct usbd_pipe_information uii_pipes[1];
119};
120
121struct usbd_urb_select_interface {
122 struct usbd_urb_header usi_hdr;
122 void *usi_handle;
123 struct usbd_interface_information uusi_intf;
123 void *usi_handle;
124 struct usbd_interface_information uusi_intf;
124};
125
126struct usbd_urb_select_configuration {
127 struct usbd_urb_header usc_hdr;
125};
126
127struct usbd_urb_select_configuration {
128 struct usbd_urb_header usc_hdr;
128 usb_config_descriptor_t *usc_conf;
129 void *usc_handle;
130 struct usbd_interface_information usc_intf;
129 usb_config_descriptor_t *usc_conf;
130 void *usc_handle;
131 struct usbd_interface_information usc_intf;
131};
132
132};
133
134struct usbd_urb_pipe_request {
135 struct usbd_urb_header upr_hdr;
136 usb_endpoint_descriptor_t *upr_handle;
137};
138
133struct usbd_hcd_area {
134 void *reserved8[8];
135};
136
137struct usbd_urb_bulk_or_intr_transfer {
138 struct usbd_urb_header ubi_hdr;
139struct usbd_hcd_area {
140 void *reserved8[8];
141};
142
143struct usbd_urb_bulk_or_intr_transfer {
144 struct usbd_urb_header ubi_hdr;
139 usb_endpoint_descriptor_t *ubi_epdesc;
140 uint32_t ubi_trans_flags;
145 usb_endpoint_descriptor_t *ubi_epdesc;
146 uint32_t ubi_trans_flags;
141#define USBD_SHORT_TRANSFER_OK 0x00000002
147#define USBD_SHORT_TRANSFER_OK 0x00000002
142 uint32_t ubi_trans_buflen;
143 void *ubi_trans_buf;
144 struct mdl *ubi_mdl;
145 union usbd_urb *ubi_urblink;
146 struct usbd_hcd_area ubi_hca;
148 uint32_t ubi_trans_buflen;
149 void *ubi_trans_buf;
150 struct mdl *ubi_mdl;
151 union usbd_urb *ubi_urblink;
152 struct usbd_hcd_area ubi_hca;
147};
148
149struct usbd_urb_control_descriptor_request {
150 struct usbd_urb_header ucd_hdr;
153};
154
155struct usbd_urb_control_descriptor_request {
156 struct usbd_urb_header ucd_hdr;
151 void *ucd_reserved0;
152 uint32_t ucd_reserved1;
153 uint32_t ucd_trans_buflen;
154 void *ucd_trans_buf;
155 struct mdl *ucd_mdl;
156 union nt_urb *ucd_urblink;
157 struct usbd_hcd_area ucd_hca;
158 uint16_t ucd_reserved2;
159 uint8_t ucd_idx;
160 uint8_t ucd_desctype;
161 uint16_t ucd_langid;
162 uint16_t ucd_reserved3;
157 void *ucd_reserved0;
158 uint32_t ucd_reserved1;
159 uint32_t ucd_trans_buflen;
160 void *ucd_trans_buf;
161 struct mdl *ucd_mdl;
162 union nt_urb *ucd_urblink;
163 struct usbd_hcd_area ucd_hca;
164 uint16_t ucd_reserved2;
165 uint8_t ucd_idx;
166 uint8_t ucd_desctype;
167 uint16_t ucd_langid;
168 uint16_t ucd_reserved3;
163};
164
165struct usbd_urb_vendor_or_class_request {
166 struct usbd_urb_header uvc_hdr;
169};
170
171struct usbd_urb_vendor_or_class_request {
172 struct usbd_urb_header uvc_hdr;
167 void *uvc_reserved0;
168 uint32_t uvc_trans_flags;
173 void *uvc_reserved0;
174 uint32_t uvc_trans_flags;
169#define USBD_TRANSFER_DIRECTION_IN 1
175#define USBD_TRANSFER_DIRECTION_IN 1
170 uint32_t uvc_trans_buflen;
171 void *uvc_trans_buf;
172 struct mdl *uvc_mdl;
173 union nt_urb *uvc_urblink;
176 uint32_t uvc_trans_buflen;
177 void *uvc_trans_buf;
178 struct mdl *uvc_mdl;
179 union nt_urb *uvc_urblink;
174 struct usbd_hcd_area uvc_hca;
180 struct usbd_hcd_area uvc_hca;
175 uint8_t uvc_reserved1;
176 uint8_t uvc_req;
177 uint16_t uvc_value;
178 uint16_t uvc_idx;
179 uint16_t uvc_reserved2;
181 uint8_t uvc_reserved1;
182 uint8_t uvc_req;
183 uint16_t uvc_value;
184 uint16_t uvc_idx;
185 uint16_t uvc_reserved2;
180};
181
182struct usbd_interface_list_entry {
183 usb_interface_descriptor_t *uil_intfdesc;
184 struct usbd_interface_information *uil_intf;
185};
186
187union usbd_urb {
188 struct usbd_urb_header uu_hdr;
186};
187
188struct usbd_interface_list_entry {
189 usb_interface_descriptor_t *uil_intfdesc;
190 struct usbd_interface_information *uil_intf;
191};
192
193union usbd_urb {
194 struct usbd_urb_header uu_hdr;
189 struct usbd_urb_select_configuration uu_selconf;
190 struct usbd_urb_bulk_or_intr_transfer uu_bulkintr;
191 struct usbd_urb_control_descriptor_request uu_ctldesc;
192 struct usbd_urb_vendor_or_class_request uu_vcreq;
195 struct usbd_urb_select_configuration uu_selconf;
196 struct usbd_urb_bulk_or_intr_transfer uu_bulkintr;
197 struct usbd_urb_control_descriptor_request uu_ctldesc;
198 struct usbd_urb_vendor_or_class_request uu_vcreq;
199 struct usbd_urb_pipe_request uu_pipe;
193};
194
195#define USBD_URB_STATUS(urb) ((urb)->uu_hdr.uuh_status)
196
197#define USBDI_VERSION 0x00000500
198#define USB_VER_1_1 0x00000110
199#define USB_VER_2_0 0x00000200
200
201struct usbd_version_info {
202 uint32_t uvi_usbdi_vers;
203 uint32_t uvi_supported_vers;
204};
205
206typedef struct usbd_version_info usbd_version_info;
207
200};
201
202#define USBD_URB_STATUS(urb) ((urb)->uu_hdr.uuh_status)
203
204#define USBDI_VERSION 0x00000500
205#define USB_VER_1_1 0x00000110
206#define USB_VER_2_0 0x00000200
207
208struct usbd_version_info {
209 uint32_t uvi_usbdi_vers;
210 uint32_t uvi_supported_vers;
211};
212
213typedef struct usbd_version_info usbd_version_info;
214
208/* used for IRP cancel. */
209struct ndisusb_cancel {
210 device_t dev;
211 usbd_xfer_handle xfer;
212 struct usb_task task;
213};
214
215extern image_patch_table usbd_functbl[];
216
217__BEGIN_DECLS
218extern int usbd_libinit(void);
219extern int usbd_libfini(void);
220__END_DECLS
221
222#endif /* _USBD_VAR_H_ */
215extern image_patch_table usbd_functbl[];
216
217__BEGIN_DECLS
218extern int usbd_libinit(void);
219extern int usbd_libfini(void);
220__END_DECLS
221
222#endif /* _USBD_VAR_H_ */