From owner-freebsd-bugs@FreeBSD.ORG Tue Feb 12 21:50:07 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7042916A4A5 for ; Tue, 12 Feb 2008 21:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6397813C4DD for ; Tue, 12 Feb 2008 21:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1CLo7x5080790 for ; Tue, 12 Feb 2008 21:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1CLo7pv080789; Tue, 12 Feb 2008 21:50:07 GMT (envelope-from gnats) Date: Tue, 12 Feb 2008 21:50:07 GMT Message-Id: <200802122150.m1CLo7pv080789@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Volker Cc: Subject: Re: kern/112179: [sis] [patch] sis driver for natsemi DP83815D autonegotiate failure X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Volker List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2008 21:50:07 -0000 The following reply was made to PR kern/112179; it has been noted by GNATS. From: Volker To: bug-followup@FreeBSD.org, mark@hydrus.org.uk Cc: Subject: Re: kern/112179: [sis] [patch] sis driver for natsemi DP83815D autonegotiate failure Date: Tue, 12 Feb 2008 22:42:30 +0100 Mark, is this problem still valid for you? Can you please check with 6.3-RELEASE? This problem _might_ be the same as PR kern/64556 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/64556 Nevertheless, without knowing anything about the chipset in question, the patch is awful, as it double checks the condition: if (sc->sis_type == SIS_TYPE_83815 && sc->sis_srr <= NS_SRR_15D) { // we're getting here only, if sis_srr is less or equal NS_SRR_15D CSR_WRITE_4(sc, NS_PHY_PAGE, 0x0001); CSR_WRITE_4(sc, NS_PHY_CR, 0x189C); - if (sc->sis_srr == NS_SRR_15C) { + if (sc->sis_srr <= NS_SRR_15D) { // and here we're checking for the same value? // the piece of code is not reached if sis_srr is > NS_SRR_15D, so it's a wasted 'if' construction