Import from CS git

This commit is contained in:
eabdullin 2024-07-24 13:31:56 +03:00
parent 895132d62b
commit 70b0675f52
3 changed files with 22 additions and 3 deletions

View File

@ -391,10 +391,18 @@ _get_hpyerv_physical_driver() {
_get_nic_driver "$_physical_nic"
}
_get_physical_function_driver() {
local _physfn_dir=/sys/class/net/"$1"/device/physfn
if [[ -e "$_physfn_dir" ]]; then
basename "$(readlink -f "$_physfn_dir"/driver)"
fi
}
kdump_install_nic_driver() {
local _netif _driver _drivers
_drivers=()
_drivers=('=drivers/net/phy' '=drivers/net/mdio')
for _netif in $1; do
[[ $_netif == lo ]] && continue
@ -418,6 +426,9 @@ kdump_install_nic_driver() {
fi
_drivers+=("$_driver")
# For a Single Root I/O Virtualization (SR-IOV) virtual device,
# the driver of physical device needs to be installed as well
_drivers+=("$(_get_physical_function_driver "$_netif")")
done
[[ -n ${_drivers[*]} ]] || return

View File

@ -257,7 +257,7 @@ check_user_configured_target()
verify_core_collector()
{
local _cmd="${1%% *}"
local _params="${1#* }"
local _params="${1#${_cmd}}"
if [[ $_cmd != "makedumpfile" ]]; then
if is_raw_dump_target; then

View File

@ -5,7 +5,7 @@
Name: kexec-tools
Version: 2.0.27
Release: 8%{?dist}
Release: 8%{?dist}.2
License: GPLv2
Summary: The kexec/kdump userspace component
@ -408,6 +408,14 @@ fi
%endif
%changelog
* Tue May 14 2024 Tao Liu <ltao@redhat.com> - 2.0.27-8.2
- Install the driver of physical device for a SR-IOV virtual device
- Try to install PHY and MDIO bus drivers explicitly
* Wed May 08 2024 Tao Liu <ltao@redhat.com> - 2.0.27-8.1
- kexec_file: add kexec_file flag to support debug printing
- mkdumprd: Fix makedumpfile parameter check.
* Tue Jan 30 2024 Tao Liu <ltao@redhat.com> - 2.0.27-8
- dracut-module-setup: Skip initrd-cleanup and initrd-parse-etc in kdump