Skip to content

Commit 5939636

Browse files
BrainSlayerjeff-t-johnson
authored andcommitted
wil6210: fix support for sparrow chipsets
the wil6210 driver irq handling code is unconditionally writing edma irq registers which are supposed to be only used on Talyn chipsets. This however leade to a chipset hang on the older sparrow chipset generation and firmware will not even boot. Fix that by simply checking for edma support before handling these registers. Tested on Netgear R9000 Signed-off-by: Sebastian Gottschall <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jeff Johnson <[email protected]>
1 parent dc9c425 commit 5939636

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

drivers/net/wireless/ath/wil6210/interrupt.c

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ void wil_mask_irq(struct wil6210_priv *wil)
179179
wil_dbg_irq(wil, "mask_irq\n");
180180

181181
wil6210_mask_irq_tx(wil);
182-
wil6210_mask_irq_tx_edma(wil);
182+
if (wil->use_enhanced_dma_hw)
183+
wil6210_mask_irq_tx_edma(wil);
183184
wil6210_mask_irq_rx(wil);
184-
wil6210_mask_irq_rx_edma(wil);
185+
if (wil->use_enhanced_dma_hw)
186+
wil6210_mask_irq_rx_edma(wil);
185187
wil6210_mask_irq_misc(wil, true);
186188
wil6210_mask_irq_pseudo(wil);
187189
}
@@ -190,10 +192,12 @@ void wil_unmask_irq(struct wil6210_priv *wil)
190192
{
191193
wil_dbg_irq(wil, "unmask_irq\n");
192194

193-
wil_w(wil, RGF_DMA_EP_RX_ICR + offsetof(struct RGF_ICR, ICC),
194-
WIL_ICR_ICC_VALUE);
195-
wil_w(wil, RGF_DMA_EP_TX_ICR + offsetof(struct RGF_ICR, ICC),
196-
WIL_ICR_ICC_VALUE);
195+
if (wil->use_enhanced_dma_hw) {
196+
wil_w(wil, RGF_DMA_EP_RX_ICR + offsetof(struct RGF_ICR, ICC),
197+
WIL_ICR_ICC_VALUE);
198+
wil_w(wil, RGF_DMA_EP_TX_ICR + offsetof(struct RGF_ICR, ICC),
199+
WIL_ICR_ICC_VALUE);
200+
}
197201
wil_w(wil, RGF_DMA_EP_MISC_ICR + offsetof(struct RGF_ICR, ICC),
198202
WIL_ICR_ICC_MISC_VALUE);
199203
wil_w(wil, RGF_INT_GEN_TX_ICR + offsetof(struct RGF_ICR, ICC),
@@ -845,10 +849,12 @@ void wil6210_clear_irq(struct wil6210_priv *wil)
845849
offsetof(struct RGF_ICR, ICR));
846850
wil_clear32(wil->csr + HOSTADDR(RGF_DMA_EP_TX_ICR) +
847851
offsetof(struct RGF_ICR, ICR));
848-
wil_clear32(wil->csr + HOSTADDR(RGF_INT_GEN_RX_ICR) +
849-
offsetof(struct RGF_ICR, ICR));
850-
wil_clear32(wil->csr + HOSTADDR(RGF_INT_GEN_TX_ICR) +
851-
offsetof(struct RGF_ICR, ICR));
852+
if (wil->use_enhanced_dma_hw) {
853+
wil_clear32(wil->csr + HOSTADDR(RGF_INT_GEN_RX_ICR) +
854+
offsetof(struct RGF_ICR, ICR));
855+
wil_clear32(wil->csr + HOSTADDR(RGF_INT_GEN_TX_ICR) +
856+
offsetof(struct RGF_ICR, ICR));
857+
}
852858
wil_clear32(wil->csr + HOSTADDR(RGF_DMA_EP_MISC_ICR) +
853859
offsetof(struct RGF_ICR, ICR));
854860
wmb(); /* make sure write completed */

0 commit comments

Comments
 (0)