Changeset 32104 in vbox
- Timestamp:
- Aug 30, 2010 3:07:36 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevATA.cpp
r32088 r32104 3206 3206 cSectors = ataBE2H_U16(pbPacket + 7); 3207 3207 Log2(("ATAPI PT: lba %d sectors %d\n", iATAPILBA, cSectors)); 3208 s->cbATAPISector = 2048; /**< @todo this size is not always correct */3208 s->cbATAPISector = 2048; 3209 3209 cbTransfer = cSectors * s->cbATAPISector; 3210 3210 uTxDir = PDMBLOCKTXDIR_FROM_DEVICE; … … 3214 3214 cSectors = ataBE2H_U32(pbPacket + 6); 3215 3215 Log2(("ATAPI PT: lba %d sectors %d\n", iATAPILBA, cSectors)); 3216 s->cbATAPISector = 2048; /**< @todo this size is not always correct */3216 s->cbATAPISector = 2048; 3217 3217 cbTransfer = cSectors * s->cbATAPISector; 3218 3218 uTxDir = PDMBLOCKTXDIR_FROM_DEVICE; … … 3231 3231 goto sendcmd; 3232 3232 case SCSI_READ_CD: 3233 case SCSI_READ_CD_MSF: 3233 3234 { 3234 3235 /* Get sector size based on the expected sector type field. */ … … 3261 3262 } 3262 3263 3263 cbTransfer = ataBE2H_U24(pbPacket + 6) * s->cbATAPISector; 3264 if (pbPacket[0] == SCSI_READ_CD) 3265 cbTransfer = ataBE2H_U24(pbPacket + 6) * s->cbATAPISector; 3266 else /* SCSI_READ_MSF */ 3267 { 3268 cSectors = ataMSF2LBA(pbPacket + 6) - ataMSF2LBA(pbPacket + 3); 3269 if (cSectors > 32) 3270 cSectors = 32; /* Limit transfer size to 64~74K. Safety first. In any case this can only harm software doing CDDA extraction. */ 3271 cbTransfer = cSectors * s->cbATAPISector; 3272 } 3264 3273 uTxDir = PDMBLOCKTXDIR_FROM_DEVICE; 3265 3274 goto sendcmd; 3266 3275 } 3267 case SCSI_READ_CD_MSF:3268 cSectors = ataMSF2LBA(pbPacket + 6) - ataMSF2LBA(pbPacket + 3);3269 if (cSectors > 32)3270 cSectors = 32; /* Limit transfer size to 64~74K. Safety first. In any case this can only harm software doing CDDA extraction. */3271 s->cbATAPISector = 2048; /**< @todo this size is not always correct */3272 cbTransfer = cSectors * s->cbATAPISector;3273 uTxDir = PDMBLOCKTXDIR_FROM_DEVICE;3274 goto sendcmd;3275 3276 case SCSI_READ_DISC_INFORMATION: 3276 3277 cbTransfer = ataBE2H_U16(pbPacket + 7);
Note:
See TracChangeset
for help on using the changeset viewer.