mlx4: avoid init errors when kernel modules are not loaded
[dpdk.git] / lib / librte_pmd_e1000 / e1000 / e1000_vf.c
index 6f19f19..778561e 100644 (file)
@@ -1,6 +1,6 @@
 /*******************************************************************************
 
-Copyright (c) 2001-2012, Intel Corporation
+Copyright (c) 2001-2014, Intel Corporation
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -378,7 +378,7 @@ STATIC u32 e1000_hash_mc_addr_vf(struct e1000_hw *hw, u8 *mc_addr)
        return hash_value;
 }
 
-static void e1000_write_msg_read_ack(struct e1000_hw *hw,
+STATIC void e1000_write_msg_read_ack(struct e1000_hw *hw,
                                     u32 *msg, u16 size)
 {
        struct e1000_mbx_info *mbx = &hw->mbx;
@@ -419,13 +419,12 @@ void e1000_update_mc_addr_list_vf(struct e1000_hw *hw,
 
        DEBUGOUT1("MC Addr Count = %d\n", mc_addr_count);
 
-       msgbuf[0] = E1000_VF_SET_MULTICAST;
-
        if (mc_addr_count > 30) {
                msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW;
                mc_addr_count = 30;
        }
 
+       msgbuf[0] = E1000_VF_SET_MULTICAST;
        msgbuf[0] |= mc_addr_count << E1000_VT_MSGINFO_SHIFT;
 
        for (i = 0; i < mc_addr_count; i++) {