Lines Matching refs:desc

79 	uint8_t *desc;  in usb_desc_foreach()  local
88 desc = (uint8_t *)_desc; in usb_desc_foreach()
91 if (desc == NULL) in usb_desc_foreach()
92 desc = start; in usb_desc_foreach()
94 desc = desc + desc[0]; in usb_desc_foreach()
97 if ((desc < start) || (desc >= end)) in usb_desc_foreach()
101 desc_next = desc + desc[0]; in usb_desc_foreach()
106 if (desc[0] < 3) in usb_desc_foreach()
110 return ((struct usb_descriptor *)desc); in usb_desc_foreach()
132 id = (struct usb_interface_descriptor *)ps->desc; in usb_idesc_foreach()
162 if (ps->desc == NULL) { in usb_idesc_foreach()
182 ps->desc = (struct usb_descriptor *)id; in usb_idesc_foreach()
201 struct usb_descriptor *desc; in usb_edesc_foreach() local
203 desc = ((struct usb_descriptor *)ped); in usb_edesc_foreach()
205 while ((desc = usb_desc_foreach(cd, desc))) { in usb_edesc_foreach()
206 if (desc->bDescriptorType == UDESC_INTERFACE) { in usb_edesc_foreach()
209 if (desc->bDescriptorType == UDESC_ENDPOINT) { in usb_edesc_foreach()
210 if (desc->bLength < sizeof(*ped)) { in usb_edesc_foreach()
214 return ((struct usb_endpoint_descriptor *)desc); in usb_edesc_foreach()
236 struct usb_descriptor *desc; in usb_ed_comp_foreach() local
238 desc = ((struct usb_descriptor *)ped); in usb_ed_comp_foreach()
240 while ((desc = usb_desc_foreach(cd, desc))) { in usb_ed_comp_foreach()
241 if (desc->bDescriptorType == UDESC_INTERFACE) in usb_ed_comp_foreach()
243 if (desc->bDescriptorType == UDESC_ENDPOINT) in usb_ed_comp_foreach()
245 if (desc->bDescriptorType == UDESC_ENDPOINT_SS_COMP) { in usb_ed_comp_foreach()
246 if (desc->bLength < sizeof(*ped)) { in usb_ed_comp_foreach()
250 return ((struct usb_endpoint_ss_comp_descriptor *)desc); in usb_ed_comp_foreach()
265 struct usb_descriptor *desc = NULL; in usbd_get_no_descriptors() local
268 while ((desc = usb_desc_foreach(cd, desc))) { in usbd_get_no_descriptors()
269 if (desc->bDescriptorType == type) { in usbd_get_no_descriptors()
290 struct usb_descriptor *desc; in usbd_get_no_alts() local
304 desc = NULL; in usbd_get_no_alts()
305 while ((desc = usb_desc_foreach(cd, desc))) { in usbd_get_no_alts()
306 if ((desc->bDescriptorType == UDESC_INTERFACE) && in usbd_get_no_alts()
307 (desc->bLength >= sizeof(*id))) { in usbd_get_no_alts()
308 id = (struct usb_interface_descriptor *)desc; in usbd_get_no_alts()