You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Banana Pi R64 with a MikroTik R11e-5HnD Mini-PCIE (AR9580) card. On OpenWrt 22.03 and snapshot this devices crashes completely. Sometimes when I enable the card with ip link set dev wlan1 up it will crash. However, sometimes this works but when a scan iw dev wlan1 scan crashes it.
After further debugging we know the place it hangs.
In function:
static int ath_reset_internal (struct ath_softc *sc, struct ath9k_channel *hchan)
{
disable_irq(sc->irq);
tasklet_disable(&sc->intr_tq);
tasklet_disable(&sc->bcon_tasklet);
spin_lock_bh(&sc->sc_pcu_lock);
....
....
....
if (!ath_complete_reset(sc, true)) -> This function enables hardware interrupts
r = -EIO;
out:
enable_irq(sc->irq); -> Here IRQ line state is changed to enable state
spin_unlock_bh(&sc->sc_pcu_lock);
tasklet_enable(&sc->bcon_tasklet);
tasklet_enable(&sc->intr_tq);
}
static bool ath_complete_reset(struct ath_softc *sc, bool start)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
unsigned long flags;
ath9k_calculate_summary_state(sc, sc->cur_chan);
ath_startrecv(sc);
....
....
sc->gtt_cnt = 0;
ath9k_hw_set_interrupts(ah); -> Here hardware interrupts are being enabled
ath9k_hw_enable_interrupts(ah); -> We see hang after this line
ieee80211_wake_queues(sc->hw);
ath9k_p2p_ps_timer(sc);
return true;
}
Before changing IRQ line to to enabled state, hardware interrupts are being enabled.
Wont this cause a race condition where within this period of hardware raises an interrupt, but IRQ line state is disabled state, this will
reach the following condition making EP handler not being invoked.
void handle_simple_irq(struct irq_desc *desc)
{
raw_spin_lock(&desc->lock);
...
if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { // This condition is reaching and becoming true.
desc->istate |= IRQS_PENDING;
goto out_unlock;
}
kstat_incr_irqs_this_cpu(desc);
handle_irq_event(desc);
out_unlock:
raw_spin_unlock(&desc->lock);
}
We see hang at that statement, without reaching back enable_irq, looks like by this time CPU is in stall.
Can any tell why hardware interrupts are being enabled before kernel changing IRQ line state?
I have a Banana Pi R64 with a MikroTik R11e-5HnD Mini-PCIE (AR9580) card. On OpenWrt 22.03 and snapshot this devices crashes completely. Sometimes when I enable the card with
ip link set dev wlan1 up
it will crash. However, sometimes this works but when a scaniw dev wlan1 scan
crashes it.The log looks like this:
There is already a complete email thread about it:
https://lists.archive.carbon60.com/linux/kernel/2584449
In the last post someone even finds the line where the stall happens:
However, noone responded to this mail.
Maybe it is also some drawback of the banana pi r64 not able to deliver enough power:
https://forum.banana-pi.org/t/bpi-r64-possible-hardware-improvements/12711/6?u=schnickidischnack
With a
Compex WLE200NX
(AR9280) it is working.The text was updated successfully, but these errors were encountered: