net/ngbe: fix external PHY power down
[dpdk.git] / drivers / net / ngbe / base / ngbe_hw.c
index 67e4b4a..fa2d749 100644 (file)
@@ -20,8 +20,6 @@ s32 ngbe_start_hw(struct ngbe_hw *hw)
 {
        s32 err;
 
-       DEBUGFUNC("ngbe_start_hw");
-
        /* Clear the VLAN filter table */
        hw->mac.clear_vfta(hw);
 
@@ -31,7 +29,7 @@ s32 ngbe_start_hw(struct ngbe_hw *hw)
        /* Setup flow control */
        err = hw->mac.setup_fc(hw);
        if (err != 0 && err != NGBE_NOT_IMPLEMENTED) {
-               DEBUGOUT("Flow control setup failed, returning %d\n", err);
+               DEBUGOUT("Flow control setup failed, returning %d", err);
                return err;
        }
 
@@ -55,8 +53,6 @@ s32 ngbe_init_hw(struct ngbe_hw *hw)
 {
        s32 status;
 
-       DEBUGFUNC("ngbe_init_hw");
-
        ngbe_save_eeprom_version(hw);
 
        /* Reset the hardware */
@@ -67,7 +63,7 @@ s32 ngbe_init_hw(struct ngbe_hw *hw)
        }
 
        if (status != 0)
-               DEBUGOUT("Failed to initialize HW, STATUS = %d\n", status);
+               DEBUGOUT("Failed to initialize HW, STATUS = %d", status);
 
        return status;
 }
