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@xxxxxxxxxx> 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
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;