net/ixgbe/base: complete HW init when SFP not present
[dpdk.git] / drivers / net / ixgbe / base / ixgbe_common.c
index 18bb18c..df6fbf9 100644 (file)
@@ -410,8 +410,10 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)
 
        /* Setup flow control */
        ret_val = ixgbe_setup_fc(hw);
-       if (ret_val != IXGBE_SUCCESS && ret_val != IXGBE_NOT_IMPLEMENTED)
+       if (ret_val != IXGBE_SUCCESS && ret_val != IXGBE_NOT_IMPLEMENTED) {
+               DEBUGOUT1("Flow control setup failed, returning %d\n", ret_val);
                return ret_val;
+       }
 
        /* Cache bit indicating need for crosstalk fix */
        switch (hw->mac.type) {
@@ -493,7 +495,7 @@ s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw)
        /* Reset the hardware */
        status = hw->mac.ops.reset_hw(hw);
 
-       if (status == IXGBE_SUCCESS) {
+       if (status == IXGBE_SUCCESS || status == IXGBE_ERR_SFP_NOT_PRESENT) {
                /* Start the HW */
                status = hw->mac.ops.start_hw(hw);
        }
@@ -501,6 +503,9 @@ s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw)
        /* Initialize the LED link active for LED blink support */
        hw->mac.ops.init_led_link_act(hw);
 
+       if (status != IXGBE_SUCCESS)
+               DEBUGOUT1("Failed to initialize HW, STATUS = %d\n", status);
+
        return status;
 }
 
@@ -1150,7 +1155,7 @@ s32 ixgbe_init_led_link_act_generic(struct ixgbe_hw *hw)
 {
        struct ixgbe_mac_info *mac = &hw->mac;
        u32 led_reg, led_mode;
-       u16 i;
+       u8 i;
 
        led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);