@@ -155,8 +151,6 @@ s32 ngbe_reset_hw_em(struct ngbe_hw *hw)
 {
        s32 status;
 
-       DEBUGFUNC("ngbe_reset_hw_em");
-
        /* Call adapter stop to disable tx/rx and clear interrupts */
        status = hw->mac.stop_hw(hw);
        if (status != 0)
@@ -204,8 +198,6 @@ s32 ngbe_clear_hw_cntrs(struct ngbe_hw *hw)
 {
        u16 i = 0;
 
-       DEBUGFUNC("ngbe_clear_hw_cntrs");
-
        /* QP Stats */
        /* don't write clear queue stats */
        for (i = 0; i < NGBE_MAX_QP; i++) {
@@ -304,8 +296,6 @@ s32 ngbe_get_mac_addr(struct ngbe_hw *hw, u8 *mac_addr)
        u32 rar_low;
        u16 i;
 
-       DEBUGFUNC("ngbe_get_mac_addr");
-
        wr32(hw, NGBE_ETHADDRIDX, 0);
        rar_high = rd32(hw, NGBE_ETHADDRH);
        rar_low = rd32(hw, NGBE_ETHADDRL);
@@ -331,8 +321,6 @@ void ngbe_set_lan_id_multi_port(struct ngbe_hw *hw)
        struct ngbe_bus_info *bus = &hw->bus;
        u32 reg = 0;
 
-       DEBUGFUNC("ngbe_set_lan_id_multi_port");
-
        reg = rd32(hw, NGBE_PORTSTAT);
        bus->lan_id = NGBE_PORTSTAT_ID(reg);
        bus->func = bus->lan_id;
@@ -352,8 +340,6 @@ s32 ngbe_stop_hw(struct ngbe_hw *hw)
        u16 i;
        s32 status = 0;
 
-       DEBUGFUNC("ngbe_stop_hw");
-
        /*
         * Set the adapter_stopped flag so other driver functions stop touching
         * the hardware
@@ -409,8 +395,6 @@ s32 ngbe_led_on(struct ngbe_hw *hw, u32 index)
 {
        u32 led_reg = rd32(hw, NGBE_LEDCTL);
 
-       DEBUGFUNC("ngbe_led_on");
-
        if (index > 3)
                return NGBE_ERR_PARAM;
 
@@ -431,8 +415,6 @@ s32 ngbe_led_off(struct ngbe_hw *hw, u32 index)
 {
        u32 led_reg = rd32(hw, NGBE_LEDCTL);
 
-       DEBUGFUNC("ngbe_led_off");
-
        if (index > 3)
                return NGBE_ERR_PARAM;
 
@@ -454,8 +436,6 @@ s32 ngbe_validate_mac_addr(u8 *mac_addr)
 {
        s32 status = 0;
 
-       DEBUGFUNC("ngbe_validate_mac_addr");
-
        /* Make sure it is not a multicast address */
        if (NGBE_IS_MULTICAST((struct rte_ether_addr *)mac_addr)) {
                status = NGBE_ERR_INVALID_MAC_ADDR;
@@ -486,11 +466,9 @@ s32 ngbe_set_rar(struct ngbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
        u32 rar_low, rar_high;
        u32 rar_entries = hw->mac.num_rar_entries;
 
-       DEBUGFUNC("ngbe_set_rar");
-
        /* Make sure we are using a valid rar index range */
        if (index >= rar_entries) {
-               DEBUGOUT("RAR index %d is out of range.\n", index);
+               DEBUGOUT("RAR index %d is out of range.", index);
                return NGBE_ERR_INVALID_ARGUMENT;
        }
 
@@ -538,11 +516,9 @@ s32 ngbe_clear_rar(struct ngbe_hw *hw, u32 index)
        u32 rar_high;
        u32 rar_entries = hw->mac.num_rar_entries;
 
-       DEBUGFUNC("ngbe_clear_rar");
-
        /* Make sure we are using a valid rar index range */
        if (index >= rar_entries) {
-               DEBUGOUT("RAR index %d is out of range.\n", index);
+               DEBUGOUT("RAR index %d is out of range.", index);
                return NGBE_ERR_INVALID_ARGUMENT;
        }
 
@@ -578,8 +554,6 @@ s32 ngbe_init_rx_addrs(struct ngbe_hw *hw)
        u32 psrctl;
        u32 rar_entries = hw->mac.num_rar_entries;
 
-       DEBUGFUNC("ngbe_init_rx_addrs");
-
        /*
         * If the current mac address is valid, assume it is a software override
         * to the permanent address.
@@ -590,18 +564,18 @@ s32 ngbe_init_rx_addrs(struct ngbe_hw *hw)
                /* Get the MAC address from the RAR0 for later reference */
                hw->mac.get_mac_addr(hw, hw->mac.addr);
 
-               DEBUGOUT(" Keeping Current RAR0 Addr =%.2X %.2X %.2X ",
+               DEBUGOUT(" Keeping Current RAR0 Addr = "
+                         RTE_ETHER_ADDR_PRT_FMT,
                          hw->mac.addr[0], hw->mac.addr[1],
-                         hw->mac.addr[2]);
-               DEBUGOUT("%.2X %.2X %.2X\n", hw->mac.addr[3],
+                         hw->mac.addr[2], hw->mac.addr[3],
                          hw->mac.addr[4], hw->mac.addr[5]);
        } else {
                /* Setup the receive address. */
-               DEBUGOUT("Overriding MAC Address in RAR[0]\n");
-               DEBUGOUT(" New MAC Addr =%.2X %.2X %.2X ",
+               DEBUGOUT("Overriding MAC Address in RAR[0]");
+               DEBUGOUT(" New MAC Addr = "
+                         RTE_ETHER_ADDR_PRT_FMT,
                          hw->mac.addr[0], hw->mac.addr[1],
-                         hw->mac.addr[2]);
-               DEBUGOUT("%.2X %.2X %.2X\n", hw->mac.addr[3],
+                         hw->mac.addr[2], hw->mac.addr[3],
                          hw->mac.addr[4], hw->mac.addr[5]);
 
                hw->mac.set_rar(hw, 0, hw->mac.addr, 0, true);
@@ -611,7 +585,7 @@ s32 ngbe_init_rx_addrs(struct ngbe_hw *hw)
        hw->mac.clear_vmdq(hw, 0, BIT_MASK32);
 
        /* Zero out the other receive addresses. */
-       DEBUGOUT("Clearing RAR[1-%d]\n", rar_entries - 1);
+       DEBUGOUT("Clearing RAR[1-%d]", rar_entries - 1);
        for (i = 1; i < rar_entries; i++) {
                wr32(hw, NGBE_ETHADDRIDX, i);
                wr32(hw, NGBE_ETHADDRL, 0);
@@ -625,7 +599,7 @@ s32 ngbe_init_rx_addrs(struct ngbe_hw *hw)
        psrctl |= NGBE_PSRCTL_ADHF12(hw->mac.mc_filter_type);
        wr32(hw, NGBE_PSRCTL, psrctl);
 
-       DEBUGOUT(" Clearing MTA\n");
+       DEBUGOUT(" Clearing MTA");
        for (i = 0; i < hw->mac.mcft_size; i++)
                wr32(hw, NGBE_MCADDRTBL(i), 0);
 
@@ -650,8 +624,6 @@ static s32 ngbe_mta_vector(struct ngbe_hw *hw, u8 *mc_addr)
 {
        u32 vector = 0;
 
-       DEBUGFUNC("ngbe_mta_vector");
-
        switch (hw->mac.mc_filter_type) {
        case 0:   /* use bits [47:36] of the address */
                vector = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4));
@@ -666,7 +638,7 @@ static s32 ngbe_mta_vector(struct ngbe_hw *hw, u8 *mc_addr)
                vector = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8));
                break;
        default:  /* Invalid mc_filter_type */
-               DEBUGOUT("MC filter type param set incorrectly\n");
+               DEBUGOUT("MC filter type param set incorrectly");
                ASSERT(0);
                break;
        }
@@ -689,12 +661,10 @@ void ngbe_set_mta(struct ngbe_hw *hw, u8 *mc_addr)
        u32 vector_bit;
        u32 vector_reg;
 
-       DEBUGFUNC("ngbe_set_mta");
-
        hw->addr_ctrl.mta_in_use++;
 
        vector = ngbe_mta_vector(hw, mc_addr);
-       DEBUGOUT(" bit-vector = 0x%03X\n", vector);
+       DEBUGOUT(" bit-vector = 0x%03X", vector);
 
        /*
         * The MTA is a register array of 128 32-bit registers. It is treated
@@ -728,8 +698,6 @@ s32 ngbe_update_mc_addr_list(struct ngbe_hw *hw, u8 *mc_addr_list,
        u32 i;
        u32 vmdq;
 
-       DEBUGFUNC("ngbe_update_mc_addr_list");
-
        /*
         * Set the new number of MC addresses that we are being requested to
         * use.
@@ -739,13 +707,13 @@ s32 ngbe_update_mc_addr_list(struct ngbe_hw *hw, u8 *mc_addr_list,
 
        /* Clear mta_shadow */
        if (clear) {
-               DEBUGOUT(" Clearing MTA\n");
+               DEBUGOUT(" Clearing MTA");
                memset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow));
        }
 
        /* Update mta_shadow */
        for (i = 0; i < mc_addr_count; i++) {
-               DEBUGOUT(" Adding the multicast addresses:\n");
+               DEBUGOUT(" Adding the multicast addresses:");
                ngbe_set_mta(hw, next(hw, &mc_addr_list, &vmdq));
        }
 
@@ -762,7 +730,7 @@ s32 ngbe_update_mc_addr_list(struct ngbe_hw *hw, u8 *mc_addr_list,
                wr32(hw, NGBE_PSRCTL, psrctl);
        }
 
-       DEBUGOUT("ngbe update mc addr list complete\n");
+       DEBUGOUT("ngbe update mc addr list complete");
        return 0;
 }
 
@@ -777,11 +745,9 @@ s32 ngbe_setup_fc_em(struct ngbe_hw *hw)
        s32 err = 0;
        u16 reg_cu = 0;
 
-       DEBUGFUNC("ngbe_setup_fc");
-
        /* Validate the requested mode */
        if (hw->fc.strict_ieee && hw->fc.requested_mode == ngbe_fc_rx_pause) {
-               DEBUGOUT("ngbe_fc_rx_pause not valid in strict IEEE mode\n");
+               DEBUGOUT("ngbe_fc_rx_pause not valid in strict IEEE mode");
                err = NGBE_ERR_INVALID_LINK_SETTINGS;
                goto out;
        }
@@ -837,7 +803,7 @@ s32 ngbe_setup_fc_em(struct ngbe_hw *hw)
                        reg_cu |= 0xC00; /*need to merge rtl and mvl on page 0*/
                break;
        default:
-               DEBUGOUT("Flow control param set incorrectly\n");
+               DEBUGOUT("Flow control param set incorrectly");
                err = NGBE_ERR_CONFIG;
                goto out;
        }
@@ -861,8 +827,6 @@ s32 ngbe_fc_enable(struct ngbe_hw *hw)
        u32 pause_time;
        u32 fcrtl, fcrth;
 
-       DEBUGFUNC("ngbe_fc_enable");
-
        /* Validate the water mark configuration */
        if (!hw->fc.pause_time) {
                err = NGBE_ERR_INVALID_LINK_SETTINGS;
@@ -873,7 +837,7 @@ s32 ngbe_fc_enable(struct ngbe_hw *hw)
        if ((hw->fc.current_mode & ngbe_fc_tx_pause) && hw->fc.high_water) {
                if (!hw->fc.low_water ||
                        hw->fc.low_water >= hw->fc.high_water) {
-                       DEBUGOUT("Invalid water mark configuration\n");
+                       DEBUGOUT("Invalid water mark configuration");
                        err = NGBE_ERR_INVALID_LINK_SETTINGS;
                        goto out;
                }
@@ -929,7 +893,7 @@ s32 ngbe_fc_enable(struct ngbe_hw *hw)
                fccfg_reg |= NGBE_TXFCCFG_FC;
                break;
        default:
-               DEBUGOUT("Flow control param set incorrectly\n");
+               DEBUGOUT("Flow control param set incorrectly");
                err = NGBE_ERR_CONFIG;
                goto out;
        }
@@ -987,8 +951,7 @@ s32 ngbe_negotiate_fc(struct ngbe_hw *hw, u32 adv_reg, u32 lp_reg,
                       u32 adv_sym, u32 adv_asm, u32 lp_sym, u32 lp_asm)
 {
        if ((!(adv_reg)) ||  (!(lp_reg))) {
-               DEBUGOUT("Local or link partner's advertised flow control "
-                        "settings are NULL. Local: %x, link partner: %x\n",
+               DEBUGOUT("Local or link partner's advertised flow control settings are NULL. Local: %x, link partner: %x",
                              adv_reg, lp_reg);
                return NGBE_ERR_FC_NOT_NEGOTIATED;
        }
@@ -1003,22 +966,22 @@ s32 ngbe_negotiate_fc(struct ngbe_hw *hw, u32 adv_reg, u32 lp_reg,
                 */
                if (hw->fc.requested_mode == ngbe_fc_full) {
                        hw->fc.current_mode = ngbe_fc_full;
-                       DEBUGOUT("Flow Control = FULL.\n");
+                       DEBUGOUT("Flow Control = FULL.");
                } else {
                        hw->fc.current_mode = ngbe_fc_rx_pause;
-                       DEBUGOUT("Flow Control=RX PAUSE frames only\n");
+                       DEBUGOUT("Flow Control=RX PAUSE frames only");
                }
        } else if (!(adv_reg & adv_sym) && (adv_reg & adv_asm) &&
                   (lp_reg & lp_sym) && (lp_reg & lp_asm)) {
                hw->fc.current_mode = ngbe_fc_tx_pause;
-               DEBUGOUT("Flow Control = TX PAUSE frames only.\n");
+               DEBUGOUT("Flow Control = TX PAUSE frames only.");
        } else if ((adv_reg & adv_sym) && (adv_reg & adv_asm) &&
                   !(lp_reg & lp_sym) && (lp_reg & lp_asm)) {
                hw->fc.current_mode = ngbe_fc_rx_pause;
-               DEBUGOUT("Flow Control = RX PAUSE frames only.\n");
+               DEBUGOUT("Flow Control = RX PAUSE frames only.");
        } else {
                hw->fc.current_mode = ngbe_fc_none;
-               DEBUGOUT("Flow Control = NONE.\n");
+               DEBUGOUT("Flow Control = NONE.");
        }
        return 0;
 }
@@ -1056,8 +1019,6 @@ void ngbe_fc_autoneg(struct ngbe_hw *hw)
        u32 speed;
        bool link_up;
 
-       DEBUGFUNC("ngbe_fc_autoneg");
-
        /*
         * AN should have completed when the cable was plugged in.
         * Look for reasons to bail out.  Bail out if:
@@ -1101,8 +1062,6 @@ s32 ngbe_set_pcie_master(struct ngbe_hw *hw, bool enable)
        u16 addr = 0x04;
        u32 data, i;
 
-       DEBUGFUNC("ngbe_set_pcie_master");
-
        ngbe_hic_pcie_read(hw, addr, &data, 4);
        if (enable)
                data |= 0x04;
@@ -1126,7 +1085,7 @@ s32 ngbe_set_pcie_master(struct ngbe_hw *hw, bool enable)
                        goto out;
        }
 
-       DEBUGOUT("PCIe transaction pending bit also did not clear.\n");
+       DEBUGOUT("PCIe transaction pending bit also did not clear.");
        status = NGBE_ERR_MASTER_REQUESTS_PENDING;
 
 out:
@@ -1150,8 +1109,6 @@ s32 ngbe_acquire_swfw_sync(struct ngbe_hw *hw, u32 mask)
        u32 timeout = 200;
        u32 i;
 
-       DEBUGFUNC("ngbe_acquire_swfw_sync");
-
        for (i = 0; i < timeout; i++) {
                /*
                 * SW NVM semaphore bit is used for access to all
@@ -1174,7 +1131,7 @@ s32 ngbe_acquire_swfw_sync(struct ngbe_hw *hw, u32 mask)
        }
 
        fwsm = rd32(hw, NGBE_MNGFWSYNC);
-       DEBUGOUT("SWFW semaphore not granted: MNG_SWFW_SYNC = 0x%x, MNG_FW_SM = 0x%x\n",
+       DEBUGOUT("SWFW semaphore not granted: MNG_SWFW_SYNC = 0x%x, MNG_FW_SM = 0x%x",
                        mngsem, fwsm);
 
        msec_delay(5);
@@ -1194,8 +1151,6 @@ void ngbe_release_swfw_sync(struct ngbe_hw *hw, u32 mask)
        u32 mngsem;
        u32 swmask = mask;
 
-       DEBUGFUNC("ngbe_release_swfw_sync");
-
        ngbe_get_eeprom_semaphore(hw);
 
        mngsem = rd32(hw, NGBE_MNGSEM);
@@ -1219,9 +1174,6 @@ s32 ngbe_disable_sec_rx_path(struct ngbe_hw *hw)
        int i;
        u32 secrxreg;
 
-       DEBUGFUNC("ngbe_disable_sec_rx_path");
-
-
        secrxreg = rd32(hw, NGBE_SECRXCTL);
        secrxreg |= NGBE_SECRXCTL_XDSA;
        wr32(hw, NGBE_SECRXCTL, secrxreg);
@@ -1236,8 +1188,7 @@ s32 ngbe_disable_sec_rx_path(struct ngbe_hw *hw)
 
        /* For informational purposes only */
        if (i >= NGBE_MAX_SECRX_POLL)
-               DEBUGOUT("Rx unit being enabled before security "
-                        "path fully disabled.  Continuing with init.\n");
+               DEBUGOUT("Rx unit being enabled before security path fully disabled.  Continuing with init.");
 
        return 0;
 }
@@ -1252,8 +1203,6 @@ s32 ngbe_enable_sec_rx_path(struct ngbe_hw *hw)
 {
        u32 secrxreg;
 
-       DEBUGFUNC("ngbe_enable_sec_rx_path");
-
        secrxreg = rd32(hw, NGBE_SECRXCTL);
        secrxreg &= ~NGBE_SECRXCTL_XDSA;
        wr32(hw, NGBE_SECRXCTL, secrxreg);
@@ -1273,11 +1222,9 @@ s32 ngbe_clear_vmdq(struct ngbe_hw *hw, u32 rar, u32 vmdq)
        u32 mpsar;
        u32 rar_entries = hw->mac.num_rar_entries;
 
-       DEBUGFUNC("ngbe_clear_vmdq");
-
        /* Make sure we are using a valid rar index range */
        if (rar >= rar_entries) {
-               DEBUGOUT("RAR index %d is out of range.\n", rar);
+               DEBUGOUT("RAR index %d is out of range.", rar);
                return NGBE_ERR_INVALID_ARGUMENT;
        }
 
@@ -1311,11 +1258,9 @@ s32 ngbe_set_vmdq(struct ngbe_hw *hw, u32 rar, u32 vmdq)
        u32 mpsar;
        u32 rar_entries = hw->mac.num_rar_entries;
 
-       DEBUGFUNC("ngbe_set_vmdq");
-
        /* Make sure we are using a valid rar index range */
        if (rar >= rar_entries) {
-               DEBUGOUT("RAR index %d is out of range.\n", rar);
+               DEBUGOUT("RAR index %d is out of range.", rar);
                return NGBE_ERR_INVALID_ARGUMENT;
        }
 
@@ -1336,8 +1281,7 @@ s32 ngbe_init_uta_tables(struct ngbe_hw *hw)
 {
        int i;
 
-       DEBUGFUNC("ngbe_init_uta_tables");
-       DEBUGOUT(" Clearing UTA\n");
+       DEBUGOUT(" Clearing UTA");
 
        for (i = 0; i < 128; i++)
                wr32(hw, NGBE_UCADDRTBL(i), 0);
@@ -1392,7 +1336,7 @@ s32 ngbe_find_vlvf_slot(struct ngbe_hw *hw, u32 vlan, bool vlvf_bypass)
         * slot we found during our search, else error.
         */
        if (!first_empty_slot)
-               DEBUGOUT("No space in VLVF.\n");
+               DEBUGOUT("No space in VLVF.");
 
        return first_empty_slot ? first_empty_slot : NGBE_ERR_NO_SPACE;
 }
@@ -1413,8 +1357,6 @@ s32 ngbe_set_vfta(struct ngbe_hw *hw, u32 vlan, u32 vind,
        u32 regidx, vfta_delta, vfta;
        s32 err;
 
-       DEBUGFUNC("ngbe_set_vfta");
-
        if (vlan > 4095 || vind > 63)
                return NGBE_ERR_PARAM;
 
@@ -1482,8 +1424,6 @@ s32 ngbe_set_vlvf(struct ngbe_hw *hw, u32 vlan, u32 vind,
        u32 portctl;
        s32 vlvf_index;
 
-       DEBUGFUNC("ngbe_set_vlvf");
-
        if (vlan > 4095 || vind > 63)
                return NGBE_ERR_PARAM;
 
@@ -1563,8 +1503,6 @@ s32 ngbe_clear_vfta(struct ngbe_hw *hw)
 {
        u32 offset;
 
-       DEBUGFUNC("ngbe_clear_vfta");
-
        for (offset = 0; offset < hw->mac.vft_size; offset++)
                wr32(hw, NGBE_VLANTBL(offset), 0);
 
@@ -1592,8 +1530,6 @@ s32 ngbe_check_mac_link_em(struct ngbe_hw *hw, u32 *speed,
        u32 i, reg;
        s32 status = 0;
 
-       DEBUGFUNC("ngbe_check_mac_link_em");
-
        reg = rd32(hw, NGBE_GPIOINTSTAT);
        wr32(hw, NGBE_GPIOEOI, reg);
 
@@ -1617,7 +1553,6 @@ s32 ngbe_get_link_capabilities_em(struct ngbe_hw *hw,
 {
        s32 status = 0;
        u16 value = 0;
-       DEBUGFUNC("\n");
 
        hw->mac.autoneg = *autoneg;
 
@@ -1642,8 +1577,6 @@ s32 ngbe_setup_mac_link_em(struct ngbe_hw *hw,
 {
        s32 status;
 
-       DEBUGFUNC("\n");
-
        /* Setup the PHY according to input speed */
        status = hw->phy.setup_link(hw, speed, autoneg_wait_to_complete);
 
@@ -1723,8 +1656,6 @@ s32 ngbe_init_thermal_sensor_thresh(struct ngbe_hw *hw)
 {
        struct ngbe_thermal_sensor_data *data = &hw->mac.thermal_sensor_data;
 
-       DEBUGFUNC("ngbe_init_thermal_sensor_thresh");
-
        memset(data, 0, sizeof(struct ngbe_thermal_sensor_data));
 
        if (hw->bus.lan_id != 0)
@@ -1748,8 +1679,6 @@ s32 ngbe_mac_check_overtemp(struct ngbe_hw *hw)
        s32 status = 0;
        u32 ts_state;
 
-       DEBUGFUNC("ngbe_mac_check_overtemp");
-
        /* Check that the LASI temp alarm status was triggered */
        ts_state = rd32(hw, NGBE_TSALM);
 
@@ -1804,8 +1733,6 @@ s32 ngbe_set_mac_type(struct ngbe_hw *hw)
 {
        s32 err = 0;
 
-       DEBUGFUNC("ngbe_set_mac_type");
-
        if (hw->vendor_id != PCI_VENDOR_ID_WANGXUN) {
                DEBUGOUT("Unsupported vendor id: %x", hw->vendor_id);
                return NGBE_ERR_DEVICE_NOT_SUPPORTED;
@@ -1846,7 +1773,7 @@ s32 ngbe_set_mac_type(struct ngbe_hw *hw)
                break;
        }
 
-       DEBUGOUT("found mac: %d media: %d, returns: %d\n",
+       DEBUGOUT("found mac: %d media: %d, returns: %d",
                  hw->mac.type, hw->phy.media_type, err);
        return err;
 }
@@ -1860,15 +1787,12 @@ s32 ngbe_set_mac_type(struct ngbe_hw *hw)
  **/
 s32 ngbe_enable_rx_dma(struct ngbe_hw *hw, u32 regval)
 {
-       DEBUGFUNC("ngbe_enable_rx_dma");
-
        /*
         * Workaround silicon errata when enabling the Rx datapath.
         * If traffic is incoming before we enable the Rx unit, it could hang
         * the Rx DMA unit.  Therefore, make sure the security engine is
         * completely disabled prior to enabling the Rx unit.
         */
-
        hw->mac.disable_sec_rx_path(hw);
 
        if (regval & NGBE_PBRXCTL_ENA)
@@ -1960,8 +1884,6 @@ s32 ngbe_init_ops_pf(struct ngbe_hw *hw)
        struct ngbe_rom_info *rom = &hw->rom;
        struct ngbe_mbx_info *mbx = &hw->mbx;
 
-       DEBUGFUNC("ngbe_init_ops_pf");
-
        /* BUS */
        bus->set_lan_id = ngbe_set_lan_id_multi_port;
 
@@ -1972,6 +1894,7 @@ s32 ngbe_init_ops_pf(struct ngbe_hw *hw)
        phy->read_reg_unlocked = ngbe_read_phy_reg_mdi;
        phy->write_reg_unlocked = ngbe_write_phy_reg_mdi;
        phy->reset_hw = ngbe_reset_phy;
+       phy->led_oem_chk = ngbe_phy_led_oem_chk;
 
        /* MAC */
        mac->init_hw = ngbe_init_hw;
@@ -2063,8 +1986,6 @@ s32 ngbe_init_shared_code(struct ngbe_hw *hw)
 {
        s32 status = 0;
 
-       DEBUGFUNC("ngbe_init_shared_code");
-
        /*
         * Set the mac type
         */