James, Could you please try this patch? It should be pretty much identical to yours but reuses code a bit more.
If it works for you then we'll go ahead and submit for internal validation and testing and then take it from there. Thanks, --- igbvf-old/igbvf-2.0.1/src/e1000_vf.c 2011-11-03 10:00:52.000000000 -0700 +++ igbvf-new/igbvf-2.0.1/src/e1000_vf.c 2011-11-03 09:59:10.000000000 -0700 @@ -252,6 +252,16 @@ static u32 e1000_hash_mc_addr_vf(struct return hash_value; } +static void write_and_read_response(struct e1000_hw *hw, u32 *msg, u16 size) +{ + struct e1000_mbx_info *mbx = &hw->mbx; + u32 retmsg[E1000_VFMAILBOX_SIZE]; + s32 retval = mbx->ops.write_posted(hw, msg, size, 0); + + if (!retval) + mbx->ops.read_posted(hw, retmsg, E1000_VFMAILBOX_SIZE, 0); +} + /** * e1000_update_mc_addr_list_vf - Update Multicast addresses * @hw: pointer to the HW structure @@ -264,7 +274,6 @@ static u32 e1000_hash_mc_addr_vf(struct void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, u8 *mc_addr_list, u32 mc_addr_count) { - struct e1000_mbx_info *mbx = &hw->mbx; u32 msgbuf[E1000_VFMAILBOX_SIZE]; u16 *hash_list = (u16 *)&msgbuf[1]; u32 hash_value; @@ -298,7 +307,7 @@ void e1000_update_mc_addr_list_vf(struct mc_addr_list += ETH_ADDR_LEN; } - mbx->ops.write_posted(hw, msgbuf, E1000_VFMAILBOX_SIZE, 0); + write_and_read_response(hw, msgbuf, E1000_VFMAILBOX_SIZE); } /** @@ -309,7 +318,6 @@ void e1000_update_mc_addr_list_vf(struct **/ void e1000_vfta_set_vf(struct e1000_hw *hw, u16 vid, bool set) { - struct e1000_mbx_info *mbx = &hw->mbx; u32 msgbuf[2]; msgbuf[0] = E1000_VF_SET_VLAN; @@ -318,7 +326,7 @@ void e1000_vfta_set_vf(struct e1000_hw * if (set) msgbuf[0] |= E1000_VF_SET_VLAN_ADD; - mbx->ops.write_posted(hw, msgbuf, 2, 0); + write_and_read_response(hw, msgbuf, 2); } /** e1000_rlpml_set_vf - Set the maximum receive packet length @@ -327,13 +335,12 @@ void e1000_vfta_set_vf(struct e1000_hw * **/ void e1000_rlpml_set_vf(struct e1000_hw *hw, u16 max_size) { - struct e1000_mbx_info *mbx = &hw->mbx; u32 msgbuf[2]; msgbuf[0] = E1000_VF_SET_LPE; msgbuf[1] = max_size; - mbx->ops.write_posted(hw, msgbuf, 2, 0); + write_and_read_response(hw, msgbuf, 2); } /**
igbvf-mbx-patch.patch
Description: igbvf-mbx-patch.patch
------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired