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 --- 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 2a07dde289e2240b221664ae5c5bceec35b5a1ef..9fcad3dac76f8aa76ef074cabd3b08348dc234bc 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -8452,6 +8452,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)); + } + /* MSC timer = 0xfff * 8ms = 32760 ms */ ocp_write_word(tp, MCU_TYPE_USB, USB_MSC_TIMER, 0x0fff); -- 2.47.3