Changeset 91737 in vbox for trunk/src/VBox/Devices/USB
- Timestamp:
- Oct 14, 2021 6:41:12 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 147477
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/DevOHCI.cpp
r90447 r91737 1779 1779 { 1780 1780 uint32_t GCPhys = GCPhysHead; 1781 int c Max = 100;1781 int cIterations = 128; 1782 1782 for (;;) 1783 1783 { … … 1806 1806 GCPhys = Td.NextTD & ED_PTR_MASK; 1807 1807 Assert(GCPhys != GCPhysHead); 1808 Assert(cMax-- > 0); NOREF(cMax); 1808 if (!--cIterations) 1809 break; 1809 1810 } 1810 1811 } … … 1828 1829 RT_NOREF(fFull); 1829 1830 uint32_t GCPhys = GCPhysHead; 1830 int c Max= 100;1831 int cIterations = 100; 1831 1832 for (;;) 1832 1833 { … … 1855 1856 GCPhys = ITd.NextTD & ED_PTR_MASK; 1856 1857 Assert(GCPhys != GCPhysHead); 1857 Assert(cMax-- > 0); NOREF(cMax); 1858 if (!--cIterations) 1859 break; 1858 1860 } 1859 1861 } … … 2247 2249 AssertMsgReturn(LastTdAddr != TdAddr, ("TdAddr=%#010RX32\n", TdAddr), false); 2248 2250 2249 uint32_t c Max= 256;2251 uint32_t cIterations = 256; 2250 2252 uint32_t CurTdAddr = pEd->HeadP & ED_PTR_MASK; 2251 2253 while ( CurTdAddr != LastTdAddr 2252 && c Max-- > 0)2254 && cIterations-- > 0) 2253 2255 { 2254 2256 OHCIITD ITd; … … 2266 2268 } 2267 2269 2268 Log(("ohciUnlinkIsocTdInList: TdAddr=%#010RX32 wasn't found in the list!!! (c Max=%d)\n", TdAddr, cMax));2270 Log(("ohciUnlinkIsocTdInList: TdAddr=%#010RX32 wasn't found in the list!!! (cIterations=%d)\n", TdAddr, cIterations)); 2269 2271 return false; 2270 2272 } … … 2279 2281 AssertMsgReturn(LastTdAddr != TdAddr, ("TdAddr=%#010RX32\n", TdAddr), false); 2280 2282 2281 uint32_t c Max= 256;2283 uint32_t cIterations = 256; 2282 2284 uint32_t CurTdAddr = pEd->HeadP & ED_PTR_MASK; 2283 2285 while ( CurTdAddr != LastTdAddr 2284 && c Max-- > 0)2286 && cIterations-- > 0) 2285 2287 { 2286 2288 OHCITD Td; … … 2298 2300 } 2299 2301 2300 Log(("ohciR3UnlinkGeneralTdInList: TdAddr=%#010RX32 wasn't found in the list!!! (c Max=%d)\n", TdAddr, cMax));2302 Log(("ohciR3UnlinkGeneralTdInList: TdAddr=%#010RX32 wasn't found in the list!!! (cIterations=%d)\n", TdAddr, cIterations)); 2301 2303 return false; 2302 2304 } … … 3739 3741 3740 3742 uint32_t EdAddr = pThis->bulk_head; 3741 while (EdAddr && (pThis->ctl & OHCI_CTL_BLE)) 3743 uint32_t cIterations = 256; 3744 while (EdAddr 3745 && (pThis->ctl & OHCI_CTL_BLE) 3746 && (cIterations-- > 0)) 3742 3747 { 3743 3748 OHCIED Ed; … … 3841 3846 3842 3847 uint32_t EdAddr = pThis->bulk_head; 3843 while (EdAddr) 3848 uint32_t cIterations = 256; 3849 while (EdAddr 3850 && (cIterations-- > 0)) 3844 3851 { 3845 3852 OHCIED Ed; … … 3892 3899 3893 3900 uint32_t EdAddr = pThis->ctrl_head; 3894 while (EdAddr && (pThis->ctl & OHCI_CTL_CLE)) 3901 uint32_t cIterations = 256; 3902 while ( EdAddr 3903 && (pThis->ctl & OHCI_CTL_CLE) 3904 && (cIterations-- > 0)) 3895 3905 { 3896 3906 OHCIED Ed; … … 3971 3981 * Iterate the endpoint list. 3972 3982 */ 3973 while (EdAddr && (pThis->ctl & OHCI_CTL_PLE)) 3983 unsigned cIterations = 128; 3984 while (EdAddr 3985 && (pThis->ctl & OHCI_CTL_PLE) 3986 && (cIterations-- > 0)) 3974 3987 { 3975 3988 OHCIED Ed; … … 4144 4157 break; 4145 4158 } 4146 while (EdAddr) 4159 4160 unsigned cIterED = 128; 4161 while ( EdAddr 4162 && (cIterED-- > 0)) 4147 4163 { 4148 4164 OHCIED Ed; … … 4152 4168 uint32_t TdAddr = Ed.HeadP & ED_PTR_MASK; 4153 4169 uint32_t TailP = Ed.TailP & ED_PTR_MASK; 4154 unsigned k= 0;4170 unsigned cIterTD = 0; 4155 4171 if ( !(Ed.hwinfo & ED_HWINFO_SKIP) 4156 4172 && (TdAddr != TailP)) … … 4176 4192 break; 4177 4193 /* Failsafe for temporarily looped lists. */ 4178 if (++ k== 128)4194 if (++cIterTD == 128) 4179 4195 break; 4180 4196 } while (TdAddr != (Ed.TailP & ED_PTR_MASK));
Note:
See TracChangeset
for help on using the changeset viewer.