Changeset 181 for trunk/src/os2ahci/atapi.c
- Timestamp:
- Dec 13, 2016, 3:07:49 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/atapi.c
r178 r181 31 31 32 32 /* need this for the SCSI status block */ 33 #include < scsi.h>33 #include <Dev32scsi.h> 34 34 35 35 /* -------------------------- macros and constants ------------------------- */ … … 51 51 int atapi_get_geometry(IORBH FAR16DATA *vIorb, IORBH *pIorb, int slot) 52 52 { 53 DPRINTF( 2,"atapi_get_geometry called\n");53 DPRINTF(4,"atapi_get_geometry called\n"); 54 54 iorb_seterr(pIorb, IOERR_CMD_NOT_SUPPORTED); 55 55 return(-1); … … 61 61 int atapi_unit_ready(IORBH FAR16DATA *vIorb, IORBH *pIorb, int slot) 62 62 { 63 DPRINTF( 2,"atapi_unit_ready called\n");63 DPRINTF(4,"atapi_unit_ready called\n"); 64 64 iorb_seterr(pIorb, IOERR_CMD_NOT_SUPPORTED); 65 65 return(-1); … … 102 102 SET_CDB_32(cdb.lba, io->RBA + io->BlocksXferred); 103 103 104 DPRINTF(4, "atapi_read\n"); 105 104 106 do { 105 107 /* update sector count (might have been updated due to S/G limitations) */ … … 173 175 SET_CDB_32(cdb.trans_len, 1UL); 174 176 177 DPRINTF(4, "atapi_read_unaligned\n"); 178 175 179 /* allocate transfer buffer */ 176 180 if ((aws->buf = MemAlloc(io->BlockSize)) == NULL) … … 212 216 int atapi_verify(IORBH FAR16DATA *vIorb, IORBH *pIorb, int slot) 213 217 { 214 DPRINTF( 3,"atapi_verify called\n");218 DPRINTF(4,"atapi_verify called\n"); 215 219 iorb_seterr(pIorb, IOERR_CMD_NOT_SUPPORTED); 216 220 return(-1); … … 222 226 int atapi_write(IORBH FAR16DATA *vIorb, IORBH *pIorb, int slot) 223 227 { 224 DPRINTF( 3,"atapi_write called\n");228 DPRINTF(4,"atapi_write called\n"); 225 229 iorb_seterr(pIorb, IOERR_CMD_NOT_SUPPORTED); 226 230 return(-1); … … 244 248 } 245 249 /* AHCI requires 12 or 16 byte commands */ 246 atapi_pad_cdb(Far16ToFlat(pt->pControllerCmd), pt->ControllerCmdLen, 247 (u8 *) cdb, (u16 *) &cdb_len); 250 atapi_pad_cdb(Far16ToFlat(pt->pControllerCmd), pt->ControllerCmdLen, cdb, &cdb_len); 248 251 249 252 if (cdb[0] == 0x12 || cdb[0] == 0x5a) … … 293 296 size_t sense_buf_len = ATAPI_SENSE_LEN; 294 297 295 DPRINTF( 2,"atapi_req_sense\n");298 DPRINTF(4,"atapi_req_sense\n"); 296 299 297 300 if ((pIorb->RequestControl & IORB_REQ_STATUSBLOCK) && … … 386 389 if (ssb->SenseData != NULL) 387 390 { 388 memcpy( ssb->SenseData, psd, ssb->ReqSenseLen);391 memcpy(Far16ToFlat(ssb->SenseData), psd, ssb->ReqSenseLen); 389 392 ssb->Flags |= STATUS_SENSEDATA_VALID; 390 393 }
Note:
See TracChangeset
for help on using the changeset viewer.