* ixgbevf_negotiate_api_version - Negotiate supported API version * @hw: pointer to the HW structure * @api: integer containing requested API version **/
| 668 | * @api: integer containing requested API version |
| 669 | **/ |
| 670 | int ixgbevf_negotiate_api_version(struct ixgbe_hw *hw, int api) |
| 671 | { |
| 672 | int err; |
| 673 | u32 msg[3]; |
| 674 | |
| 675 | /* Negotiate the mailbox API version */ |
| 676 | msg[0] = IXGBE_VF_API_NEGOTIATE; |
| 677 | msg[1] = api; |
| 678 | msg[2] = 0; |
| 679 | |
| 680 | err = ixgbevf_write_msg_read_ack(hw, msg, msg, 3); |
| 681 | if (!err) { |
| 682 | msg[0] &= ~IXGBE_VT_MSGTYPE_CTS; |
| 683 | |
| 684 | /* Store value and return 0 on success */ |
| 685 | if (msg[0] == (IXGBE_VF_API_NEGOTIATE | IXGBE_VT_MSGTYPE_ACK)) { |
| 686 | hw->api_version = api; |
| 687 | return 0; |
| 688 | } |
| 689 | |
| 690 | err = IXGBE_ERR_INVALID_ARGUMENT; |
| 691 | } |
| 692 | |
| 693 | return err; |
| 694 | } |
| 695 | |
| 696 | int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int *num_tcs, |
| 697 | unsigned int *default_tc) |
no test coverage detected