Lines 301-306
static int iwl_pcie_apm_init(struct iwl_trans *trans)
Link Here
|
301 |
} |
301 |
} |
302 |
|
302 |
|
303 |
set_bit(STATUS_DEVICE_ENABLED, &trans->status); |
303 |
set_bit(STATUS_DEVICE_ENABLED, &trans->status); |
|
|
304 |
IWL_DEBUG_INFO(trans, "DEVICE_ENABLED bit is now set\n"); |
304 |
|
305 |
|
305 |
out: |
306 |
out: |
306 |
return ret; |
307 |
return ret; |
Lines 430-444
static int iwl_pcie_apm_stop_master(struct iwl_trans *trans)
Link Here
|
430 |
IWL_WARN(trans, "Master Disable Timed Out, 100 usec\n"); |
431 |
IWL_WARN(trans, "Master Disable Timed Out, 100 usec\n"); |
431 |
|
432 |
|
432 |
IWL_DEBUG_INFO(trans, "stop master\n"); |
433 |
IWL_DEBUG_INFO(trans, "stop master\n"); |
|
|
434 |
dump_stack(); |
433 |
|
435 |
|
434 |
return ret; |
436 |
return ret; |
435 |
} |
437 |
} |
436 |
|
438 |
|
437 |
static void iwl_pcie_apm_stop(struct iwl_trans *trans) |
439 |
static void iwl_pcie_apm_stop(struct iwl_trans *trans) |
438 |
{ |
440 |
{ |
439 |
IWL_DEBUG_INFO(trans, "Stop card, put in low power state\n"); |
|
|
440 |
|
441 |
|
441 |
clear_bit(STATUS_DEVICE_ENABLED, &trans->status); |
442 |
clear_bit(STATUS_DEVICE_ENABLED, &trans->status); |
|
|
443 |
IWL_DEBUG_INFO(trans, "Stop card, put in low power state ENABLED bit clear!\n"); |
442 |
|
444 |
|
443 |
/* Stop device's DMA activity */ |
445 |
/* Stop device's DMA activity */ |
444 |
iwl_pcie_apm_stop_master(trans); |
446 |
iwl_pcie_apm_stop_master(trans); |
Lines 911-917
static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
Link Here
|
911 |
* restart. So don't process again if the device is |
913 |
* restart. So don't process again if the device is |
912 |
* already dead. |
914 |
* already dead. |
913 |
*/ |
915 |
*/ |
914 |
if (test_bit(STATUS_DEVICE_ENABLED, &trans->status)) { |
916 |
if (test_and_clear_bit(STATUS_DEVICE_ENABLED, &trans->status)) { |
|
|
917 |
IWL_DEBUG_INFO(trans, "DEVICE_ENABLED bit was set and is now cleared\n"); |
915 |
iwl_pcie_tx_stop(trans); |
918 |
iwl_pcie_tx_stop(trans); |
916 |
iwl_pcie_rx_stop(trans); |
919 |
iwl_pcie_rx_stop(trans); |
917 |
|
920 |
|
Lines 920-925
static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
Link Here
|
920 |
APMG_CLK_VAL_DMA_CLK_RQT); |
923 |
APMG_CLK_VAL_DMA_CLK_RQT); |
921 |
udelay(5); |
924 |
udelay(5); |
922 |
} |
925 |
} |
|
|
926 |
IWL_DEBUG_INFO(trans, "DEVICE_ENABLED bit was already clearn\n"); |
923 |
|
927 |
|
924 |
/* Make sure (redundant) we've released our request to stay awake */ |
928 |
/* Make sure (redundant) we've released our request to stay awake */ |
925 |
iwl_clear_bit(trans, CSR_GP_CNTRL, |
929 |
iwl_clear_bit(trans, CSR_GP_CNTRL, |
Lines 941-947
static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
Link Here
|
941 |
/* clear all status bits */ |
945 |
/* clear all status bits */ |
942 |
clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status); |
946 |
clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status); |
943 |
clear_bit(STATUS_INT_ENABLED, &trans->status); |
947 |
clear_bit(STATUS_INT_ENABLED, &trans->status); |
944 |
clear_bit(STATUS_DEVICE_ENABLED, &trans->status); |
|
|
945 |
clear_bit(STATUS_TPOWER_PMI, &trans->status); |
948 |
clear_bit(STATUS_TPOWER_PMI, &trans->status); |
946 |
clear_bit(STATUS_RFKILL, &trans->status); |
949 |
clear_bit(STATUS_RFKILL, &trans->status); |
947 |
|
950 |
|