Commit 7c49c985 authored by Allen Hubbe's avatar Allen Hubbe Committed by Jon Mason

NTB: ntb_test: add parameter for doorbell bitmask

If the test attempts to clear doorbell bits that are invalid for the
hardware, then the test will fail.  Provide a parameter to specify the
doorbell bits to clear.  Set default doorbell bits that work for XEON.
Signed-off-by: default avatarAllen Hubbe <Allen.Hubbe@dell.com>
Acked-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent c2d42edb
...@@ -18,6 +18,7 @@ LIST_DEVS=FALSE ...@@ -18,6 +18,7 @@ LIST_DEVS=FALSE
DEBUGFS=${DEBUGFS-/sys/kernel/debug} DEBUGFS=${DEBUGFS-/sys/kernel/debug}
DB_BITMASK=0x7FFF
PERF_RUN_ORDER=32 PERF_RUN_ORDER=32
MAX_MW_SIZE=0 MAX_MW_SIZE=0
RUN_DMA_TESTS= RUN_DMA_TESTS=
...@@ -38,6 +39,7 @@ function show_help() ...@@ -38,6 +39,7 @@ function show_help()
echo "be highly recommended." echo "be highly recommended."
echo echo
echo "Options:" echo "Options:"
echo " -b BITMASK doorbell clear bitmask for ntb_tool"
echo " -C don't cleanup ntb modules on exit" echo " -C don't cleanup ntb modules on exit"
echo " -d run dma tests" echo " -d run dma tests"
echo " -h show this help message" echo " -h show this help message"
...@@ -52,8 +54,9 @@ function show_help() ...@@ -52,8 +54,9 @@ function show_help()
function parse_args() function parse_args()
{ {
OPTIND=0 OPTIND=0
while getopts "Cdhlm:r:p:w:" opt; do while getopts "b:Cdhlm:r:p:w:" opt; do
case "$opt" in case "$opt" in
b) DB_BITMASK=${OPTARG} ;;
C) DONT_CLEANUP=1 ;; C) DONT_CLEANUP=1 ;;
d) RUN_DMA_TESTS=1 ;; d) RUN_DMA_TESTS=1 ;;
h) show_help; exit 0 ;; h) show_help; exit 0 ;;
...@@ -158,7 +161,7 @@ function doorbell_test() ...@@ -158,7 +161,7 @@ function doorbell_test()
echo "Running db tests on: $(basename $LOC) / $(basename $REM)" echo "Running db tests on: $(basename $LOC) / $(basename $REM)"
write_file "c 0xFFFFFFFF" "$REM/db" write_file "c $DB_BITMASK" "$REM/db"
for ((i=1; i <= 8; i++)); do for ((i=1; i <= 8; i++)); do
let DB=$(read_file "$REM/db") || true let DB=$(read_file "$REM/db") || true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment