mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 11:53:53 +00:00
Add mlxsw lib for common defines, helpers etc. Signed-off-by: Shalom Toledo <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
14 lines
362 B
Bash
14 lines
362 B
Bash
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
##############################################################################
|
|
# Defines
|
|
|
|
if [[ ! -v MLXSW_CHIP ]]; then
|
|
MLXSW_CHIP=$(devlink -j dev info $DEVLINK_DEV | jq -r '.[][]["driver"]')
|
|
if [ -z "$MLXSW_CHIP" ]; then
|
|
echo "SKIP: Device $DEVLINK_DEV doesn't support devlink info command"
|
|
exit 1
|
|
fi
|
|
fi
|