Deleted Added
sdiff udiff text old ( 246122 ) new ( 246123 )
full compact
1/* $FreeBSD: head/sys/dev/usb/controller/musb_otg.c 246123 2013-01-30 15:46:26Z hselasky $ */
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 2196 unchanged lines hidden (view full) ---

2206 .bDescriptorType = UDESC_HUB,
2207 .bNbrPorts = 1,
2208 HSETW(.wHubCharacteristics, (UHD_PWR_NO_SWITCH | UHD_OC_INDIVIDUAL)),
2209 .bPwrOn2PwrGood = 50,
2210 .bHubContrCurrent = 0,
2211 .DeviceRemovable = {0}, /* port is removable */
2212};
2213
2214#define STRING_VENDOR \
2215 'M', 0, 'e', 0, 'n', 0, 't', 0, 'o', 0, 'r', 0, ' ', 0, \
2216 'G', 0, 'r', 0, 'a', 0, 'p', 0, 'h', 0, 'i', 0, 'c', 0, 's', 0
2217
2218#define STRING_PRODUCT \
2219 'O', 0, 'T', 0, 'G', 0, ' ', 0, 'R', 0, \
2220 'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
2221 'U', 0, 'B', 0,
2222
2223USB_MAKE_STRING_DESC(STRING_VENDOR, musbotg_vendor);
2224USB_MAKE_STRING_DESC(STRING_PRODUCT, musbotg_product);
2225
2226static usb_error_t
2227musbotg_roothub_exec(struct usb_device *udev,
2228 struct usb_device_request *req, const void **pptr, uint16_t *plength)
2229{
2230 struct musbotg_softc *sc = MUSBOTG_BUS2SC(udev->bus);

--- 185 unchanged lines hidden (view full) ---

2416 goto tr_stalled;
2417 }
2418 len = sizeof(musbotg_confd);
2419 ptr = (const void *)&musbotg_confd;
2420 goto tr_valid;
2421 case UDESC_STRING:
2422 switch (value & 0xff) {
2423 case 0: /* Language table */
2424 len = sizeof(usb_string_lang_en);
2425 ptr = (const void *)&usb_string_lang_en;
2426 goto tr_valid;
2427
2428 case 1: /* Vendor */
2429 len = sizeof(musbotg_vendor);
2430 ptr = (const void *)&musbotg_vendor;
2431 goto tr_valid;
2432
2433 case 2: /* Product */

--- 376 unchanged lines hidden ---