Changeset 66989 in vbox for trunk/src/VBox
- Timestamp:
- May 19, 2017 2:42:59 PM (8 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Input/UsbKbd.cpp
r65919 r66989 346 346 }, 347 347 NULL, /* pvMore */ 348 NULL, /* pvClass */ 349 0, /* cbClass */ 348 350 &g_aUsbHidInterfaces[0], 349 351 NULL /* pvOriginal */ -
trunk/src/VBox/Devices/Input/UsbMouse.cpp
r65919 r66989 858 858 }, 859 859 NULL, /* pvMore */ 860 NULL, /* pvClass */ 861 0, /* cbClass */ 860 862 &g_aUsbHidMInterfaces[0], 861 863 NULL /* pvOriginal */ … … 875 877 }, 876 878 NULL, /* pvMore */ 879 NULL, /* pvClass */ 880 0, /* cbClass */ 877 881 &g_aUsbHidTInterfaces[0], 878 882 NULL /* pvOriginal */ … … 892 896 }, 893 897 NULL, /* pvMore */ 898 NULL, /* pvClass */ 899 0, /* cbClass */ 894 900 &g_aUsbHidMTInterfaces[0], 895 901 NULL /* pvOriginal */ -
trunk/src/VBox/Devices/Storage/UsbMsd.cpp
r65921 r66989 482 482 }, 483 483 NULL, /* pvMore */ 484 NULL, /* pvClass */ 485 0, /* cbClass */ 484 486 &g_aUsbMsdInterfacesFS[0], 485 487 NULL /* pvOriginal */ … … 499 501 }, 500 502 NULL, /* pvMore */ 503 NULL, /* pvClass */ 504 0, /* cbClass */ 501 505 &g_aUsbMsdInterfacesHS[0], 502 506 NULL /* pvOriginal */ … … 516 520 }, 517 521 NULL, /* pvMore */ 522 NULL, /* pvClass */ 523 0, /* cbClass */ 518 524 &g_aUsbMsdInterfacesSS[0], 519 525 NULL /* pvOriginal */ -
trunk/src/VBox/Devices/USB/USBProxyDevice.cpp
r66913 r66989 319 319 } 320 320 321 /* Given the pointer to a n interface orendpoint descriptor, find any following321 /* Given the pointer to a configuration/interface/endpoint descriptor, find any following 322 322 * non-standard (vendor or class) descriptors. 323 323 */ … … 327 327 uint8_t type; 328 328 329 Assert(*(this_desc + 1) == VUSB_DT_INTERFACE || *(this_desc + 1) == VUSB_DT_ENDPOINT );329 Assert(*(this_desc + 1) == VUSB_DT_INTERFACE || *(this_desc + 1) == VUSB_DT_ENDPOINT || *(this_desc + 1) == VUSB_DT_CONFIG); 330 330 buf = this_desc; 331 331 332 /* Skip the current interface/endpoint descriptor. */332 /* Skip the current configuration/interface/endpoint descriptor. */ 333 333 buf += *(uint8_t *)buf; 334 334 … … 468 468 size_t cbIface; 469 469 uint32_t i, x; 470 uint8_t *tmp, *end; 470 471 471 472 descs = GetStdDescSync(pProxyDev, VUSB_DT_CONFIG, idx, 0, VUSB_DT_CONFIG_MIN_LEN); … … 514 515 out->Core.bmAttributes = cfg->bmAttributes; 515 516 out->Core.MaxPower = cfg->MaxPower; 517 518 tmp = (uint8_t *)out->pvOriginal; 519 end = tmp + tot_len; 520 521 /* Point to additional configuration descriptor bytes, if any. */ 522 AssertCompile(sizeof(out->Core) == VUSB_DT_CONFIG_MIN_LEN); 523 if (out->Core.bLength - VUSB_DT_CONFIG_MIN_LEN > 0) 524 out->pvMore = tmp + VUSB_DT_CONFIG_MIN_LEN; 525 else 526 out->pvMore = NULL; 527 528 /* Typically there might be an interface association descriptor here. */ 529 out->pvClass = collect_stray_bits(tmp, end, &out->cbClass); 516 530 517 531 for(i=0; i < 4; i++) -
trunk/src/VBox/Devices/USB/VUSBDevice.cpp
r65976 r66989 714 714 VUSBDESCCONFIG CfgDesc; 715 715 memcpy(&CfgDesc, pCfgDesc, VUSB_DT_CONFIG_MIN_LEN); 716 uint32_t cbTotal = pCfgDesc->Core.bLength; 716 uint32_t cbTotal = 0; 717 cbTotal += pCfgDesc->Core.bLength; 718 cbTotal += pCfgDesc->cbClass; 717 719 for (unsigned i = 0; i < pCfgDesc->Core.bNumInterfaces; i++) 718 720 { … … 738 740 COPY_DATA(pbBuf, cbLeft, &CfgDesc, VUSB_DT_CONFIG_MIN_LEN); 739 741 COPY_DATA(pbBuf, cbLeft, pCfgDesc->pvMore, pCfgDesc->Core.bLength - VUSB_DT_CONFIG_MIN_LEN); 742 COPY_DATA(pbBuf, cbLeft, pCfgDesc->pvClass, pCfgDesc->cbClass); 740 743 741 744 /*
Note:
See TracChangeset
for help on using the changeset viewer.