Changeset 58165 in vbox for trunk/src/VBox/Devices/USB
- Timestamp:
- Oct 9, 2015 9:46:40 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 103273
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp
r57990 r58165 162 162 /** The endpoint interval. (interrupt) */ 163 163 uint8_t u8Interval; 164 /** Full-speed device indicator (isochronous pipes only). */ 165 bool fIsFullSpeed; 164 166 /** The max packet size. */ 165 167 uint16_t u16MaxPacketSize; … … 732 734 */ 733 735 int rc = VINF_SUCCESS; 736 bool fFullSpeed; 737 UInt32 u32UsecInFrame; 734 738 UInt8 cPipes; 735 739 IOReturn irc = (*pIf->ppIfI)->GetNumEndpoints(pIf->ppIfI, &cPipes); … … 746 750 pIf->cPipes = cPipes + 1; 747 751 752 /* Find out if this is a full-speed interface (needed for isochronous support). */ 753 irc = (*pIf->ppIfI)->GetFrameListTime(pIf->ppIfI, &u32UsecInFrame); 754 if (irc != kIOReturnSuccess) 755 { 756 pIf->cPipes = 0; 757 if (irc == kIOReturnNoDevice) 758 rc = VERR_VUSB_DEVICE_NOT_ATTACHED; 759 else 760 rc = RTErrConvertFromDarwin(irc); 761 return rc; 762 } 763 fFullSpeed = u32UsecInFrame == kUSBFullSpeedMicrosecondsInFrame; 764 748 765 /* 749 766 * Get the properties of each pipe. … … 752 769 { 753 770 pIf->aPipes[i].u8PipeRef = i; 771 pIf->aPipes[i].fIsFullSpeed = fFullSpeed; 754 772 pIf->aPipes[i].u64NextFrameNo = 0; 755 773 irc = (*pIf->ppIfI)->GetPipeProperties(pIf->ppIfI, i, … … 1742 1760 pUrb->pszDesc, pPipe->u64NextFrameNo, FrameNo, pUrb->cIsocPkts, j, u8PipeRef)); 1743 1761 if (irc == kIOReturnSuccess) 1744 pPipe->u64NextFrameNo = FrameNo + pUrb->cIsocPkts; 1762 { 1763 if (pPipe->fIsFullSpeed) 1764 pPipe->u64NextFrameNo = FrameNo + pUrb->cIsocPkts; 1765 else 1766 pPipe->u64NextFrameNo = FrameNo + 1; 1767 } 1745 1768 break; 1746 1769 }
Note:
See TracChangeset
for help on using the changeset viewer.