1. 24 7月, 2020 3 次提交
    • J
      ice: split ice_discover_caps into two functions · 81aed647
      Jacob Keller 提交于
      Using the new ice_aq_list_caps and ice_parse_(dev|func)_caps functions,
      replace ice_discover_caps with two functions that each take a pointer to
      the dev_caps and func_caps structures respectively.
      
      This makes the side effect of updating the hw->dev_caps and
      hw->func_caps obvious from reading the implementation of the function.
      Additionally, it opens the way for enabling reading of device
      capabilities outside of the initialization flow. By passing in
      a pointer, another caller will be able to read the capabilities without
      modifying the HW capabilities structures.
      
      As there are no other callers, it is safe to now remove
      ice_aq_discover_caps and ice_parse_caps.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      81aed647
    • J
      ice: split ice_parse_caps into separate functions · 595b13e2
      Jacob Keller 提交于
      The ice_parse_caps function is used to convert the capability block data
      coming from firmware into a structured format used by other parts of the
      code.
      
      The current implementation directly updates the hw->func_caps and
      hw->dev_caps structures. It is directly called from within
      ice_aq_discover_caps. This causes the discover_caps function to have the
      side effect of modifying the HW capability structures, which is not
      intuitive.
      
      Split this function into ice_parse_dev_caps and ice_parse_func_caps.
      These functions will take a pointer to the dev_caps and func_caps
      respectively. Also create an ice_parse_common_caps for sharing the
      capability logic that is common to device and function.
      
      Doing so enables a future refactor to allow reading and parsing
      capabilities into a local caps structure instead of modifying the
      members of the HW structure directly.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      595b13e2
    • J
      ice: refactor ice_discover_caps to avoid need to retry · 1082b360
      Jacob Keller 提交于
      The ice_discover_caps function is used to read the device and function
      capabilities, updating the hardware capabilities structures with
      relevant data.
      
      The exact number of capabilities returned by the hardware is unknown
      ahead of time. The AdminQ command will report the total number of
      capabilities in the return buffer.
      
      The current implementation involves requesting capabilities once,
      reading this returned size, and then re-requested with that size.
      
      This isn't really necessary. The firmware interface has a maximum size
      of ICE_AQ_MAX_BUF_LEN. Firmware can never return more than
      ICE_AQ_MAX_BUF_LEN / sizeof(struct ice_aqc_list_caps_elem) capabilities.
      
      Avoid the retry loop by simply allocating a buffer of size
      ICE_AQ_MAX_BUF_LEN. This is significantly simpler than retrying. The
      extra allocation isn't a big deal, as it will be released after we
      finish parsing the capabilities.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      1082b360
  2. 15 7月, 2020 1 次提交
  3. 11 7月, 2020 2 次提交
  4. 10 7月, 2020 1 次提交
  5. 02 7月, 2020 15 次提交
  6. 01 7月, 2020 2 次提交
  7. 30 6月, 2020 13 次提交
  8. 27 6月, 2020 1 次提交
  9. 26 6月, 2020 2 次提交