Home | History | Annotate | Download | only in usb

Lines Matching defs:cdp

689 	usb_config_descriptor_t cd, *cdp;
746 cdp = kmem_alloc(len, KM_SLEEP);
750 err = usbd_get_desc(dev, UDESC_CONFIG, index, len, cdp);
759 if (cdp->bDescriptorType != UDESC_CONFIG) {
760 DPRINTF("bad desc %jd", cdp->bDescriptorType, 0, 0, 0);
764 if (UGETW(cdp->wTotalLength) != UGETW(cd.wTotalLength)) {
765 DPRINTF("bad len %jd", UGETW(cdp->wTotalLength), 0, 0, 0);
818 selfpowered = !!(cdp->bmAttributes & UC_SELF_POWERED);
821 dev->ud_addr, cdp->bConfigurationValue, cdp->bmAttributes,
823 DPRINTF("max power=%jd", cdp->bMaxPower * 2, 0, 0, 0);
827 if ((cdp->bmAttributes & UC_SELF_POWERED) && !selfpowered) {
832 cdp->bConfigurationValue);
844 power = cdp->bMaxPower * 2;
853 cdp->bConfigurationValue,
862 DPRINTF("set config %jd", cdp->bConfigurationValue, 0, 0, 0);
863 err = usbd_set_config(dev, cdp->bConfigurationValue);
866 cdp->bConfigurationValue, err, 0, 0);
873 nifc = cdp->bNumInterface;
881 DPRINTFN(5, "dev=%#jx cdesc=%#jx", (uintptr_t)dev, (uintptr_t)cdp,
883 dev->ud_cdesc = cdp;
884 dev->ud_config = cdp->bConfigurationValue;
911 kmem_free(cdp, len);