2008-12-01 15:53:56

by Helmut Schaa

[permalink] [raw]
Subject: [PATCH] iwl3945: remove obsolete irq handling

3945 hardware does not emit the interrupts CSR_INT_BIT_RF_KILL (rfkill
toggled) and CSR_INT_BIT_CT_KILL (adapter too hot). Hence this part of code
can be removed since iwl3945_irq_tasklet does not handle 4965 hw at all.

Signed-off-by: Helmut Schaa <[email protected]>
---

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 490bc4a..b32b507 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -4321,35 +4321,6 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv)
/* Safely ignore these bits for debug checks below */
inta &= ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE);

- /* HW RF KILL switch toggled (4965 only) */
- if (inta & CSR_INT_BIT_RF_KILL) {
- int hw_rf_kill = 0;
- if (!(iwl3945_read32(priv, CSR_GP_CNTRL) &
- CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW))
- hw_rf_kill = 1;
-
- IWL_DEBUG(IWL_DL_INFO | IWL_DL_RF_KILL | IWL_DL_ISR,
- "RF_KILL bit toggled to %s.\n",
- hw_rf_kill ? "disable radio" : "enable radio");
-
- /* Queue restart only if RF_KILL switch was set to "kill"
- * when we loaded driver, and is now set to "enable".
- * After we're Alive, RF_KILL gets handled by
- * iwl3945_rx_card_state_notif() */
- if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
- clear_bit(STATUS_RF_KILL_HW, &priv->status);
- queue_work(priv->workqueue, &priv->restart);
- }
-
- handled |= CSR_INT_BIT_RF_KILL;
- }
-
- /* Chip got too hot and stopped itself (4965 only) */
- if (inta & CSR_INT_BIT_CT_KILL) {
- IWL_ERROR("Microcode CT kill error detected.\n");
- handled |= CSR_INT_BIT_CT_KILL;
- }
-
/* Error detected by uCode */
if (inta & CSR_INT_BIT_SW_ERR) {
IWL_ERROR("Microcode SW error detected. Restarting 0x%X.\n",


2008-12-05 15:25:07

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH] iwl3945: remove obsolete irq handling

On Mon, Dec 01, 2008 at 04:53:28PM +0100, Helmut Schaa wrote:
> 3945 hardware does not emit the interrupts CSR_INT_BIT_RF_KILL (rfkill
> toggled) and CSR_INT_BIT_CT_KILL (adapter too hot). Hence this part of code
> can be removed since iwl3945_irq_tasklet does not handle 4965 hw at all.
That's correct.


> Signed-off-by: Helmut Schaa <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>

> ---
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> index 490bc4a..b32b507 100644
> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> @@ -4321,35 +4321,6 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv)
> /* Safely ignore these bits for debug checks below */
> inta &= ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE);
>
> - /* HW RF KILL switch toggled (4965 only) */
> - if (inta & CSR_INT_BIT_RF_KILL) {
> - int hw_rf_kill = 0;
> - if (!(iwl3945_read32(priv, CSR_GP_CNTRL) &
> - CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW))
> - hw_rf_kill = 1;
> -
> - IWL_DEBUG(IWL_DL_INFO | IWL_DL_RF_KILL | IWL_DL_ISR,
> - "RF_KILL bit toggled to %s.\n",
> - hw_rf_kill ? "disable radio" : "enable radio");
> -
> - /* Queue restart only if RF_KILL switch was set to "kill"
> - * when we loaded driver, and is now set to "enable".
> - * After we're Alive, RF_KILL gets handled by
> - * iwl3945_rx_card_state_notif() */
> - if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
> - clear_bit(STATUS_RF_KILL_HW, &priv->status);
> - queue_work(priv->workqueue, &priv->restart);
> - }
> -
> - handled |= CSR_INT_BIT_RF_KILL;
> - }
> -
> - /* Chip got too hot and stopped itself (4965 only) */
> - if (inta & CSR_INT_BIT_CT_KILL) {
> - IWL_ERROR("Microcode CT kill error detected.\n");
> - handled |= CSR_INT_BIT_CT_KILL;
> - }
> -
> /* Error detected by uCode */
> if (inta & CSR_INT_BIT_SW_ERR) {
> IWL_ERROR("Microcode SW error detected. Restarting 0x%X.\n",
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Intel Open Source Technology Centre
http://oss.intel.com/