Changeset 75 for trunk/src/os2ahci/ctxhook.c
- Timestamp:
- Feb 16, 2011, 7:10:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/ctxhook.c
r74 r75 55 55 * given time (even if more are outstanding). This is the case for single 56 56 * devices or port multipliers without FIS-based command switching. Error 57 * recovery is simple because we know which command has failed and can 58 * requeue all commands, replacing the failing command with a "request 59 * sense" command to get error details. 57 * recovery is simple because we know which command has failed and that 58 * all other commands have not yet started executing. Thus, we can requeue 59 * all of them, replacing the failing command with a "request sense" 60 * command to get error details. 60 61 * 61 62 * - Multiple non-NCQ commands are executed on different devices behind a … … 128 129 if (aws->queued_hw) { 129 130 if (ai->ports[p].ncq_cmds & (1UL << aws->cmd_slot)) { 130 /* NCQ command s active; force non-NCQ mode and trigger port reset */131 /* NCQ command; force non-NCQ mode and trigger port reset */ 131 132 ai->ports[p].ncq_cmds &= ~(1UL << aws->cmd_slot); 132 133 aws->no_ncq = 1; 133 134 need_reset = 1; 134 } else if (aws->cmd_slot == ccs){135 /* this is the non-NCQ comand that failed*/135 } else { 136 /* regular command; clear cmd bit and identify problem IORB */ 136 137 ai->ports[p].reg_cmds &= ~(1UL << aws->cmd_slot); 137 problem_iorb = iorb; 138 if (aws->cmd_slot == ccs) { 139 /* this is the non-NCQ comand that failed */ 140 problem_iorb = iorb; 141 } 138 142 } 143 /* we can requeue all IORBs unconditionally (see function comment) */ 139 144 iorb_requeue(iorb); 140 145 } … … 184 189 ADD_WORKSPACE _far *aws = add_workspace(problem_iorb); 185 190 int d = iorb_unit_device(problem_iorb); 186 int (*req_sense)(IORBH _far *, int) = 187 (ai->ports[p].devs[d].atapi) ?atapi_req_sense : ata_req_sense;191 int (*req_sense)(IORBH _far *, int) = (ai->ports[p].devs[d].atapi) ? 192 atapi_req_sense : ata_req_sense; 188 193 189 194 aws->processing = 1; … … 214 219 for (iorb = done_queue.root; iorb != NULL; iorb = next) { 215 220 next = iorb->pNxtIORB; 216 if (iorb->RequestControl & IORB_ASYNC_POST) { 217 iorb->NotifyAddress(iorb); 218 } 221 222 spin_lock(drv_lock); 223 aws_free(add_workspace(iorb)); 224 spin_unlock(drv_lock); 225 226 complete_iorb(iorb); 219 227 } 220 228 … … 355 363 spin_unlock(drv_lock); 356 364 357 /* c all notification routine onall aborted IORBs */365 /* complete all aborted IORBs */ 358 366 for (iorb = done_queue.root; iorb != NULL; iorb = next) { 359 367 next = iorb->pNxtIORB; 360 iorb->Status = IORB_DONE | IORB_ERROR; 368 369 spin_lock(drv_lock); 361 370 aws_free(add_workspace(iorb)); 362 if (iorb->RequestControl & IORB_ASYNC_POST) { 363 iorb->NotifyAddress(iorb); 364 } 371 spin_unlock(drv_lock); 372 373 iorb->Status = IORB_ERROR; 374 complete_iorb(iorb); 365 375 } 366 376 … … 410 420 } 411 421 } 422
Note:
See TracChangeset
for help on using the changeset viewer.