NetBSD Problem Report #53858

From www@NetBSD.org  Thu Jan 10 21:19:55 2019
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 12B537A1E3
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 10 Jan 2019 21:19:55 +0000 (UTC)
Message-Id: <20190110211954.0DE8D7A284@mollari.NetBSD.org>
Date: Thu, 10 Jan 2019 21:19:54 +0000 (UTC)
From: tho@useless-ficus.net
Reply-To: tho@useless-ficus.net
To: gnats-bugs@NetBSD.org
Subject: typo in sys/dev/ic/rtl8169.c: inverted IM_HW logic
X-Send-Pr-Version: www-1.0

>Number:         53858
>Category:       kern
>Synopsis:       typo in sys/dev/ic/rtl8169.c: inverted IM_HW logic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 10 21:20:00 +0000 2019
>Closed-Date:    Mon Jan 14 06:11:47 +0000 2019
>Last-Modified:  Mon Jan 14 06:11:47 +0000 2019
>Originator:     Anthony Mallet
>Release:        -current
>Organization:
>Environment:
NetBSD 8.99.30: Thu Jan 10 22:09:44 CET 2019
>Description:
After upgrading to a newer kernel using rev 1.155 of
sys/dev/ic/rtl8169.c, I experienced a lot of "re%d: watchdog timeout"
(every couple of minutes or so). I have a PCIe re(4) 8169 with hardware interrupt moderation flag set.

Looking at cvs diff -r 1.154 -r 1.155 rtl8169.c, I think there is a typo
in rev. 1.155. (inverted IM_HW test).

The attached patch fixes (so far) the "watchdog timeout" for me.

>How-To-Repeat:

>Fix:
Index: sys/dev/ic/rtl8169.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/rtl8169.c,v
retrieving revision 1.155
diff -u -r1.155 rtl8169.c
--- sys/dev/ic/rtl8169.c        13 Nov 2018 10:51:49 -0000      1.155
+++ sys/dev/ic/rtl8169.c        10 Jan 2019 21:11:54 -0000
@@ -1949,7 +1949,7 @@
         */
        defer = 128000;

-       if ((sc->sc_quirk & RTKQ_IM_HW) == 0) {
+       if ((sc->sc_quirk & RTKQ_IM_HW) != 0) {
                period = 1;
                defer = 0;
        } else if ((sc->sc_quirk & RTKQ_PCIE) != 0) {

>Release-Note:

>Audit-Trail:
From: "Michael van Elst" <mlelstv@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53858 CVS commit: src/sys/dev/ic
Date: Thu, 10 Jan 2019 23:01:57 +0000

 Module Name:	src
 Committed By:	mlelstv
 Date:		Thu Jan 10 23:01:57 UTC 2019

 Modified Files:
 	src/sys/dev/ic: rtl8169.c

 Log Message:
 Fix handling of RTKQ_IM_HW quirk, the check was inverted.

 Found by tho@useless-ficus.net, thanks.
 Fixes PR/53858.


 To generate a diff of this commit:
 cvs rdiff -u -r1.155 -r1.156 src/sys/dev/ic/rtl8169.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Anthony Mallet <tho@useless-ficus.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/53858 CVS commit: src/sys/dev/ic
Date: Fri, 11 Jan 2019 00:12:57 +0100

 Thanks!

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 14 Jan 2019 06:11:47 +0000
State-Changed-Why:
committed, thanks


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.