From f87ea968d0ad95d9e1e1eb32f7295052afde246d Mon Sep 17 00:00:00 2001 From: yongari Date: Wed, 15 May 2013 01:05:16 +0000 Subject: [PATCH] MFC r248456: 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. git-svn-id: svn://svn.freebsd.org/base/stable/9@250646 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/dev/sis/if_sis.c | 4 ++-- sys/dev/sis/if_sisreg.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c index d9cd08c6c..77408ed20 100644 --- a/sys/dev/sis/if_sis.c +++ b/sys/dev/sis/if_sis.c @@ -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 @@ -1990,7 +1990,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 diff --git a/sys/dev/sis/if_sisreg.h b/sys/dev/sis/if_sisreg.h index b4008065e..6256fde33 100644 --- a/sys/dev/sis/if_sisreg.h +++ b/sys/dev/sis/if_sisreg.h @@ -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; -- 2.45.0