Ignore:
Timestamp:
May 31, 2013, 2:03:41 AM (12 years ago)
Author:
David Azarewicz
Message:

fixed trap dump kernel exit, some work on suspend/resume routines

File:
1 edited

Legend:

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

    r157 r160  
    408408  }
    409409
    410   printf_nts("BldLevel: %s\n", BldLevel);
    411   printf_nts("CmdLine: %Fs\n", cmd_line);
     410  ntprintf("BldLevel: %s\n", BldLevel);
     411  ntprintf("CmdLine: %Fs\n", cmd_line);
    412412
    413413  /* scan PCI bus for supported devices */
     
    489489    break;
    490490
    491   case OS2AHCI_IDC_CATEGORY:
    492     switch (ioctl->Function) {
    493 
    494     case OS2AHCI_IDC_BIOSMODE:
    495       /* reconfigure adapters in BIOS/int13 mode; needed for generating
    496        * trap dumps on some machines. This was intended to be called by ACPI.PSD,
    497        * but that is never done. This is obslete. The kernel exit accomplishes
    498        * this instead.
    499        *
    500        * To enter BIOS mode, we flush all write caches, turn off interrupts
    501        * and restore the BIOS configuration. This is exactly what
    502        * apm_suspend() does.
    503        */
    504       apm_suspend();
    505       return(STDON);
    506 
    507     case OS2AHCI_IDC_BEEP:
    508       /* IOCTL for IDC testing - just beep */
    509       DevHelp_Beep(2000, 100);
    510       return(STDON);
    511     }
    512     break;
    513 
    514491  case DSKSP_CAT_GENERIC:
    515492    return(ioctl_gen_dsk(ioctl));
     
    552529  }
    553530
    554   apm_suspend();
     531  suspend();
    555532  return(STDON);
    556533}
     
    564541  dprintf("sr_drv(%d) called\n", func);
    565542
    566   if (func) apm_resume();
    567   else apm_suspend();
     543  if (func) resume();
     544  else suspend();
    568545
    569546  return(STDON);
     
    765742   * IORB.
    766743   */
     744  while (suspended) DevHelp_ProcBlock((ULONG)&send_iorb, 1, WAIT_IS_INTERRUPTABLE);
    767745  add_workspace(iorb)->processing = 1;
    768746  spin_unlock(drv_lock);
     
    12631241
    12641242    if (debug > min_debug) {
    1265       printf("IORB %Fp queued (cmd = %d/%d, queue = %Fp [%s], timeout = %ld)\n",
     1243      aprintf("IORB %Fp queued (cmd = %d/%d, queue = %Fp [%s], timeout = %ld)\n",
    12661244             iorb, iorb->CommandCode, iorb->CommandModifier, queue, queue_type,
    12671245             iorb->Timeout);
Note: See TracChangeset for help on using the changeset viewer.