Changeset 92550 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Nov 22, 2021 1:49:30 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevATA.cpp
r92548 r92550 3144 3144 RT_NOREF(pDevIns); 3145 3145 3146 /* 28 bytes of total returned data corresponds to ATAPI 2.6. Note that at least some versions 3147 * of NEC_IDE.SYS DOS driver (possibly other Oak Technology OTI-011 drivers) do not correctly 3148 * handle cases where more than 28 bytes are returned due to bugs. See @bugref{5869}. 3149 */ 3146 3150 Assert(s->uTxDir == PDMMEDIATXDIR_FROM_DEVICE); 3147 Assert(s->cbElementaryTransfer <= 40);3148 scsiH2BE_U16(&pbBuf[0], 38);3151 Assert(s->cbElementaryTransfer <= 28); 3152 scsiH2BE_U16(&pbBuf[0], 26); 3149 3153 pbBuf[2] = (uint8_t)s->MediaTrackType; 3150 3154 pbBuf[3] = 0; … … 3155 3159 3156 3160 pbBuf[8] = 0x2a; 3157 pbBuf[9] = 30; /* page length */3161 pbBuf[9] = 18; /* page length */ 3158 3162 pbBuf[10] = 0x08; /* DVD-ROM read support */ 3159 3163 pbBuf[11] = 0x00; /* no write support */ … … 3173 3177 pbBuf[24] = 0; /* reserved */ 3174 3178 pbBuf[25] = 0; /* reserved for digital audio (see idx 15) */ 3175 scsiH2BE_U16(&pbBuf[26], 0); /* (obsolete) maximum write speed */ 3176 scsiH2BE_U16(&pbBuf[28], 0); /* (obsolete) current write speed */ 3177 scsiH2BE_U16(&pbBuf[30], 0); /* copy management revision supported 0=no CSS */ 3178 pbBuf[32] = 0; /* reserved */ 3179 pbBuf[33] = 0; /* reserved */ 3180 pbBuf[34] = 0; /* reserved */ 3181 pbBuf[35] = 1; /* rotation control CAV */ 3182 scsiH2BE_U16(&pbBuf[36], 0); /* current write speed */ 3183 scsiH2BE_U16(&pbBuf[38], 0); /* number of write speed performance descriptors */ 3179 pbBuf[26] = 0; /* reserved */ 3180 pbBuf[27] = 0; /* reserved */ 3184 3181 s->iSourceSink = ATAFN_SS_NULL; 3185 3182 atapiR3CmdOK(pCtl, s); … … 3242 3239 3243 3240 /* Track fields are 8-bit and 1-based, so cut the track count at 255, 3244 avoiding any potential lybuffer overflow issues below. */3241 avoiding any potential buffer overflow issues below. */ 3245 3242 uint32_t cTracks = pDevR3->pDrvMedia->pfnGetRegionCount(pDevR3->pDrvMedia); 3246 3243 AssertStmt(cTracks <= UINT8_MAX, cTracks = UINT8_MAX); … … 3508 3505 break; 3509 3506 case SCSI_MODEPAGE_CD_STATUS: 3510 ataR3StartTransfer(pDevIns, pCtl, s, RT_MIN(cbMax, 40), PDMMEDIATXDIR_FROM_DEVICE, ATAFN_BT_ATAPI_CMD, ATAFN_SS_ATAPI_MODE_SENSE_CD_STATUS, true);3507 ataR3StartTransfer(pDevIns, pCtl, s, RT_MIN(cbMax, 28), PDMMEDIATXDIR_FROM_DEVICE, ATAFN_BT_ATAPI_CMD, ATAFN_SS_ATAPI_MODE_SENSE_CD_STATUS, true); 3511 3508 break; 3512 3509 default:
Note:
See TracChangeset
for help on using the changeset viewer.