summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>2018-10-18 17:37:06 +0200
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-10-24 23:00:05 +0200
commit99189e8b6b0ea3e561df8602982b796a146a6747 (patch)
tree7897cfa2ff645b3850e0c0e41c7c8accad9d2099 /drivers/net
parentice: Update expected FW version (diff)
downloadlinux-99189e8b6b0ea3e561df8602982b796a146a6747.tar.xz
linux-99189e8b6b0ea3e561df8602982b796a146a6747.zip
ice: Use capability count returned by the firmware
The firmware now returns the capability count in the command buffer. Use it. 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')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_common.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index c52f450f2c0d..78df54b25bf1 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -1531,9 +1531,7 @@ ice_aq_discover_caps(struct ice_hw *hw, void *buf, u16 buf_size, u32 *cap_count,
if (!status)
ice_parse_caps(hw, buf, le32_to_cpu(cmd->count), opc);
else if (hw->adminq.sq_last_status == ICE_AQ_RC_ENOMEM)
- *cap_count =
- DIV_ROUND_UP(le16_to_cpu(desc.datalen),
- sizeof(struct ice_aqc_list_caps_elem));
+ *cap_count = le32_to_cpu(cmd->count);
return status;
}