Commit 309e731a authored by Ben Cahill's avatar Ben Cahill Committed by John W. Linville

iwlwifi: MAC_ACCESS_REQ cleanup

Add txq_id info to "Tx queue requesting wakeup" debug message

Add "Rx queue requesting wakeup" debug message

Move clear of CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ to be after nearby
iwl_write_prph(), since iwl_write_prph() sets it and clears it.  Almost
removed it entirely, but just making sure in case someone removes the
iwl_write_prph()!  Also remove unneeded priv->lock usage; this is now
handled by priv->reg_lock within iwl_clear_bit().

Join a couple of lines that had unneeded line returns.
Signed-off-by: default avatarBen Cahill <ben.m.cahill@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f060face
...@@ -1934,19 +1934,17 @@ static void __iwl_down(struct iwl_priv *priv) ...@@ -1934,19 +1934,17 @@ static void __iwl_down(struct iwl_priv *priv)
/* device going down, Stop using ICT table */ /* device going down, Stop using ICT table */
iwl_disable_ict(priv); iwl_disable_ict(priv);
spin_lock_irqsave(&priv->lock, flags);
iwl_clear_bit(priv, CSR_GP_CNTRL,
CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
spin_unlock_irqrestore(&priv->lock, flags);
iwl_txq_ctx_stop(priv); iwl_txq_ctx_stop(priv);
iwl_rxq_stop(priv); iwl_rxq_stop(priv);
iwl_write_prph(priv, APMG_CLK_DIS_REG, /* Power-down device's busmaster DMA clocks */
APMG_CLK_VAL_DMA_CLK_RQT); iwl_write_prph(priv, APMG_CLK_DIS_REG, APMG_CLK_VAL_DMA_CLK_RQT);
udelay(5); udelay(5);
/* Make sure (redundant) we've released our request to stay awake */
iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
/* Stop the device, and put it in low power state */ /* Stop the device, and put it in low power state */
priv->cfg->ops->lib->apm_ops.stop(priv); priv->cfg->ops->lib->apm_ops.stop(priv);
......
...@@ -140,6 +140,8 @@ int iwl_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl_rx_queue *q) ...@@ -140,6 +140,8 @@ int iwl_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl_rx_queue *q)
reg = iwl_read32(priv, CSR_UCODE_DRV_GP1); reg = iwl_read32(priv, CSR_UCODE_DRV_GP1);
if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) {
IWL_DEBUG_INFO(priv, "Rx queue requesting wakeup, GP1 = 0x%x\n",
reg);
iwl_set_bit(priv, CSR_GP_CNTRL, iwl_set_bit(priv, CSR_GP_CNTRL,
CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
goto exit_unlock; goto exit_unlock;
......
...@@ -96,7 +96,8 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq) ...@@ -96,7 +96,8 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
reg = iwl_read32(priv, CSR_UCODE_DRV_GP1); reg = iwl_read32(priv, CSR_UCODE_DRV_GP1);
if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) {
IWL_DEBUG_INFO(priv, "Requesting wakeup, GP1 = 0x%x\n", reg); IWL_DEBUG_INFO(priv, "Tx queue %d requesting wakeup, GP1 = 0x%x\n",
txq_id, reg);
iwl_set_bit(priv, CSR_GP_CNTRL, iwl_set_bit(priv, CSR_GP_CNTRL,
CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
return ret; return ret;
......
...@@ -2600,9 +2600,8 @@ static void __iwl3945_down(struct iwl_priv *priv) ...@@ -2600,9 +2600,8 @@ static void __iwl3945_down(struct iwl_priv *priv)
iwl3945_hw_txq_ctx_stop(priv); iwl3945_hw_txq_ctx_stop(priv);
iwl3945_hw_rxq_stop(priv); iwl3945_hw_rxq_stop(priv);
iwl_write_prph(priv, APMG_CLK_DIS_REG, /* Power-down device's busmaster DMA clocks */
APMG_CLK_VAL_DMA_CLK_RQT); iwl_write_prph(priv, APMG_CLK_DIS_REG, APMG_CLK_VAL_DMA_CLK_RQT);
udelay(5); udelay(5);
/* Stop the device, and put it in low power state */ /* Stop the device, and put it in low power state */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment