2 # SPDX-License-Identifier: GPL-2.0
4 lib_dir
=$
(dirname $0)/..
/..
/..
/net
/forwarding
6 ALL_TESTS
="fw_flash_test"
12 DEV_NAME
=netdevsim
$BUS_ADDR
13 SYSFS_NET_DIR
=/sys
/bus
/netdevsim
/devices
/$DEV_NAME/net
/
14 DEBUGFS_DIR
=/sys
/kernel
/debug
/netdevsim
/$DEV_NAME/
15 DL_HANDLE
=netdevsim
/$DEV_NAME
21 devlink dev flash
$DL_HANDLE file dummy
22 check_err $?
"Failed to flash with status updates on"
24 echo "n"> $DEBUGFS_DIR/fw_update_status
25 check_err $?
"Failed to disable status updates"
27 devlink dev flash
$DL_HANDLE file dummy
28 check_err $?
"Failed to flash with status updates off"
30 log_test
"fw flash test"
36 echo "$BUS_ADDR $PORT_COUNT" > /sys
/bus
/netdevsim
/new_device
37 while [ ! -d $SYSFS_NET_DIR ] ; do :; done
43 echo "$BUS_ADDR" > /sys
/bus
/netdevsim
/del_device