Ignore:
Timestamp:
Feb 16, 2011, 7:10:13 PM (14 years ago)
Author:
chris
Message:

atapi.c:

  • Extended workaround for incorrect direction bits to "mode sense" commands; now there's no bus lockup and subsequent port reset during boot anymore.

ahci.c:

  • Fixed timeout handling -- we use milliseconds internally while the IORB uses seconds
  • Replaced IORB completion code with a macro to improve IORB debug logging

ctxhook.c:

  • Fixed an issue which would fail to clear a port command bit if the IORB in question was not the one that caused the port engine to stop. As a result, a subsequent sanity check caused an unecessary port reset. The result was that ejecting a CD via WPS' drive object would cause the next command to fail, a reset to occur and the tray to close again right away
  • Replaced IORB completion code with a macro to improve IORB debug logging
  • added spinlocks around aws_free()

os2ahci.c

  • Replaced IORB completion code with a macro to improve IORB debug logging
  • Improved IORB debug logging to make it easier to spot the lifetime of an IORB without having to read between the lines

os2ahci.h

  • Added macro to complete an IORB including the corresponding debug log
File:
1 edited

Legend:

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

    r74 r75  
    858858  AD_INFO *ai = ad_infos + iorb_unit_adapter(iorb);
    859859  P_INFO *port = ai->ports + iorb_unit_port(iorb);
    860   ULONG timeout = (iorb->Timeout > 0) ? iorb->Timeout : DEFAULT_TIMEOUT;
     860  ULONG timeout = (iorb->Timeout > 0) ? iorb->Timeout * 1000 : DEFAULT_TIMEOUT;
    861861  u8 _far *port_mmio = port_base(ai, iorb_unit_port(iorb));
    862862  u16 cmd_max = ai->cmd_max;
     
    12571257    next = iorb->pNxtIORB;
    12581258    if (aws->queued_hw && (done_mask & (1UL << aws->cmd_slot))) {
    1259       /* this command has completed */
     1259      /* this hardware command has completed */
     1260      ai->ports[p].ncq_cmds &= ~(1UL << aws->cmd_slot);
     1261      ai->ports[p].reg_cmds &= ~(1UL << aws->cmd_slot);
     1262
     1263      /* call post-processing function, if any */
    12601264      if (aws->ppfunc != NULL) {
    12611265        aws->ppfunc(iorb);
     
    12681272        iorb_queue_del(&ai->ports[p].iorb_queue, iorb);
    12691273        iorb_queue_add(&done_queue, iorb);
     1274        aws_free(add_workspace(iorb));
    12701275      }
    1271 
    1272       /* clear corresponding bit in issued command bitmaps */
    1273       ai->ports[p].ncq_cmds &= ~(1UL << aws->cmd_slot);
    1274       ai->ports[p].reg_cmds &= ~(1UL << aws->cmd_slot);
    12751276    }
    12761277  }
     
    12781279  spin_unlock(drv_lock);
    12791280
    1280   /* call notification routines for all IORBs in the done queue */
     1281  /* complete all IORBs in the done queue */
    12811282  for (iorb = done_queue.root; iorb != NULL; iorb = next) {
    12821283    next = iorb->pNxtIORB;
    1283     iorb->Status = IORB_DONE;
    1284     aws_free(add_workspace(iorb));
    1285     if (iorb->RequestControl & IORB_ASYNC_POST) {
    1286       iorb->NotifyAddress(iorb);
    1287     }
     1284    complete_iorb(iorb);
    12881285  }
    12891286}
Note: See TracChangeset for help on using the changeset viewer.