Skip to contentSkip to conversation

r8169: fix cable re-plugging issue

PATCH In review Heiner Kallweit 2 participants 2 messages Mar 22, 2019 – Mar 24, 2019

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 r8169: fix cable re-plugging issue

Bartek reported that after few cable unplug/replug cycles suddenly replug isn't detected any longer. His system uses a RTL8106, I wasn't able to reproduce the issue with RTL8168g. According to his bisect the referenced commit caused the regression. As Realtek doesn't release datasheets or errata it's hard to say what's the actual root cause, but this change was reported to fix the issue.

Fixes 38caff5a445b ("r8169: handle all interrupt events in the hard irq handler")
---
 drivers/net/ethernet/realtek/r8169.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169.c +1 -1
index a542cd121..a8ca26c2a 100644
@@ -6542,7 +6542,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
 		set_bit(RTL_FLAG_TASK_RESET_PENDING, tp->wk.flags);
 	}
 
-	if (status & RTL_EVENT_NAPI) {
+	if (status & (RTL_EVENT_NAPI | LinkChg)) {
 		rtl_irq_disable(tp);
 		napi_schedule_irqoff(&tp->napi);
 	}
Signature · 1 line
2.21.0
maintainer
#1 lore raw

From: Heiner Kallweit <[email protected]>
Date: Fri, 22 Mar 2019 07:39:35 +0100

Quoted 7 lines

Bartek reported that after few cable unplug/replug cycles suddenly replug isn't detected any longer. His system uses a RTL8106, I wasn't able to reproduce the issue with RTL8168g. According to his bisect the referenced commit caused the regression. As Realtek doesn't release datasheets or errata it's hard to say what's the actual root cause, but this change was reported to fix the issue.

Quoted 5 lines
Fixes 38caff5a445b ("r8169: handle all interrupt events in the hard irq handler")

Applied and queued up for -stable, thanks Heiner.