* txgbevf_negotiate_api_version - Negotiate supported API version * @hw: pointer to the HW structure * @api: integer containing requested API version **/
| 574 | * @api: integer containing requested API version |
| 575 | **/ |
| 576 | int txgbevf_negotiate_api_version(struct txgbe_hw *hw, int api) |
| 577 | { |
| 578 | int err; |
| 579 | u32 msg[3]; |
| 580 | |
| 581 | /* Negotiate the mailbox API version */ |
| 582 | msg[0] = TXGBE_VF_API_NEGOTIATE; |
| 583 | msg[1] = api; |
| 584 | msg[2] = 0; |
| 585 | |
| 586 | err = txgbevf_write_msg_read_ack(hw, msg, msg, 3); |
| 587 | if (!err) { |
| 588 | msg[0] &= ~TXGBE_VT_MSGTYPE_CTS; |
| 589 | |
| 590 | /* Store value and return 0 on success */ |
| 591 | if (msg[0] == (TXGBE_VF_API_NEGOTIATE | TXGBE_VT_MSGTYPE_ACK)) { |
| 592 | hw->api_version = api; |
| 593 | return 0; |
| 594 | } |
| 595 | |
| 596 | err = TXGBE_ERR_INVALID_ARGUMENT; |
| 597 | } |
| 598 | |
| 599 | return err; |
| 600 | } |
| 601 | |
| 602 | int txgbevf_get_queues(struct txgbe_hw *hw, unsigned int *num_tcs, |
| 603 | unsigned int *default_tc) |
no test coverage detected