diff options
author | Ivan Vecera <ivecera@redhat.com> | 2023-10-13 19:07:54 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-15 14:33:41 +0100 |
commit | df19ea696644bea14dc2b804066a6b91aa4aaf43 (patch) | |
tree | b4b725f1a913913b1b1ec16157b4a59b686a0cb7 /drivers/cpufreq/acpi-cpufreq.c | |
parent | 5a423552e0d9bb882f22cb0bf85f520ca2692706 (diff) |
i40e: Refactor and rename i40e_read_pba_string()
Function i40e_read_pba_string() is currently unused but will be used
by subsequent patch to provide board ID via devlink device info.
The function reads PBA block from NVM so it cannot be called during
adapter reset and as we would like to provide PBA ID via devlink
info it is better to read the PBA ID during i40e_probe() and cache
it in i40e_hw structure to avoid a waiting for potential adapter
reset in devlink info callback.
So...
- Remove pba_num and pba_num_size arguments from the function,
allocate resource managed buffer to store PBA ID string and
save resulting pointer to i40e_hw->pba_id field
- Make the function void as the PBA ID can be missing and in this
case (or in case of NVM reading failure) the i40e_hw->pba_id
will be NULL
- Rename the function to i40e_get_pba_string() to align with other
functions like i40e_get_oem_version() i40e_get_port_mac_addr()...
- Call this function on init during i40e_probe()
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/cpufreq/acpi-cpufreq.c')
0 files changed, 0 insertions, 0 deletions