Ignore:
Timestamp:
Dec 18, 2010, 3:10:02 PM (15 years ago)
Author:
markus
Message:

added feature byte to ATAPI commands; fixed request sense CDB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/atapi.c

    r61 r63  
    9393                 AP_SGLIST,    io->pSGList + sg_indx, (u16) sg_cnt,
    9494                 AP_DEVICE,    0x4000,
     95                 AP_FEATURES,  0x0001,
    9596                 AP_END);
    9697
     
    155156                             pt->ControllerCmdLen,
    156157               AP_SGLIST,    pt->pSGList, pt->cSGList,
     158               AP_FEATURES,  0x0001,
    157159               AP_END);
    158160
    159   if (rc == 0) {
    160     add_workspace(iorb)->blocks = pt->cSGList;
    161     /* no pp func needed */
    162 
    163   } else if (rc > 0) {
    164     iorb_seterr(iorb, IOERR_CMD_SGLIST_BAD);
    165 
    166   } else {
    167     iorb_seterr(iorb, IOERR_CMD_ADD_SOFTWARE_FAILURE);
     161  if (rc) {
     162    iorb_seterr(iorb, IOERR_DEVICE_NONSPECIFIC);
    168163  }
    169164 
     
    184179{
    185180  ADD_WORKSPACE _far *aws = add_workspace(iorb);
    186   ATAPI_CDB_REQ_SENSE cdb;
     181  ATAPI_CDB_6 cdb;
    187182  int rc;
    188183 
     
    198193  memset(&cdb, 0x00, sizeof(cdb));
    199194  cdb.cmd = ATAPI_CMD_REQUEST_SENSE;
     195  cdb.trans_len = (u8) ATAPI_SENSE_LEN;
     196 
    200197  aws->ppfunc = atapi_req_sense_pp;
    201198  rc = ata_cmd(ad_infos + iorb_unit_adapter(iorb),
Note: See TracChangeset for help on using the changeset viewer.