kern/112179: [sis] [patch] sis driver for natsemi DP83815D autonegotiate failure

Volker volker at vwsoft.com
Tue Feb 12 21:50:07 UTC 2008


The following reply was made to PR kern/112179; it has been noted by GNATS.

From: Volker <volker at vwsoft.com>
To: bug-followup at FreeBSD.org, mark at 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


More information about the freebsd-bugs mailing list