Lines Matching refs:head
380 struct usb_descriptor_header *head; in usb_parse_config() local
390 head = (struct usb_descriptor_header *) &buffer[0]; in usb_parse_config()
391 if (head->bDescriptorType != USB_DT_CONFIG) { in usb_parse_config()
393 head->bDescriptorType); in usb_parse_config()
396 if (head->bLength != USB_DT_CONFIG_SIZE) { in usb_parse_config()
397 printf("ERROR: Invalid USB CFG length (%d)\n", head->bLength); in usb_parse_config()
400 memcpy(&dev->config, head, USB_DT_CONFIG_SIZE); in usb_parse_config()
406 head = (struct usb_descriptor_header *) &buffer[index]; in usb_parse_config()
407 while (index + 1 < dev->config.desc.wTotalLength && head->bLength) { in usb_parse_config()
408 switch (head->bDescriptorType) { in usb_parse_config()
410 if (head->bLength != USB_DT_INTERFACE_SIZE) { in usb_parse_config()
412 head->bLength); in usb_parse_config()
421 head)->bInterfaceNumber != curr_if_num) { in usb_parse_config()
431 memcpy(if_desc, head, in usb_parse_config()
446 if (head->bLength != USB_DT_ENDPOINT_SIZE) { in usb_parse_config()
448 head->bLength); in usb_parse_config()
469 memcpy(&if_desc->ep_desc[epno], head, in usb_parse_config()
483 if (head->bLength != USB_DT_SS_EP_COMP_SIZE) { in usb_parse_config()
485 head->bLength); in usb_parse_config()
498 memcpy(&if_desc->ss_ep_comp_desc[epno], head, in usb_parse_config()
502 if (head->bLength == 0) in usb_parse_config()
506 head->bDescriptorType); in usb_parse_config()
510 unsigned char *ch = (unsigned char *)head; in usb_parse_config()
513 for (i = 0; i < head->bLength; i++) in usb_parse_config()
520 index += head->bLength; in usb_parse_config()
521 head = (struct usb_descriptor_header *)&buffer[index]; in usb_parse_config()