Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/dev/pci Pull up revision 1.91 (requested by fair in...
details: https://anonhg.NetBSD.org/src/rev/b37f243f3703
branches: netbsd-2-0
changeset: 561121:b37f243f3703
user: tron <tron%NetBSD.org@localhost>
date: Fri May 28 07:10:38 2004 +0000
description:
Pull up revision 1.91 (requested by fair in ticket #296):
Two changes:
1. ifdef out the restriction that the SiS 900 has only one PHY
This is demonstrably false; the SiS 960 super south bridge in
PR 18590 has a SiS 900 rev 1 core in it.
2. bitbang the MII for all versions of the SiS 900; this is the
only way that the PHYs on this system answer.
Also, I suspect that SIS900_REV_960 constant in if_sipreg.h is
incorrectly labelled - there were later revisions of the super
south bridge (e.g. the 961, 962, and 963), and I suspect the
SiS 900 revision code there refers to one of those.
diffstat:
sys/dev/pci/if_sip.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (62 lines):
diff -r 10d7c8f94155 -r b37f243f3703 sys/dev/pci/if_sip.c
--- a/sys/dev/pci/if_sip.c Wed May 26 20:16:13 2004 +0000
+++ b/sys/dev/pci/if_sip.c Fri May 28 07:10:38 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_sip.c,v 1.87 2004/01/11 09:07:56 cube Exp $ */
+/* $NetBSD: if_sip.c,v 1.87.2.1 2004/05/28 07:10:38 tron Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.87 2004/01/11 09:07:56 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.87.2.1 2004/05/28 07:10:38 tron Exp $");
#include "bpfilter.h"
#include "rnd.h"
@@ -3070,17 +3070,18 @@
* The PHY of recent SiS chipsets is accessed through bitbang
* operations.
*/
- if (sc->sc_model->sip_product == PCI_PRODUCT_SIS_900 &&
- sc->sc_rev >= SIS_REV_635)
+ if (sc->sc_model->sip_product == PCI_PRODUCT_SIS_900)
return (mii_bitbang_readreg(self, &SIP_DECL(mii_bitbang_ops),
phy, reg));
+#ifndef SIS900_MII_RESTRICT
/*
* The SiS 900 has only an internal PHY on the MII. Only allow
* MII address 0.
*/
if (sc->sc_model->sip_product == PCI_PRODUCT_SIS_900 && phy != 0)
return (0);
+#endif
bus_space_write_4(sc->sc_st, sc->sc_sh, SIP_ENPHY,
(phy << ENPHY_PHYADDR_SHIFT) | (reg << ENPHY_REGADDR_SHIFT) |
@@ -3102,19 +3103,20 @@
struct sip_softc *sc = (struct sip_softc *) self;
u_int32_t enphy;
- if (sc->sc_model->sip_product == PCI_PRODUCT_SIS_900 &&
- sc->sc_rev >= SIS_REV_635) {
+ if (sc->sc_model->sip_product == PCI_PRODUCT_SIS_900) {
mii_bitbang_writereg(self, &SIP_DECL(mii_bitbang_ops),
phy, reg, val);
return;
}
+#ifndef SIS900_MII_RESTRICT
/*
* The SiS 900 has only an internal PHY on the MII. Only allow
* MII address 0.
*/
if (sc->sc_model->sip_product == PCI_PRODUCT_SIS_900 && phy != 0)
return;
+#endif
bus_space_write_4(sc->sc_st, sc->sc_sh, SIP_ENPHY,
(val << ENPHY_DATA_SHIFT) | (phy << ENPHY_PHYADDR_SHIFT) |
Home |
Main Index |
Thread Index |
Old Index