Ignore:
Timestamp:
Jan 7, 2011, 4:54:46 PM (15 years ago)
Author:
markus
Message:

fixed ATAPI packet commands; added cache flush in shutdown handler; allow write cache for NCQ commands

File:
1 edited

Legend:

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

    r68 r69  
    7575  /* translate read command to SCSI/ATAPI READ12 command.
    7676   * READ12 seems to be the most supported READ variant - according to MMC,
    77    * and its enough even for BluRay.
     77   * and it's enough even for BluRay.
    7878   */
    7979  memset(&cdb, 0x00, sizeof(cdb));
     
    167167               AP_SGLIST, pt->pSGList, pt->cSGList,
    168168               AP_WRITE, !(pt->Flags & PT_DIRECTION_IN),
    169                /* TODO: do we have to clear DMA_TO_HOST bit for
    170                 * write, mode select etc. commands?
    171                 */
    172                AP_FEATURES,  ATAPI_FEAT_DMA | ATAPI_FEAT_DMA_TO_HOST,
     169               AP_FEATURES, ATAPI_FEAT_DMA,
     170               AP_FEATURES, (pt->Flags & PT_DIRECTION_IN) ? ATAPI_FEAT_DMA_TO_HOST : 0,
    173171               AP_END);
    174172
     
    224222    iorb_seterr(iorb, IOERR_CMD_SGLIST_BAD);
    225223
    226   } else {
     224  } else if (rc < 0) {
    227225    /* we failed to get info about an error -> return
    228226     * non specific device error
     
    242240  ADD_WORKSPACE _far *aws = add_workspace(iorb);
    243241  ATAPI_SENSE_DATA *psd = (ATAPI_SENSE_DATA *) aws->buf;
     242
     243  ddphex(psd, sizeof(psd), "sense buffer:\n");
    244244
    245245  /* map sense data to some IOERR_ value */
Note: See TracChangeset for help on using the changeset viewer.