From owner-svn-src-head@FreeBSD.ORG Mon Mar 18 04:46:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D8214C43; Mon, 18 Mar 2013 04:46:17 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CAC113F6; Mon, 18 Mar 2013 04:46:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2I4kHfc094227; Mon, 18 Mar 2013 04:46:17 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2I4kHiM094224; Mon, 18 Mar 2013 04:46:17 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201303180446.r2I4kHiM094224@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 18 Mar 2013 04:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248456 - head/sys/dev/sis X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Mar 2013 04:46:17 -0000 Author: yongari Date: Mon Mar 18 04:46:17 2013 New Revision: 248456 URL: http://svnweb.freebsd.org/changeset/base/248456 Log: r119712 introduced SIS_TYPE_83816 but it was not actually set in driver such that checking against the type was always false. To detect NS DP83816, driver should have checked silicon revision register for NS controllers. While here, remove SIS_TYPE_83816 to not make the similar mistake again. Reported by: Brad Smith ( brad@openbsd ) Modified: head/sys/dev/sis/if_sis.c head/sys/dev/sis/if_sisreg.h Modified: head/sys/dev/sis/if_sis.c ============================================================================== --- head/sys/dev/sis/if_sis.c Mon Mar 18 02:29:57 2013 (r248455) +++ head/sys/dev/sis/if_sis.c Mon Mar 18 04:46:17 2013 (r248456) @@ -625,7 +625,7 @@ sis_miibus_statchg(device_t dev) SIS_CLRBIT(sc, SIS_RX_CFG, SIS_RXCFG_RX_TXPKTS); } - if (sc->sis_type == SIS_TYPE_83816) { + if (sc->sis_type == SIS_TYPE_83815 && sc->sis_srr >= NS_SRR_16A) { /* * MPII03.D: Half Duplex Excessive Collisions. * Also page 49 in 83816 manual @@ -1989,7 +1989,7 @@ sis_initl(struct sis_softc *sc) return; } - if (sc->sis_type == SIS_TYPE_83815 || sc->sis_type == SIS_TYPE_83816) { + if (sc->sis_type == SIS_TYPE_83815) { if (sc->sis_manual_pad != 0) sc->sis_flags |= SIS_FLAG_MANUAL_PAD; else Modified: head/sys/dev/sis/if_sisreg.h ============================================================================== --- head/sys/dev/sis/if_sisreg.h Mon Mar 18 02:29:57 2013 (r248455) +++ head/sys/dev/sis/if_sisreg.h Mon Mar 18 04:46:17 2013 (r248456) @@ -439,7 +439,6 @@ struct sis_type { #define SIS_TYPE_900 1 #define SIS_TYPE_7016 2 #define SIS_TYPE_83815 3 -#define SIS_TYPE_83816 4 struct sis_txdesc { struct mbuf *tx_m;