All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Pedro Francisco <pedrogfrancisco@gmail.com>
Cc: Tino Keitel <tino.keitel@tikei.de>,
	ML linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: Power saving features for iwl4965
Date: Wed, 31 Jul 2013 14:08:50 +0200	[thread overview]
Message-ID: <20130731120848.GA31732@redhat.com> (raw)
In-Reply-To: <CAJZjf_y9fnkHLp4YPdYY2sVo4r4+hKJcZAebJmjVKCBh-0EUtA@mail.gmail.com>

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

On Wed, Jul 17, 2013 at 12:48:30PM +0100, Pedro Francisco wrote:
> On Tue, Jul 16, 2013 at 11:27 AM, Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> >> I seem only to be able to trigger it with disable_hw_scan=0, I need
> >> further testing with disable_hw_scan=1 (I use disable_hw_scan=0
> >> because it prevents me from getting disconnected from eduroam Cisco
> >> APs -- haven't tested disable_hw_scan=0 since the VOIP-friendly SW
> >> scanning patch, however).
> >>
> >> Do you want the log anyway? (modprobe iwl3945 debug=0x47ffffff
> >> disable_hw_scan=0 and runtime PCI powersave also enabled -- I don't
> >> know if it matters).
> >
> > As this is not causing troubles with default disable_hw_scan option,
> > I'll post that patch.
> 
> My mistake, I can trigger error conditions _independently_ of
> disable_hw_scan option being enabled or disabled, as long as powersave
> is enabled.
> 
> I'll send you a private email with the logs.

I think I found bug which couse this firmware crash. We have only 5
queues so updating write_ptr for txq[5] can cause random value write
to HBUS_TARG_WRPTR register. I also added spin_lock to do not abuse
writes we do in tx skb.

Please test attached patch (with powersave on :-)

Stanislaw


[-- Attachment #2: iwlegacy_fix_wakeup_interrupt.patch --]
[-- Type: text/plain, Size: 818 bytes --]

diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index b37a582..afa5c6e 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -1495,12 +1495,14 @@ il3945_irq_tasklet(struct il_priv *il)
 	if (inta & CSR_INT_BIT_WAKEUP) {
 		D_ISR("Wakeup interrupt\n");
 		il_rx_queue_update_write_ptr(il, &il->rxq);
+
+		spin_lock_irqsave(&il->lock, flags);
 		il_txq_update_write_ptr(il, &il->txq[0]);
 		il_txq_update_write_ptr(il, &il->txq[1]);
 		il_txq_update_write_ptr(il, &il->txq[2]);
 		il_txq_update_write_ptr(il, &il->txq[3]);
 		il_txq_update_write_ptr(il, &il->txq[4]);
-		il_txq_update_write_ptr(il, &il->txq[5]);
+		spin_unlock_irqrestore(&il->lock, flags);
 
 		il->isr_stats.wakeup++;
 		handled |= CSR_INT_BIT_WAKEUP;

  reply	other threads:[~2013-07-31 12:05 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18 20:35 Power saving features for iwl4965 Tino Keitel
2012-04-19 14:25 ` Johannes Berg
2012-04-19 18:50   ` tino
2012-04-25 12:25 ` Stanislaw Gruszka
2012-05-03 18:28   ` Tino Keitel
2012-12-26 18:54     ` Tino Keitel
2013-01-07 11:08       ` Stanislaw Gruszka
2013-01-08  1:48         ` Pedro Francisco
2013-01-08  8:47           ` Stanislaw Gruszka
2013-06-03  8:52         ` Tino Keitel
2013-06-03 14:18           ` Stanislaw Gruszka
2013-06-09  0:28             ` Pedro Francisco
2013-06-10 19:31               ` Pedro Francisco
2013-06-11 16:19                 ` Stanislaw Gruszka
2013-06-11 18:55                   ` Tino Keitel
2013-06-14 12:50                   ` Pedro Francisco
2013-06-14 13:18                     ` Stanislaw Gruszka
2013-06-25 14:25                       ` Stanislaw Gruszka
2013-07-11 21:02                         ` Pedro Francisco
2013-07-16 10:27                           ` Stanislaw Gruszka
2013-07-16 11:02                             ` Pedro Francisco
2013-07-17 11:48                             ` Pedro Francisco
2013-07-31 12:08                               ` Stanislaw Gruszka [this message]
2013-08-04 14:24                                 ` Pedro Francisco
2013-08-04 14:53                                   ` Pedro Francisco
2013-10-17  9:06                                     ` Stanislaw Gruszka
2013-10-17 13:32                                       ` Stanislaw Gruszka
2013-06-11 18:51             ` Tino Keitel
2014-02-18 10:57               ` Stanislaw Gruszka
2014-02-18 11:32                 ` Emmanuel Grumbach
2014-02-18 11:59                   ` Stanislaw Gruszka
2014-02-20 12:08                 ` Pedro Francisco
2014-02-25 16:16                   ` Pedro Francisco
  -- strict thread matches above, loose matches on Subject: below --
2012-10-01 16:06 Tino Keitel

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=20130731120848.GA31732@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pedrogfrancisco@gmail.com \
    --cc=tino.keitel@tikei.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.