Changeset 116


Ignore:
Timestamp:
Jul 7, 2011, 1:22:32 PM (14 years ago)
Author:
Markus Thielen
Message:
  • do not initialize com port if base address is 0 (thanks, Steven)
  • trace buffer: wake up waiting processes after data has been written (thanks, Steven)
Location:
trunk/src/os2ahci
Files:
4 edited

Legend:

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

    r112 r116  
    135135{
    136136  int i;
     137
     138  if (com_base == 0) {
     139    /* no com port in use */
     140    return;
     141  }
    137142
    138143  spin_lock(com_lock);
  • trunk/src/os2ahci/os2ahci.c

    r112 r116  
    215215      case 'd':
    216216        /* increase debug level */
    217         if (debug++ == 0) {
    218           init_com();
    219         }
     217        debug++;
    220218        break;
    221219
     
    317315  }
    318316
     317  if (debug) {
     318    /* initialize com port for debug output */
     319    init_com();
     320  }
     321
    319322  /* initialize trace buffer if applicable */
    320323  if (TRACE_ACTIVE) {
  • trunk/src/os2ahci/trace.c

    r114 r116  
    144144    cb = cbw < len ? cbw : len;
    145145    if (cb && ahci_trace_buf.empty) {
    146       /* if trace buffer was empty, we wake up any evtl. waiting
    147        * processes now */
    148146      ahci_trace_buf.empty = 0;
    149       DevHelp_ProcRun(ahci_trace_buf.phys_addr, &awake_cnt);
    150147    }
    151148    memcpy(ahci_trace_buf.tbuf + ahci_trace_buf.writep, s, cb);
     
    161158  }
    162159       
    163        
     160  /* wake up processes waiting for data from trace buffer */
     161  DevHelp_ProcRun(ahci_trace_buf.phys_addr, &awake_cnt);
     162
    164163}
    165164
  • trunk/src/os2ahci/version.h

    r112 r116  
    1414
    1515
    16 #define VERSION            117       /* driver version (2 implied decimals) */
     16#define VERSION            118       /* driver version (2 implied decimals) */
    1717
Note: See TracChangeset for help on using the changeset viewer.