]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/bnxt/tf_core/tf_core.c
net/bnxt: delay EEM sysmem mapping
[dpdk.git] / drivers / net / bnxt / tf_core / tf_core.c
index 00b2775edd379366ebff113f8232f7419554324a..a404cb8c78a310b8035d987f673009a82e7ad3bf 100644 (file)
@@ -49,9 +49,22 @@ tf_open_session(struct tf *tfp,
                    &slot,
                    &device);
        if (rc != 4) {
-               TFP_DRV_LOG(ERR,
+               /* PCI Domain not provided (optional in DPDK), thus we
+                * force domain to 0 and recheck.
+                */
+               domain = 0;
+
+               /* Check parsing of bus/slot/device */
+               rc = sscanf(parms->ctrl_chan_name,
+                           "%x:%x.%d",
+                           &bus,
+                           &slot,
+                           &device);
+               if (rc != 3) {
+                       TFP_DRV_LOG(ERR,
                            "Failed to scan device ctrl_chan_name\n");
-               return -EINVAL;
+                       return -EINVAL;
+               }
        }
 
        parms->session_id.internal.domain = domain;