| 492 | } |
| 493 | |
| 494 | s32 ixgbevf_set_uc_addr_vf(struct ixgbe_hw *hw, u32 index, u8 *addr) |
| 495 | { |
| 496 | u32 msgbuf[3], msgbuf_chk; |
| 497 | u8 *msg_addr = (u8 *)(&msgbuf[1]); |
| 498 | s32 ret_val; |
| 499 | |
| 500 | memset(msgbuf, 0, sizeof(msgbuf)); |
| 501 | /* |
| 502 | * If index is one then this is the start of a new list and needs |
| 503 | * indication to the PF so it can do it's own list management. |
| 504 | * If it is zero then that tells the PF to just clear all of |
| 505 | * this VF's macvlans and there is no new list. |
| 506 | */ |
| 507 | msgbuf[0] |= index << IXGBE_VT_MSGINFO_SHIFT; |
| 508 | msgbuf[0] |= IXGBE_VF_SET_MACVLAN; |
| 509 | msgbuf_chk = msgbuf[0]; |
| 510 | if (addr) |
| 511 | memcpy(msg_addr, addr, 6); |
| 512 | |
| 513 | ret_val = ixgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 3); |
| 514 | if (!ret_val) { |
| 515 | msgbuf[0] &= ~IXGBE_VT_MSGTYPE_CTS; |
| 516 | |
| 517 | if (msgbuf[0] == (msgbuf_chk | IXGBE_VT_MSGTYPE_NACK)) |
| 518 | return IXGBE_ERR_OUT_OF_MEM; |
| 519 | } |
| 520 | |
| 521 | return ret_val; |
| 522 | } |
| 523 | |
| 524 | /** |
| 525 | * ixgbe_setup_mac_link_vf - Setup MAC link settings |
no test coverage detected