ar71xx: add kmod-ledtrig-usbdev for the MZK-W04NU profile as well
[openwrt.git] / target / linux / generic / files / drivers / net / phy / rtl8366_smi.c
index 7995f34..e34c84c 100644 (file)
@@ -448,7 +448,7 @@ static int rtl8366_set_pvid(struct rtl8366_smi *smi, unsigned port,
        return -ENOSPC;
 }
 
-static int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable)
+int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable)
 {
        int err;
 
@@ -465,6 +465,7 @@ static int rtl8366_enable_vlan(struct rtl8366_smi *smi, int enable)
 
        return err;
 }
+EXPORT_SYMBOL_GPL(rtl8366_enable_vlan);
 
 static int rtl8366_enable_vlan4k(struct rtl8366_smi *smi, int enable)
 {
@@ -486,6 +487,21 @@ static int rtl8366_enable_vlan4k(struct rtl8366_smi *smi, int enable)
        return 0;
 }
 
+int rtl8366_enable_all_ports(struct rtl8366_smi *smi, int enable)
+{
+       int port;
+       int err;
+
+       for (port = 0; port < smi->num_ports; port++) {
+               err = smi->ops->enable_port(smi, port, enable);
+               if (err)
+                       return err;
+       }
+
+       return 0;
+}
+EXPORT_SYMBOL_GPL(rtl8366_enable_all_ports);
+
 int rtl8366_reset_vlan(struct rtl8366_smi *smi)
 {
        struct rtl8366_vlan_mc vlanmc;
@@ -1189,6 +1205,10 @@ int rtl8366_smi_init(struct rtl8366_smi *smi)
                goto err_disable_hw;
        }
 
+       err = rtl8366_enable_all_ports(smi, 1);
+       if (err)
+               goto err_disable_hw;
+
        err = rtl8366_smi_mii_init(smi);
        if (err)
                goto err_free_sck;
This page took 0.030235 seconds and 4 git commands to generate.