nvmf: Print NVMe probe messages only on attach
Change-Id: I50f0cbf792f2d88316fbba9dd90ca1389961fecf Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
f1a584a9f7
commit
ae20d784c2
@ -268,9 +268,6 @@ probe_cb(void *cb_ctx, struct spdk_pci_device *dev, struct spdk_nvme_ctrlr_opts
|
|||||||
uint8_t found_dev = spdk_pci_device_get_dev(dev);
|
uint8_t found_dev = spdk_pci_device_get_dev(dev);
|
||||||
uint8_t found_func = spdk_pci_device_get_func(dev);
|
uint8_t found_func = spdk_pci_device_get_func(dev);
|
||||||
|
|
||||||
SPDK_NOTICELOG("Probing device %x:%x:%x.%x\n",
|
|
||||||
found_domain, found_bus, found_dev, found_func);
|
|
||||||
|
|
||||||
if (ctx->any && !ctx->found) {
|
if (ctx->any && !ctx->found) {
|
||||||
ctx->found = true;
|
ctx->found = true;
|
||||||
return true;
|
return true;
|
||||||
@ -294,8 +291,15 @@ attach_cb(void *cb_ctx, struct spdk_pci_device *dev, struct spdk_nvme_ctrlr *ctr
|
|||||||
const struct spdk_nvme_ctrlr_opts *opts)
|
const struct spdk_nvme_ctrlr_opts *opts)
|
||||||
{
|
{
|
||||||
struct spdk_nvmf_probe_ctx *ctx = cb_ctx;
|
struct spdk_nvmf_probe_ctx *ctx = cb_ctx;
|
||||||
|
uint16_t found_domain = spdk_pci_device_get_domain(dev);
|
||||||
|
uint8_t found_bus = spdk_pci_device_get_bus(dev);
|
||||||
|
uint8_t found_dev = spdk_pci_device_get_dev(dev);
|
||||||
|
uint8_t found_func = spdk_pci_device_get_func(dev);
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
SPDK_NOTICELOG("Attaching NVMe device %x:%x:%x.%x to subsystem %s\n",
|
||||||
|
found_domain, found_bus, found_dev, found_func, ctx->subsystem->subnqn);
|
||||||
|
|
||||||
rc = nvmf_subsystem_add_ctrlr(ctx->subsystem, ctrlr);
|
rc = nvmf_subsystem_add_ctrlr(ctx->subsystem, ctrlr);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
SPDK_ERRLOG("Failed to add controller to subsystem\n");
|
SPDK_ERRLOG("Failed to add controller to subsystem\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user