Re: [PATCH net-next 3/4] r8152: Add irq mitigation for RTL8157/9

Andrew Lunn
2026-04-29T01:56:29Z

On Tue, Apr 28, 2026 at 05:47:23AM +0200, Birger Koblitz wrote:
> Add interrupt mitigation code for both RTL8157 and RTL8159 that prevents
> USB interrupt callbacks with urb->status ESHUTDOWN being triggered. While the
> issue is rarely seen on the RTL8157, without the mitigation, it is
> common on the RTL8159:
> [273.561863] r8152 7-1:1.0 enx88c9b3b5xxxx: Stop submitting intr, status -108
>
> Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
> ---
> drivers/net/usb/r8152.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 8255261d73148a7b4dabe0188faf07cb1f356437..08cc3c1dae0facb2400890ba4d093c97ed56d40b 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -8444,6 +8444,12 @@ static void r8156_init(struct r8152 *tp)
> else
> r8153_u2p3en(tp, false);
>
> + if (tp->version >= RTL_VER_16) {
> + /* Disable Interrupt Mitigation */
> + ocp_byte_clr_bits(tp, MCU_TYPE_USB, 0xcf04,
> + BIT(0) | BIT(1) | BIT(2) | BIT(7));
> + }

What does interrupt mitigation do?

Is this a different name for interrupt coalescence, where the MAC
delays interrupts for a period of time so more packets are in the
receive ring when it does interrupt, so reducing the number of
interrupts, and bigger bursts of packets are processed at once?

Andrew