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

    r74 r75  
    150150  u8 cdb[ATAPI_MAX_CDB_LEN];
    151151  u16 cdb_len;
    152   int old_debug;
    153152
    154153  if (pt->ControllerCmdLen > ATAPI_MAX_CDB_LEN) {
     
    160159                (u8 _far *) cdb, (u16 _far *) &cdb_len);
    161160
    162   if (cdb[0] == 0x12) {
    163     /* Some buggy entity asks for a SCSI INQUIRY command during boot without
    164      * the flag PT_DIRECTION_IN which causes a timeout and port reset. The
    165      * easiest way around this is to hack the flag PT_DIRECTION_IN into the
    166      * request because SCSI INQUIRY commands are always device -> host.
    167      */
     161  if (cdb[0] == 0x12 || cdb[0] == 0x5a) {
     162    /* somebody sets the direction flag incorrectly for those commands */
    168163    pt->Flags |= PT_DIRECTION_IN;
    169     old_debug = debug;
    170     debug = 2;
    171164  }
    172165
     
    190183  }
    191184 
    192   if (cdb[0] == 0x12) {
    193     debug = old_debug;
    194   }
    195 
    196185  return(rc);
    197186}
Note: See TracChangeset for help on using the changeset viewer.