@@ -426,6 +426,24 @@ static void ixgbevf_write_msg_read_ack(struct ixgbe_hw *hw,
mbx->ops.read_posted(hw, retmsg, size);
}
+static s32 ixgbevf_request_mc_promisc_vf(struct ixgbe_hw *hw)
+{
+ struct ixgbevf_adapter *adapter = hw->back;
+ u32 msgbuf[IXGBE_VFMAILBOX_SIZE];
+
+ dev_info(&adapter->pdev->dev, "Request MC PROMISC\n");
+
+ memset(msgbuf, 0, sizeof(msgbuf));
+
+ /* enabling multicast promiscuous */
+ msgbuf[0] = IXGBE_VF_SET_MC_PROMISC;
+ msgbuf[1] = 1;
+
+ ixgbevf_write_msg_read_ack(hw, msgbuf, 2);
+
+ return 0;
+}
+
/**
* ixgbevf_update_mc_addr_list_vf - Update Multicast addresses
* @hw: pointer to the HW structure
@@ -457,18 +475,9 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw,
*/
if (hw->api_version == ixgbe_mbox_api_12) {
if (!hw->mac.mc_promisc) {
- struct ixgbevf_adapter *adapter = hw->back;
-
- dev_info(&adapter->pdev->dev, "Request MC PROMISC\n");
-
- /* enabling multicast promiscuous */
- msgbuf[0] = IXGBE_VF_SET_MC_PROMISC;
- msgbuf[1] = 1;
- ixgbevf_write_msg_read_ack(hw, msgbuf, 2);
-
+ ixgbevf_request_mc_promisc_vf(hw);
hw->mac.mc_promisc = true;
}
-
return 0;
}
cnt = 30;