Changeset 59700 in vbox for trunk/include/VBox
- Timestamp:
- Feb 16, 2016 12:18:30 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vusb.h
r59687 r59700 647 647 } VUSBIROOTHUBPORT; 648 648 /** VUSBIROOTHUBPORT interface ID. */ 649 #define VUSBIROOTHUBPORT_IID " e38e2978-7aa2-4860-94b6-9ef4a066d8a0"649 #define VUSBIROOTHUBPORT_IID "79a31188-043d-432c-82ac-9485c9ab9a49" 650 650 651 651 /** Pointer to a VUSB RootHub connector interface. */ … … 658 658 typedef struct VUSBIROOTHUBCONNECTOR 659 659 { 660 /** 661 * Sets the URB parameters for the caller. 662 * 663 * @returns VBox status code. 664 * @param pInterface Pointer to this struct. 665 * @param cbHci Size of the data private to the HCI for each URB when allocated. 666 * @param cbHciTd Size of one transfer descriptor. The number of transfer descriptors 667 * is given VUSBIROOTHUBCONNECTOR::pfnNewUrb for each URB to calculate the 668 * final amount of memory required for the TDs. 669 * 670 * @note This must be called before starting to allocate any URB or otherwise there will be no 671 * data available for the HCI. 672 */ 673 DECLR3CALLBACKMEMBER(int, pfnSetUrbParams, (PVUSBIROOTHUBCONNECTOR pInterface, size_t cbHci, size_t cbHciTd)); 674 660 675 /** 661 676 * Allocates a new URB for a transfer. … … 763 778 } VUSBIROOTHUBCONNECTOR; 764 779 /** VUSBIROOTHUBCONNECTOR interface ID. */ 765 #define VUSBIROOTHUBCONNECTOR_IID " dba1a54e-9708-4702-8d7f-b9ac94dc17e6"780 #define VUSBIROOTHUBCONNECTOR_IID "481d7f23-f180-4fde-b636-094253eaf537" 766 781 767 782 768 783 #ifdef IN_RING3 784 /** @copydoc VUSBIROOTHUBCONNECTOR::pfnSetUrbParams */ 785 DECLINLINE(int) VUSBIRhSetUrbParams(PVUSBIROOTHUBCONNECTOR pInterface, size_t cbHci, size_t cbHciTd) 786 { 787 return pInterface->pfnSetUrbParams(pInterface, cbHci, cbHciTd); 788 } 789 769 790 /** @copydoc VUSBIROOTHUBCONNECTOR::pfnNewUrb */ 770 791 DECLINLINE(PVUSBURB) VUSBIRhNewUrb(PVUSBIROOTHUBCONNECTOR pInterface, uint32_t DstAddress, VUSBXFERTYPE enmType, … … 927 948 } VUSBIDEVICE; 928 949 /** VUSBIDEVICE interface ID. */ 929 #define VUSBIDEVICE_IID " f3facb2b-edd3-4b5b-b07e-2cc4d52a471e"950 #define VUSBIDEVICE_IID "79a31188-043d-432c-82ac-9485c9ab9a49" 930 951 931 952 … … 1090 1111 typedef const VUSBURBISOCPKT *PCVUSBURBISOCPKT; 1091 1112 1113 /** Private controller emulation specific data for the associated USB request descriptor. */ 1114 typedef struct VUSBURBHCIINT *PVUSBURBHCI; 1115 /** Private controller emulation specific TD data. */ 1116 typedef struct VUSBURBHCITDINT *PVUSBURBHCITD; 1117 1092 1118 /** 1093 1119 * Asynchronous USB request descriptor … … 1129 1155 * This may be NULL if the destination address is invalid. */ 1130 1156 struct VUSBDEV *pDev; 1131 /** S epcific to the pfnFree function. */1157 /** Specific to the pfnFree function. */ 1132 1158 void *pvFreeCtx; 1133 1159 /** … … 1140 1166 /** The allocated data length. */ 1141 1167 uint32_t cbDataAllocated; 1142 /** The allocated TD length. */1143 uint32_t cTdsAllocated;1168 /** Opaque data holder when this is a read-ahead URB. */ 1169 void *pvReadAhead; 1144 1170 } VUsb; 1145 1171 1146 /** The host controller data. */ 1147 struct VUSBURBHCI 1148 { 1149 /** The endpoint descriptor address. */ 1150 RTGCPHYS32 EdAddr; 1151 /** Number of Tds in the array. */ 1152 uint32_t cTds; 1153 /** Pointer to an array of TD info items.*/ 1154 struct VUSBURBHCITD 1155 { 1156 /** Type of TD (private) */ 1157 uint32_t TdType; 1158 /** The address of the */ 1159 RTGCPHYS32 TdAddr; 1160 /** A copy of the TD. */ 1161 uint32_t TdCopy[16]; 1162 } *paTds; 1163 /** URB chain pointer. */ 1164 PVUSBURB pNext; 1165 /** When this URB was created. 1166 * (Used for isochronous frames and for logging.) */ 1167 uint32_t u32FrameNo; 1168 /** Flag indicating that the TDs have been unlinked. */ 1169 bool fUnlinked; 1170 } Hci; 1172 /** Private host controller data associated with this URB. */ 1173 PVUSBURBHCI pHci; 1174 /** Pointer to the host controller transfer descriptor array. */ 1175 PVUSBURBHCITD paTds; 1171 1176 1172 1177 /** The device data. */ … … 1179 1184 } Dev; 1180 1185 1181 #ifndef RDESKTOP1182 /** The USB device instance this belongs to.1183 * This is NULL if the device address is invalid, in which case this belongs to the hub. */1184 PPDMUSBINS pUsbIns;1185 #endif1186 1186 /** The device address. 1187 1187 * This is set at allocation time. */ … … 1193 1193 uint8_t EndPt; 1194 1194 /** The transfer type. 1195 * IN: Must be set before submitting the URB. */1195 * IN: Set at allocation time. */ 1196 1196 VUSBXFERTYPE enmType; 1197 1197 /** The transfer direction. 1198 * IN: Must be set before submitting the URB. */1198 * IN: Set at allocation time. */ 1199 1199 VUSBDIRECTION enmDir; 1200 1200 /** Indicates whether it is OK to receive/send less data than requested.
Note:
See TracChangeset
for help on using the changeset viewer.