Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171358
b: refs/heads/master
c: 5220af0
h: refs/heads/master
v: v3
  • Loading branch information
Ben Cahill authored and John W. Linville committed Nov 2, 2009
1 parent 21356ed commit 819965f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ebeb5a676c864acf59caa166b3cc0a13b7cff93
refs/heads/master: 5220af0c3b44f5d6e32661e5bb49154c514dbf4f
26 changes: 13 additions & 13 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1353,39 +1353,39 @@ EXPORT_SYMBOL(iwl_irq_handle_error);

int iwl_apm_stop_master(struct iwl_priv *priv)
{
unsigned long flags;

spin_lock_irqsave(&priv->lock, flags);
int ret = 0;

/* set stop master bit */
/* stop device's busmaster DMA activity */
iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER);

iwl_poll_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_MASTER_DISABLED,
ret = iwl_poll_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_MASTER_DISABLED,
CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
if (ret)
IWL_WARN(priv, "Master Disable Timed Out, 100 usec\n");

spin_unlock_irqrestore(&priv->lock, flags);
IWL_DEBUG_INFO(priv, "stop master\n");

return 0;
return ret;
}
EXPORT_SYMBOL(iwl_apm_stop_master);

void iwl_apm_stop(struct iwl_priv *priv)
{
unsigned long flags;

IWL_DEBUG_INFO(priv, "Stop card, put in low power state\n");

/* Stop device's DMA activity */
iwl_apm_stop_master(priv);

spin_lock_irqsave(&priv->lock, flags);

/* Reset the entire device */
iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);

udelay(10);
/* clear "init complete" move adapter D0A* --> D0U state */

/*
* Clear "initialization complete" bit to move adapter from
* D0A* (powered-up Active) --> D0U* (Uninitialized) state.
*/
iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
spin_unlock_irqrestore(&priv->lock, flags);
}
EXPORT_SYMBOL(iwl_apm_stop);

Expand Down

0 comments on commit 819965f

Please sign in to comment.