Ignore:
Timestamp:
May 31, 2013, 11:15:02 PM (12 years ago)
Author:
David Azarewicz
Message:

Suspend/resume changes

File:
1 edited

Legend:

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

    r160 r161  
    11/******************************************************************************
    2  * apm.c - Functions to interface with the APM driver.
     2 * apm.c - Functions to interface with the legacy APM driver, and suspend / resume functions.
    33 *
    44 * Copyright (c) 2011 thi.guten Software Development
     
    2727#include "os2ahci.h"
    2828
     29/* Legacy APM support is not needed on eCS systems with ACPI and is more
     30 * reliable without it enabled.
     31 */
     32#ifdef LEGACY_APM
     33
    2934#include <apmcalls.h>
    30 
    31 /* -------------------------- macros and constants ------------------------- */
    32 
    33 /* ------------------------ typedefs and structures ------------------------ */
    34 
    35 /* -------------------------- function prototypes -------------------------- */
    36 
    37 /* ------------------------ global/static variables ------------------------ */
    38 
    3935USHORT _far _cdecl apm_event    (APMEVENT _far *evt);
    40 
    41 /* ----------------------------- start of code ----------------------------- */
    4236
    4337/******************************************************************************
     
    9488  return(0);
    9589}
     90#endif /* LEGACY_APM */
    9691
    9792/******************************************************************************
     
    143138  init_complete = 0;
    144139
    145 #if 0
    146   /* restore BIOS configuration for each adapter and release the adapter */
    147   for (a = 0; a < ad_info_cnt; a++) {
    148     ahci_restore_bios_config(ad_infos + a);
    149   }
    150 #endif
    151 
    152140  /* TODO: put the device into the D3 state */
    153141
     
    171159  for (a = 0; a < ad_info_cnt; a++) {
    172160    AD_INFO *ai = ad_infos + a;
     161
     162    //ahci_reset_controller(ai);
    173163
    174164    /* Complete initialization of this adapter; this will restart the ports
     
    184174  /* unlock all adapters now that we have set the init_complete flag */
    185175  for (a = 0; a < ad_info_cnt; a++) {
    186     unlock_adapter(ad_infos + a);
     176    AD_INFO *ai = ad_infos + a;
     177    unlock_adapter(ai);
    187178  }
    188179
    189180  suspended = 0;
     181
     182  /* restart engine to resume IORB processing */
     183  resume_sleep_flag = 5000;
     184  DevHelp_ArmCtxHook(0, engine_ctxhook_h);
     185
    190186  dprintf("resume() finished\n");
    191187}
Note: See TracChangeset for help on using the changeset viewer.