Merge "[qca-ssdk] fix phy speed 1000 issue."
diff --git a/src/hsl/phy/malibu_phy.c b/src/hsl/phy/malibu_phy.c
index 6c89d77..4792577 100755
--- a/src/hsl/phy/malibu_phy.c
+++ b/src/hsl/phy/malibu_phy.c
@@ -2243,12 +2243,23 @@
malibu_phy_hw_init(void)
{
a_uint16_t phy_data = 0;
+ a_uint32_t dev_id = 0;
+ a_uint32_t phy_id = 0;
+
phy_data = malibu_phy_mmd_read(0, PSGMII_ID, MALIBU_PHY_MMD1_NUM,
MALIBU_PSGMII_FIFI_CTRL);
phy_data &= 0xbfff;
malibu_phy_mmd_write(0, PSGMII_ID, MALIBU_PHY_MMD1_NUM,
MALIBU_PSGMII_FIFI_CTRL, phy_data);
+
+/*disable phy power saving function by default */
+ for (phy_id = 0; phy_id < 5; phy_id++) {
+ malibu_phy_set_powersave(dev_id, phy_id, A_FALSE);
+ malibu_phy_set_8023az(dev_id, phy_id, A_FALSE);
+ malibu_phy_set_hibernate(dev_id, phy_id, A_FALSE);
+ }
+
return SW_OK;
}
diff --git a/src/init/ssdk_init.c b/src/init/ssdk_init.c
index e99bbb3..e12891e 100755
--- a/src/init/ssdk_init.c
+++ b/src/init/ssdk_init.c
@@ -1402,8 +1402,10 @@
fal_port_link_forcemode_set(dev_id, i, A_FALSE);
}
#endif
- fal_port_rxhdr_mode_set(dev_id, i, FAL_NO_HEADER_EN);
- fal_port_txhdr_mode_set(dev_id, i, FAL_NO_HEADER_EN);
+ if (SSDK_CURRENT_CHIP_TYPE != CHIP_DESS) {
+ fal_port_rxhdr_mode_set(dev_id, i, FAL_NO_HEADER_EN);
+ fal_port_txhdr_mode_set(dev_id, i, FAL_NO_HEADER_EN);
+ }
fal_port_3az_status_set(dev_id, i, A_FALSE);
fal_port_flowctrl_forcemode_set(dev_id, i, A_TRUE);
fal_port_flowctrl_set(dev_id, i, A_FALSE);
@@ -1682,11 +1684,13 @@
aos_mem_copy(reg_value, &value, sizeof(a_uint32_t));
qca_switch_reg_write(0, 0x7c, ®_value, 4 );
+/*
qca_switch_reg_write(0, 0x80, ®_value, 4 );
qca_switch_reg_write(0, 0x84, ®_value, 4 );
qca_switch_reg_write(0, 0x88, ®_value, 4 );
qca_switch_reg_write(0, 0x8c, (a_uint8_t *)®_value, 4 );
qca_switch_reg_write(0, 0x90, (a_uint8_t *)®_value, 4 );
+*/
}
#if defined(CONFIG_OF) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))