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

Mark Willson mark at hydrus.org.uk
Wed Feb 13 17:20:03 UTC 2008


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

From: Mark Willson <mark at hydrus.org.uk>
To: bug-followup at FreeBSD.org, mark at hydrus.org.uk, volker at vwsoft.com
Cc:  
Subject: Re: kern/112179: [sis] [patch] sis driver for natsemi DP83815D autonegotiate failure
Date: Wed, 13 Feb 2008 16:46:18 GMT

 > Date: Tue, 12 Feb 2008 22:42:30 +0100
 > From: Volker <volker at vwsoft.com>
 > Subject: Re: kern/112179: [sis] [patch] sis driver for natsemi DP83815D autonegotiate
 >  failure
 >
 > 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
 >
 
 Volker,
 
 Thanks for your mail.  I'm travelling at the moment and don't have access
 to the machine to try this out until the weekend.  I will provide feedback
 then.
 
 I agree that 112179 might be the same as 64556, but I'm not really
 sure.
 
 And I also agree the patch is lousy; I made the smallest textual
 change compatible with fixing the problem.  Dropping the extra test
 would be much better.  I'm afraid I know nothing about the chip set
 either, the fix was cribbed from the Linux driver.
 
 -mark


More information about the freebsd-bugs mailing list