Changeset 43570 in vbox
- Timestamp:
- Oct 8, 2012 5:17:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevATA.cpp
r43569 r43570 102 102 /* Media track type */ 103 103 #define ATA_MEDIA_TYPE_UNKNOWN 0 /**< unknown CD type */ 104 #define ATA_MEDIA_TYPE_DATA 1 /**< Data CD */ 105 #define ATA_MEDIA_TYPE_CDDA 2 /**< CD-DA (audio) CD type */ 104 106 #define ATA_MEDIA_NO_DISC 0x70 /**< Door closed, no medium */ 105 107 … … 2126 2128 { 2127 2129 case SCSI_SEND_CUE_SHEET: 2128 case SCSI_READ_TOC_PMA_ATIP:2129 2130 { 2130 2131 if (!s->pTrackList) … … 2168 2169 ataSCSIPadStr(s->CTX_SUFF(pbIOBuffer) + 32, "1.0", 4); 2169 2170 } 2170 2171 else if ( s->aATAPICmd[0] == SCSI_READ_TOC_PMA_ATIP 2172 && (s->aATAPICmd[2] & 0xf) != 0x05 2173 && s->aATAPICmd[6] != 0xaa) 2174 { 2175 /* Set the media type if we can detect it. */ 2176 uint8_t *pbBuf = s->CTX_SUFF(pbIOBuffer); 2177 2178 /** @todo: Implemented only for formatted TOC now. */ 2179 if ( (s->aATAPICmd[2] & 0xf) == 0 2180 && cbTransfer >= 6) 2181 { 2182 uint32_t NewMediaType; 2183 uint32_t OldMediaType; 2184 2185 if (pbBuf[5] & 0x4) 2186 NewMediaType = ATA_MEDIA_TYPE_DATA; 2187 else 2188 NewMediaType = ATA_MEDIA_TYPE_CDDA; 2189 2190 OldMediaType = ataMediumTypeSet(s, NewMediaType); 2191 2192 if (OldMediaType != NewMediaType) 2193 LogRel(("PIIX3 ATA: LUN#%d: CD-ROM passthrough, detected %s CD\n", 2194 s->iLUN, 2195 NewMediaType == ATA_MEDIA_TYPE_DATA 2196 ? "data" 2197 : "audio")); 2198 } 2199 else /* Play safe and set to unknown. */ 2200 ataMediumTypeSet(s, ATA_MEDIA_TYPE_UNKNOWN); 2201 } 2171 2202 if (cbTransfer) 2172 2203 Log3(("ATAPI PT data read (%d): %.*Rhxs\n", cbTransfer, cbTransfer, s->CTX_SUFF(pbIOBuffer)));
Note:
See TracChangeset
for help on using the changeset viewer.