autobuild: unbind NVMe devices on FreeBSD

Change-Id: I5e6a6ca6751d77aed48bedc2e59f97139dd8ef00
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2015-10-08 11:05:17 -07:00
parent 17f255e208
commit 3e5fe6f602
3 changed files with 5 additions and 3 deletions

View File

@ -23,7 +23,7 @@ timing_enter afterboot
./scripts/configure_hugepages.sh 3072
timing_exit afterboot
lsmod | grep -q ^nvme && rmmod nvme || true
./scripts/unbind_nvme.sh
#####################
# Unit Tests

View File

@ -18,6 +18,7 @@ function cleanup_linux() {
function cleanup_freebsd {
kldunload contigmem.ko || true
kldunload nic_uio.ko || true
}
if [ `uname` = Linux ]; then

View File

@ -3,7 +3,7 @@
set -e
function configure_linux {
lsmod | grep nvme && rmmod nvme
rmmod nvme || true
}
function configure_freebsd {
@ -12,8 +12,9 @@ function configure_freebsd {
echo $AWK_PROG > $TMP
NVME_PCICONF=`pciconf -l | grep class=0x010802`
BDFS=`echo $NVME_PCICONF | awk -F: -f $TMP`
kldunload nic_uio.ko || true
kenv hw.nic_uio.bdfs=$BDFS
kldload `find . -name nic_uio.ko | head -1`
kldload nic_uio.ko
rm $TMP
}