linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jes Sorensen <jes@sgi.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Dan Williams <dcbw@redhat.com>,
	yi.zhu@intel.com, linux-wireless@vger.kernel.org,
	Tomas Winkler <tomas.winkler@intel.com>
Subject: Re: iwl4965 detection problem
Date: Fri, 26 Oct 2007 16:10:39 +0200	[thread overview]
Message-ID: <4721F55F.1030303@sgi.com> (raw)
In-Reply-To: <4721E17E.2020908@sgi.com>

[-- Attachment #1: Type: text/plain, Size: 839 bytes --]

Jes Sorensen wrote:
> At least it's consistent here as opposed to sometimes.
> 
> One thing I noted is that rmmod often takes a few seconds, no idea
> if it has any value?

Ok,

I think I have an idea at whats going on - loading the module with debug
info revealed that it ended up straight in the interrupt handler the
moment the driver called request_irq(), but obviously before it was
ready to handle the interrupt in question. The net result was that it
didn't get to the loading of the ucode.

Unloading the module meant a call was made to iwl_disable_interrupts()
so on the next load, all pending interrupts in the chip had been cleared
and we didn't see this spurious interrupt.

I haven't had a chance to build the driver with this change, ie. it's
untested, but I have a suspicion that this patch might do the job.

Cheers,
Jes



[-- Attachment #2: iwl4965-irq-fix.diff --]
[-- Type: text/plain, Size: 707 bytes --]

Disable interrupts in the iwl4965 before calling request_irq() for
the case that the previous OS or the BIOS left a pending interrupt in
the chip. This behavior has been observed on some laptops such as T61
Thinkpads and Toshiba Portege R500

Signed-off-by: Jes Sorensen <jes@sgi.com>

--- linux/drivers/net/wireless/iwlwifi/iwl4965-base.c~	2007-10-26 06:49:02.000000000 +0200
+++ linux/drivers/net/wireless/iwlwifi/iwl4965-base.c	2007-10-26 16:03:40.387241088 +0200
@@ -9090,6 +9090,8 @@
 	priv->power_mode = IWL_POWER_AC;
 	priv->user_txpower_limit = IWL_DEFAULT_TX_POWER;
 
+	iwl_disable_interrupts(priv);
+
 	pci_enable_msi(pdev);
 
 	err = request_irq(pdev->irq, iwl_isr, IRQF_SHARED, DRV_NAME, priv);

  reply	other threads:[~2007-10-26 14:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 13:37 iwl4965 detection problem Jes Sorensen
2007-10-25 13:45 ` Dan Williams
2007-10-25 14:15   ` Jes Sorensen
2007-10-25 17:32     ` Dan Williams
2007-10-26  8:05       ` Jes Sorensen
2007-10-26 12:30         ` John W. Linville
2007-10-26 12:45           ` Jes Sorensen
2007-10-26 14:10             ` Jes Sorensen [this message]
2007-10-26 14:41               ` John W. Linville
2007-10-26 14:43                 ` Jes Sorensen
2007-10-26 15:17               ` Jes Sorensen
2007-10-26 15:23                 ` dragoran
2007-10-26 16:50                   ` John W. Linville
2007-10-29  1:14               ` Zhu Yi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4721F55F.1030303@sgi.com \
    --to=jes@sgi.com \
    --cc=dcbw@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=tomas.winkler@intel.com \
    --cc=yi.zhu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).