1/* $FreeBSD: head/sys/dev/usb/controller/dwc_otg.c 246123 2013-01-30 15:46:26Z hselasky $ */ |
2/*- 3 * Copyright (c) 2012 Hans Petter Selasky. All rights reserved. 4 * Copyright (c) 2010-2011 Aleksandr Rybalko. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 3476 unchanged lines hidden (view full) --- 3486 .bDescriptorType = UDESC_HUB, 3487 .bNbrPorts = 1, 3488 HSETW(.wHubCharacteristics, (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL)), 3489 .bPwrOn2PwrGood = 50, 3490 .bHubContrCurrent = 0, 3491 .DeviceRemovable = {0}, /* port is removable */ 3492}; 3493 |
3494#define STRING_VENDOR \ 3495 'D', 0, 'W', 0, 'C', 0, 'O', 0, 'T', 0, 'G', 0 3496 3497#define STRING_PRODUCT \ 3498 'O', 0, 'T', 0, 'G', 0, ' ', 0, 'R', 0, \ 3499 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \ 3500 'U', 0, 'B', 0, 3501 |
3502USB_MAKE_STRING_DESC(STRING_VENDOR, dwc_otg_vendor); 3503USB_MAKE_STRING_DESC(STRING_PRODUCT, dwc_otg_product); 3504 3505static usb_error_t 3506dwc_otg_roothub_exec(struct usb_device *udev, 3507 struct usb_device_request *req, const void **pptr, uint16_t *plength) 3508{ 3509 struct dwc_otg_softc *sc = DWC_OTG_BUS2SC(udev->bus); --- 185 unchanged lines hidden (view full) --- 3695 goto tr_stalled; 3696 } 3697 len = sizeof(dwc_otg_confd); 3698 ptr = (const void *)&dwc_otg_confd; 3699 goto tr_valid; 3700 case UDESC_STRING: 3701 switch (value & 0xff) { 3702 case 0: /* Language table */ |
3703 len = sizeof(usb_string_lang_en); 3704 ptr = (const void *)&usb_string_lang_en; |
3705 goto tr_valid; 3706 3707 case 1: /* Vendor */ 3708 len = sizeof(dwc_otg_vendor); 3709 ptr = (const void *)&dwc_otg_vendor; 3710 goto tr_valid; 3711 3712 case 2: /* Product */ --- 506 unchanged lines hidden --- |