Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99189e8b authored by Anirudh Venkataramanan's avatar Anirudh Venkataramanan Committed by Jeff Kirsher
Browse files

ice: Use capability count returned by the firmware



The firmware now returns the capability count in the command buffer.
Use it.

Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent ac5a8aef
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;
}