bnx2x: add EEE support for 4-port devices
[cascardo/linux.git] / drivers / net / ethernet / broadcom / bnx2x / bnx2x_link.c
index f4beb46..bf60c07 100644 (file)
@@ -4716,6 +4716,10 @@ void bnx2x_link_status_update(struct link_params *params,
        vars->link_status = REG_RD(bp, params->shmem_base +
                                   offsetof(struct shmem_region,
                                            port_mb[port].link_status));
+       if (bnx2x_eee_has_cap(params))
+               vars->eee_status = REG_RD(bp, params->shmem2_base +
+                                         offsetof(struct shmem2_region,
+                                                  eee_status[params->port]));
 
        vars->phy_flags = PHY_XGXS_FLAG;
        bnx2x_sync_link(params, vars);
@@ -6536,7 +6540,6 @@ static int bnx2x_update_link_down(struct link_params *params,
                /* Prevent LPI Generation by chip */
                REG_WR(bp, MISC_REG_CPMU_LP_FW_ENABLE_P0 + (params->port << 2),
                       0);
-               REG_WR(bp, MISC_REG_CPMU_LP_DR_ENABLE, 0);
                REG_WR(bp, MISC_REG_CPMU_LP_MASK_ENT_P0 + (params->port << 2),
                       0);
                vars->eee_status &= ~(SHMEM_EEE_LP_ADV_STATUS_MASK |
@@ -9928,7 +9931,6 @@ static int bnx2x_8483x_disable_eee(struct bnx2x_phy *phy,
 
        /* Make Certain LPI is disabled */
        REG_WR(bp, MISC_REG_CPMU_LP_FW_ENABLE_P0 + (params->port << 2), 0);
-       REG_WR(bp, MISC_REG_CPMU_LP_DR_ENABLE, 0);
 
        /* Prevent Phy from working in EEE and advertising it */
        rc = bnx2x_84833_cmd_hdlr(phy, params,