aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/etherswitch/ip17x/ip175c.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/etherswitch/ip17x/ip175c.c')
-rw-r--r--sys/dev/etherswitch/ip17x/ip175c.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/etherswitch/ip17x/ip175c.c b/sys/dev/etherswitch/ip17x/ip175c.c
index 30614a424170..c87543bc5b15 100644
--- a/sys/dev/etherswitch/ip17x/ip175c.c
+++ b/sys/dev/etherswitch/ip17x/ip175c.c
@@ -234,6 +234,13 @@ ip175c_get_vlan_mode(struct ip17x_softc *sc)
void
ip175c_attach(struct ip17x_softc *sc)
{
+ uint32_t data;
+
+ data = ip17x_readphy(sc->sc_dev, IP175C_MII_PHY, IP175C_MII_CTL_REG);
+ device_printf(sc->sc_dev, "MII: %x\n", data);
+ /* check mii1 interface if disabled then phy4 and mac4 hold on switch */
+ if((data & (1 << IP175C_MII_MII1_RMII_EN)) == 0)
+ sc->phymask |= 0x10;
sc->hal.ip17x_reset = ip175c_reset;
sc->hal.ip17x_hw_setup = ip175c_hw_setup;