Ignore:
Timestamp:
Dec 23, 2010, 11:06:03 PM (15 years ago)
Author:
chris
Message:
  • Added code to dprintf TF_DATA register in restart_ctxhook
  • Cleaned up aws_free() calls; in a nutshell, aws_free() will always be called when IORBs complete (successfully or with an error) and this is now verified; redundant invocations of aws_free() have been removed.
  • atapi_req_sense_pp() now sets the iorb_workspace(iorb)->complete = 1
File:
1 edited

Legend:

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

    r63 r66  
    117117        need_reset = 0;
    118118
     119        dprintf("port %d, TF_DATA: 0x%lx\n", p, readl(port_mmio + PORT_TFDATA));
     120
    119121        /* get "current command slot"; only valid if there are no NCQ cmds */
    120122        ccs = (int) ((readl(port_mmio + PORT_CMD) >> 8) & 0x0f);
    121123
    122        for (iorb = ai->ports[p].iorb_queue.root; iorb != NULL; iorb = next) {
     124        for (iorb = ai->ports[p].iorb_queue.root; iorb != NULL; iorb = next) {
    123125          ADD_WORKSPACE _far *aws = add_workspace(iorb);
    124126          next = iorb->pNxtIORB;
     
    285287
    286288    /* move IORB to the local 'done' queue */
    287     aws_free(add_workspace(iorb));
    288289    iorb_queue_del(&abort_queue, iorb);
    289290    iorb_queue_add(&done_queue, iorb);
     
    331332          if (add_workspace(iorb)->queued_hw) {
    332333            /* this IORB had already been queued to HW when we reset the port */
    333             aws_free(add_workspace(iorb));
    334334            if (add_workspace(iorb)->idempotent) {
    335335              /* We can retry this IORB; just reset its status and it will be
    336336               * picked up by subsequent trigger_engine() calls.
    337337               */
    338               memset(&iorb->ADDWorkSpace, sizeof(iorb->ADDWorkSpace), 0x00);
     338              requeue_iorb(iorn);
    339339
    340340            } else {
     
    356356    next = iorb->pNxtIORB;
    357357    iorb->Status = IORB_DONE | IORB_ERROR;
     358    aws_free(add_workspace(iorb));
    358359    if (iorb->RequestControl & IORB_ASYNC_POST) {
    359360      iorb->NotifyAddress(iorb);
Note: See TracChangeset for help on using the changeset viewer.