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/ctxhook.c

    r13 r63  
    120120        ccs = (int) ((readl(port_mmio + PORT_CMD) >> 8) & 0x0f);
    121121
    122         for (iorb = ai->ports[p].iorb_queue.root; iorb != NULL; iorb = next) {
     122       for (iorb = ai->ports[p].iorb_queue.root; iorb != NULL; iorb = next) {
    123123          ADD_WORKSPACE _far *aws = add_workspace(iorb);
    124124          next = iorb->pNxtIORB;
    125125
    126126          if (aws->queued_hw) {
    127             if (ai->ports[p].ncq_cmds != 0) {
     127            if (ai->ports[p].ncq_cmds & (1UL << aws->cmd_slot)) {
    128128              /* NCQ commands active; force non-NCQ mode and trigger port reset */
     129              ai->ports[p].ncq_cmds &= ~(1UL << aws->cmd_slot);
    129130              aws->no_ncq = 1;
    130131              need_reset = 1;
    131132            } else if (aws->cmd_slot == ccs) {
    132133              /* this is the non-NCQ comand that failed */
     134              ai->ports[p].reg_cmds &= ~(1UL << aws->cmd_slot);
    133135              problem_iorb = iorb;
    134136            }
    135137            iorb_requeue(iorb);
    136 
    137             /* remove requeued command from the issued command bitmaps */
    138             ai->ports[p].ncq_cmds &= ~(1UL << p);
    139             ai->ports[p].reg_cmds &= ~(1UL << p);
    140138          }
    141139        }
Note: See TracChangeset for help on using the changeset viewer.