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

    r71 r75  
    375375        /* unit handle outside of the allowed range */
    376376        dprintf("warning: IORB for %d.%d.%d out of range\n", a, p, d);
    377         iorb->Status = IORB_ERROR | IORB_DONE;
     377        iorb->Status = IORB_ERROR;
    378378        iorb->ErrorCode = IOERR_CMD_SYNTAX;
    379         if (iorb->RequestControl & IORB_ASYNC_POST) {
    380           iorb->NotifyAddress(iorb);
    381         }
     379        complete_iorb(iorb);
    382380        continue;
    383381      }
     
    964962  }
    965963
    966   ddprintf("IORB queued:  %d/%d (queue = %Fp, IORB = %Fp)\n",
    967            iorb->CommandCode, iorb->CommandModifier, queue, iorb);
     964  if (debug) {
     965    /* determine queue type (local, driver, abort or port) and minimum debug
     966     * level; otherwise, queue debug prints can become really confusing.
     967     */
     968    char *queue_type;
     969    int min_debug = 1;
     970
     971    if ((u32) queue >> 16 == (u32) (void _far *) &queue >> 16) {
     972      /* this queue is on the stack */
     973      queue_type = "local";
     974      min_debug = 2;
     975
     976    } else if (queue == &driver_queue) {
     977      queue_type = "driver";
     978
     979    } else if (queue == &abort_queue) {
     980      queue_type = "abort";
     981      min_debug = 2;
     982
     983    } else {
     984      queue_type = "port";
     985    }
     986
     987    if (debug >= min_debug) {
     988      printf("IORB %Fp queued (cmd = %d/%d, queue = %Fp [%s], timeout = %ld)\n",
     989             iorb, iorb->CommandCode, iorb->CommandModifier, queue, queue_type,
     990             iorb->Timeout);
     991    }
     992  }
    968993}
    969994
     
    9951020
    9961021  if (found) {
    997     ddprintf("IORB removed: %d/%d (queue = %Fp, IORB = %Fp) - %04x/%04x\n",
    998              iorb->CommandCode, iorb->CommandModifier, queue, iorb,
    999              iorb->Status, iorb->ErrorCode);
     1022    ddprintf("IORB %Fp removed (queue = %Fp)\n", iorb, queue);
    10001023  } else {
    10011024    dprintf("IORB %Fp not found in queue %Fp\n", iorb, queue);
     
    10491072  spin_unlock(drv_lock);
    10501073
    1051   /* notify caller, if requested */
    1052   iorb->Status |= IORB_DONE;
    1053   if (iorb->RequestControl & IORB_ASYNC_POST) {
    1054     iorb->NotifyAddress(iorb);
    1055   }
     1074  complete_iorb(iorb);
    10561075}
    10571076
Note: See TracChangeset for help on using the changeset viewer.