]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iwlwifi: reset card during probe
authorReinette Chatre <reinette.chatre@intel.com>
Wed, 3 Feb 2010 17:38:59 +0000 (09:38 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:16:06 +0000 (11:16 -0700)
commit 4843b5a731b31916d100cfc5ba4d03ae78462ed9 upstream.

To ensure that card is in a sane state during probe we add a reset call.
This change was prompted by users of kdump who was not able to bring up the
wireless driver in the kdump kernel. The problem here was that the primary
kernel, which is not running at the time, left the wireless card up and
running. When the kdump kernel starts it is thus possible to immediately
receive interrupts from firmware after registering interrupt, but without
being ready to deal with interrupts from firmware yet.

Reported-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

index 5622a55a939e92e014ff26fc8cd44c046b7bdfe6..664dcd5b54683c6bd49ae8bc9e67ca9bab1cd8a6 100644 (file)
@@ -3365,6 +3365,14 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
         */
        spin_lock_init(&priv->reg_lock);
        spin_lock_init(&priv->lock);
+
+       /*
+        * stop and reset the on-board processor just in case it is in a
+        * strange state ... like being left stranded by a primary kernel
+        * and this is now the kdump kernel trying to start up
+        */
+       iwl_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET);
+
        iwl_hw_detect(priv);
        IWL_INFO(priv, "Detected Intel Wireless WiFi Link %s REV=0x%X\n",
                priv->cfg->name, priv->hw_rev);
index adbb3ea4d865f6bfc411d1536b32dabf7fd1249e..ca0fb8bbbe9b34240f43eae893a4eeac132a3323 100644 (file)
@@ -4022,6 +4022,13 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
        spin_lock_init(&priv->reg_lock);
        spin_lock_init(&priv->lock);
 
+       /*
+        * stop and reset the on-board processor just in case it is in a
+        * strange state ... like being left stranded by a primary kernel
+        * and this is now the kdump kernel trying to start up
+        */
+       iwl_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET);
+
        /***********************
         * 4. Read EEPROM
         * ********************/