14ce25ab00
This patch adds waitforblk() after rebinding the driver. If timing was unfortunate, it was possible to issue id-ctrlr command to a device that was not yet ready. Meaning the support for fw command was not read properly. No error was reported due to "set +e", so this patch moves it till after id-ctrlr. Example of the error: # get_nvme_ctrlr_from_bdf 0000:82:00.0 # readlink -f /sys/class/nvme/nvme9 # grep 0000:82:00.0/nvme/nvme # bdf_sysfs_path=/sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9 # [[ -z /sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9 ]] # basename /sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9 # printf '%s\n' nvme9 # nvme_name=nvme9 # [[ -z nvme9 ]] # set +e # ctrlr=/dev/nvme9 # ns=/dev/nvme9n1 # /usr/local/src/nvme-cli/nvme id-ctrl /dev/nvme9 # grep oacs # cut -d: -f2 /dev/nvme9: Resource temporarily unavailable Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I5728a5062cd553eb39d18d9869fdf56319a27777 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2950 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> |
||
---|---|---|
.. | ||
.gitignore | ||
cuse.c | ||
Makefile | ||
nvme_cuse_rpc.sh | ||
nvme_cuse.sh | ||
nvme_ns_manage_cuse.sh | ||
spdk_nvme_cli_cuse.sh | ||
spdk_smartctl_cuse.sh |