summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgbe/ixgbe_vf.c
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2015-06-01 17:35:29 +0000
committerjfv <jfv@FreeBSD.org>2015-06-01 17:35:29 +0000
commit03e93dab83ad63cb1aa518f44822d7b192a27274 (patch)
tree978bd6f1d67e83ce240481d3484486f399568743 /sys/dev/ixgbe/ixgbe_vf.c
parent9db743f69ba4b08b150e61c2fdc78895378158a0 (diff)
downloadFreeBSD-src-03e93dab83ad63cb1aa518f44822d7b192a27274.zip
FreeBSD-src-03e93dab83ad63cb1aa518f44822d7b192a27274.tar.gz
Revert last commit, to remove added skeleton tree.
Diffstat (limited to 'sys/dev/ixgbe/ixgbe_vf.c')
-rw-r--r--sys/dev/ixgbe/ixgbe_vf.c57
1 files changed, 2 insertions, 55 deletions
diff --git a/sys/dev/ixgbe/ixgbe_vf.c b/sys/dev/ixgbe/ixgbe_vf.c
index 2ce4d32..c010cf4 100644
--- a/sys/dev/ixgbe/ixgbe_vf.c
+++ b/sys/dev/ixgbe/ixgbe_vf.c
@@ -185,8 +185,6 @@ s32 ixgbe_reset_hw_vf(struct ixgbe_hw *hw)
/* Call adapter stop to disable tx/rx and clear interrupts */
hw->mac.ops.stop_adapter(hw);
- /* reset the api version */
- hw->api_version = ixgbe_mbox_api_10;
DEBUGOUT("Issuing a function level reset to MAC\n");
@@ -668,57 +666,6 @@ int ixgbevf_negotiate_api_version(struct ixgbe_hw *hw, int api)
int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int *num_tcs,
unsigned int *default_tc)
{
- int err;
- u32 msg[5];
-
- /* do nothing if API doesn't support ixgbevf_get_queues */
- switch (hw->api_version) {
- case ixgbe_mbox_api_11:
- break;
- default:
- return 0;
- }
-
- /* Fetch queue configuration from the PF */
- msg[0] = IXGBE_VF_GET_QUEUES;
- msg[1] = msg[2] = msg[3] = msg[4] = 0;
- err = hw->mbx.ops.write_posted(hw, msg, 5, 0);
-
- if (!err)
- err = hw->mbx.ops.read_posted(hw, msg, 5, 0);
-
- if (!err) {
- msg[0] &= ~IXGBE_VT_MSGTYPE_CTS;
-
- /*
- * if we we didn't get an ACK there must have been
- * some sort of mailbox error so we should treat it
- * as such
- */
- if (msg[0] != (IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_ACK))
- return IXGBE_ERR_MBX;
-
- /* record and validate values from message */
- hw->mac.max_tx_queues = msg[IXGBE_VF_TX_QUEUES];
- if (hw->mac.max_tx_queues == 0 ||
- hw->mac.max_tx_queues > IXGBE_VF_MAX_TX_QUEUES)
- hw->mac.max_tx_queues = IXGBE_VF_MAX_TX_QUEUES;
-
- hw->mac.max_rx_queues = msg[IXGBE_VF_RX_QUEUES];
- if (hw->mac.max_rx_queues == 0 ||
- hw->mac.max_rx_queues > IXGBE_VF_MAX_RX_QUEUES)
- hw->mac.max_rx_queues = IXGBE_VF_MAX_RX_QUEUES;
-
- *num_tcs = msg[IXGBE_VF_TRANS_VLAN];
- /* in case of unknown state assume we cannot tag frames */
- if (*num_tcs > hw->mac.max_rx_queues)
- *num_tcs = 1;
-
- *default_tc = msg[IXGBE_VF_DEF_QUEUE];
- /* default to queue 0 on out-of-bounds queue number */
- if (*default_tc >= hw->mac.max_tx_queues)
- *default_tc = 0;
- }
-
- return err;
+ UNREFERENCED_3PARAMETER(hw, num_tcs, default_tc);
+ return IXGBE_SUCCESS;
}
OpenPOWER on IntegriCloud