- Timestamp:
- Nov 28, 2014 1:33:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevATA.cpp
r51381 r53409 183 183 /** Maximum ATAPI elementary transfer size, PIO only. */ 184 184 uint32_t cbPIOTransferLimit; 185 /** ATAPI passthrough transfer size, shared PIO/DMA */ 186 uint32_t cbAtapiPassthroughTransfer; 185 187 /** Current read/write buffer position, shared PIO/DMA. */ 186 188 uint32_t iIOBufferCur; 187 189 /** First element beyond end of valid buffer content, shared PIO/DMA. */ 188 190 uint32_t iIOBufferEnd; 191 /** Align the following fields correctly. */ 192 uint32_t Alignment0; 189 193 190 194 /** ATA/ATAPI current PIO read/write transfer position. Not shared with DMA for safety reasons. */ … … 1737 1741 s->cbTotalTransfer = 0; 1738 1742 s->cbElementaryTransfer = 0; 1743 s->cbAtapiPassthroughTransfer = 0; 1739 1744 s->iIOBufferCur = 0; 1740 1745 s->iIOBufferEnd = 0; … … 1763 1768 s->fATAPITransfer = true; 1764 1769 s->cbElementaryTransfer = s->cbTotalTransfer; 1770 s->cbAtapiPassthroughTransfer = s->cbTotalTransfer; 1765 1771 s->cbPIOTransferLimit = s->uATARegLCyl | (s->uATARegHCyl << 8); 1766 1772 if (s->uTxDir == PDMBLOCKTXDIR_TO_DEVICE) … … 1953 1959 PSTAMPROFILEADV pProf = NULL; 1954 1960 1955 cbTransfer = RT_MIN(s->cb TotalTransfer, s->cbIOBuffer);1961 cbTransfer = RT_MIN(s->cbAtapiPassthroughTransfer, s->cbIOBuffer); 1956 1962 1957 1963 if (s->uTxDir == PDMBLOCKTXDIR_TO_DEVICE) … … 2179 2185 if (s->uTxDir == PDMBLOCKTXDIR_FROM_DEVICE) 2180 2186 { 2181 Assert(cbTransfer <= s->cb TotalTransfer);2187 Assert(cbTransfer <= s->cbAtapiPassthroughTransfer); 2182 2188 /* 2183 2189 * Reply with the same amount of data as the real drive … … 2209 2215 * done in one transfer, so set the actual value of the buffer end. */ 2210 2216 s->cbElementaryTransfer = cbTransfer; 2211 if (cbTransfer >= s->cb TotalTransfer)2217 if (cbTransfer >= s->cbAtapiPassthroughTransfer) 2212 2218 { 2213 2219 s->iSourceSink = ATAFN_SS_NULL; … … 3751 3757 s->cbTotalTransfer = 0; 3752 3758 s->cbElementaryTransfer = 0; 3759 s->cbAtapiPassthroughTransfer = 0; 3753 3760 atapiParseCmd(s); 3754 3761 return false; … … 3843 3850 { 3844 3851 s->cbElementaryTransfer = s->cbTotalTransfer; 3852 s->cbAtapiPassthroughTransfer = s->cbTotalTransfer; 3845 3853 s->uATARegNSector = (s->uATARegNSector & ~7) | ATAPI_INT_REASON_CD; 3846 3854 Log2(("%s: interrupt reason %#04x\n", __FUNCTION__, s->uATARegNSector)); … … 3862 3870 s->cbTotalTransfer = 0; 3863 3871 s->cbElementaryTransfer = 0; 3872 s->cbAtapiPassthroughTransfer = 0; 3864 3873 s->iIOBufferPIODataStart = 0; 3865 3874 s->iIOBufferPIODataEnd = 0;
Note:
See TracChangeset
for help on using the changeset viewer.