aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_common.c
diff options
context:
space:
mode:
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>2018-09-19 20:42:54 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-10-03 10:42:29 -0400
commit75d2b253026b8b1cb625f6ccdb9d54cdecae7935 (patch)
tree6b38e02f7cffe61b3d66a2c4e2aab7076747fd10 /drivers/net/ethernet/intel/ice/ice_common.c
parent16fc087b9cb22c9a97307cc24a5413d0df68fe11 (diff)
ice: Add support to detect SR-IOV capability and mailbox queues
Mailbox queue is a type of control queue that's used for communication between PF and VF. This patch adds code to initialize, configure and use mailbox queues. This patch also adds support to detect and parse SR-IOV capabilities returned by the hardware. Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_common.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_common.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 68fbbb92d504..0fe054e4bfb8 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -1406,6 +1406,28 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 cap_count,
1406 u16 cap = le16_to_cpu(cap_resp->cap); 1406 u16 cap = le16_to_cpu(cap_resp->cap);
1407 1407
1408 switch (cap) { 1408 switch (cap) {
1409 case ICE_AQC_CAPS_SRIOV:
1410 caps->sr_iov_1_1 = (number == 1);
1411 ice_debug(hw, ICE_DBG_INIT,
1412 "HW caps: SR-IOV = %d\n", caps->sr_iov_1_1);
1413 break;
1414 case ICE_AQC_CAPS_VF:
1415 if (dev_p) {
1416 dev_p->num_vfs_exposed = number;
1417 ice_debug(hw, ICE_DBG_INIT,
1418 "HW caps: VFs exposed = %d\n",
1419 dev_p->num_vfs_exposed);
1420 } else if (func_p) {
1421 func_p->num_allocd_vfs = number;
1422 func_p->vf_base_id = logical_id;
1423 ice_debug(hw, ICE_DBG_INIT,
1424 "HW caps: VFs allocated = %d\n",
1425 func_p->num_allocd_vfs);
1426 ice_debug(hw, ICE_DBG_INIT,
1427 "HW caps: VF base_id = %d\n",
1428 func_p->vf_base_id);
1429 }
1430 break;
1409 case ICE_AQC_CAPS_VSI: 1431 case ICE_AQC_CAPS_VSI:
1410 if (dev_p) { 1432 if (dev_p) {
1411 dev_p->num_vsi_allocd_to_host = number; 1433 dev_p->num_vsi_allocd_to_host = number;