Lines Matching refs:bos
589 struct usb_bos_descriptor *bos, size_t desc_size)
596 itr = (void *)bos + sizeof(*bos);
597 top = itr + desc_size - sizeof(*bos);
605 (int)(itr - (void *)bos), top - itr);
617 (int)(itr - (void *)bos),
635 cap_size, (int)(itr - (void *)bos));
663 struct usb_bos_descriptor *bos;
666 bos = kmalloc(alloc_size, GFP_KERNEL);
667 if (bos == NULL)
669 result = usb_get_descriptor(usb_dev, USB_DT_BOS, 0, bos, desc_size);
675 desc_size = le16_to_cpu(bos->wTotalLength);
677 kfree(bos);
679 bos = kmalloc(alloc_size, GFP_KERNEL);
680 if (bos == NULL)
683 result = usb_get_descriptor(usb_dev, USB_DT_BOS, 0, bos, desc_size);
689 if (result < sizeof(*bos)
690 || le16_to_cpu(bos->wTotalLength) != desc_size) {
696 result = wusb_dev_bos_grok(usb_dev, wusb_dev, bos, result);
699 wusb_dev->bos = bos;
704 kfree(bos);
711 kfree(wusb_dev->bos);