Lines Matching +full:speed +full:- +full:bin
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
28 busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:"
29 if [[ $? -ne 0 ]]; then
62 if [[ $autoneg -eq 0 ]]; then
66 ethtool -s $swp1 speed $max_speed lanes $unsupported_lanes $autoneg_str &> /dev/null
76 local -a lanes_arr
77 local -a speeds_arr
78 local -a max_values
93 local speed=$1; shift
98 if [[ $speed -eq ${arr[$i]} && $lanes -eq ${arr[i+1]} ]]; then
113 local -a linkmodes_params=($(dev_linkmodes_params_get $swp1 1))
114 local -a max_values=($(max_speed_and_lanes_get $swp1 "${linkmodes_params[@]}"))
120 while [[ $lanes -ge 1 ]]; do
122 if [[ $? -eq 1 ]]; then
123 ethtool_set $swp1 speed $max_speed lanes $lanes
127 busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:"
151 local -a linkmodes_params=($(dev_linkmodes_params_get $swp1 1))
152 local -a max_values=($(max_speed_and_lanes_get $swp1 "${linkmodes_params[@]}"))
158 while [[ $lanes -ge 1 ]]; do
160 if [[ $? -eq 1 ]]; then
161 ethtool_set $swp1 speed $max_speed lanes $lanes autoneg off
162 ethtool_set $swp2 speed $max_speed lanes $lanes autoneg off
166 busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:"
181 ethtool -s $swp2 autoneg on
182 ethtool -s $swp1 autoneg on