From 5ea92b8db2a0cb05c3d17bd1f842442b3685e221 Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Fri, 2 Oct 2020 10:43:40 -0500 Subject: [PATCH] kernel-boot/mlnx-sf: Change PF_BAR2_SIZE and remove limits Starting FW 18/24.28.1100 PF_BAR2_SIZE value should be increased by 1. max_mdevs limits are set by FW Signed-off-by: Vladimir Sokolovsky --- kernel-boot/mlnx-sf | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/kernel-boot/mlnx-sf b/kernel-boot/mlnx-sf index 807210d..a448db0 100755 --- a/kernel-boot/mlnx-sf +++ b/kernel-boot/mlnx-sf @@ -42,8 +42,7 @@ export uuid_path="" export mac="" export permanent=0 export conf="/etc/mellanox/mlnx-sf.conf" -export PF_BAR2_SIZE=1 -export LIMIT_MAX_MDEVS=2 +export PF_BAR2_SIZE=3 usage() { cat << EOF @@ -107,28 +106,6 @@ set_max_mdevs() { exit 1 fi - PF_BAR2_SIZE=`get_config_value PF_BAR2_SIZE` - case "X${PF_BAR2_SIZE}" in - X1) - LIMIT_MAX_MDEVS=2 - ;; - X2) - LIMIT_MAX_MDEVS=16 - ;; - X3) - LIMIT_MAX_MDEVS=32 - ;; - *) - error "Enable SFs first, using: $prog -a enable -d ${device}" - exit 1 - ;; - esac - - if [ $max_mdevs -gt $LIMIT_MAX_MDEVS ]; then - max_mdevs=$LIMIT_MAX_MDEVS - warn "Maximum number of supported MDEV devices is limited to $LIMIT_MAX_MDEVS" - fi - x=$(cat ${devpath}/mdev_supported_types/mlx5_core-local/max_mdevs) if [ "$x" -ne $max_mdevs ] ;then ex "echo $max_mdevs > ${devpath}/mdev_supported_types/mlx5_core-local/max_mdevs" @@ -200,9 +177,6 @@ done enable() { # Action: enable info "Enabling SF for device: ${device}" - if (lspci -n -s ${device} | grep -q 'a2d6'); then - PF_BAR2_SIZE=2 - fi current_pf_bar2_size=`get_config_value PF_BAR2_SIZE` current_pf_bar2_enable=`get_config_value PF_BAR2_ENABLE` if [[ "${current_pf_bar2_size}" == "$PF_BAR2_SIZE" && "$current_pf_bar2_enable" == "True" ]]; then