Changeset 121 for trunk/src/os2ahci/ctxhook.c
- Timestamp:
- Aug 31, 2011, 11:23:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/ctxhook.c
r87 r121 128 128 /* get "current command slot"; only valid if there are no NCQ cmds */ 129 129 ccs = (int) ((readl(port_mmio + PORT_CMD) >> 8) & 0x0f); 130 ddprintf(" PORT_CMD = 0x%x\n", ccs); 130 131 131 132 for (iorb = ai->ports[p].iorb_queue.root; iorb != NULL; iorb = next) { … … 143 144 ai->ports[p].reg_cmds &= ~(1UL << aws->cmd_slot); 144 145 if (aws->cmd_slot == ccs) { 145 /* this is the non-NCQ com and that failed */146 /* this is the non-NCQ command that failed */ 146 147 problem_iorb = iorb; 147 148 } 148 149 } 149 150 /* we can requeue all IORBs unconditionally (see function comment) */ 150 iorb_requeue(iorb); 151 if (aws->retries++ < MAX_RETRIES) { 152 iorb_requeue(iorb); 153 154 } else { 155 /* retry count exceeded; consider IORB aborted */ 156 iorb_seterr(iorb, IOERR_CMD_ABORTED); 157 iorb_queue_del(&ai->ports[p].iorb_queue, iorb); 158 iorb_queue_add(&done_queue, iorb); 159 if (iorb == problem_iorb) { 160 /* no further analysis -- we're done with this one */ 161 problem_iorb = NULL; 162 } 163 } 151 164 } 152 165 } … … 352 365 /* retry or abort all remaining active commands on this port */ 353 366 for (iorb = ai->ports[p].iorb_queue.root; iorb != NULL; iorb = next) { 367 ADD_WORKSPACE _far *aws = add_workspace(iorb); 354 368 next = iorb->pNxtIORB; 355 if (add_workspace(iorb)->queued_hw) { 369 370 if (aws->queued_hw) { 356 371 /* this IORB had already been queued to HW when we reset the port */ 357 if (add_workspace(iorb)->idempotent) { 358 /* We can retry this IORB; just reset its status and it will be 359 * picked up by subsequent trigger_engine() calls. 360 */ 372 if (aws->idempotent && aws->retries++ < MAX_RETRIES) { 373 /* we can retry this IORB */ 361 374 iorb_requeue(iorb); 362 375
Note:
See TracChangeset
for help on using the changeset viewer.