patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Nicolas Chautru <nicolas.chautru@intel.com>
To: akhil.goyal@nxp.com, dev@dpdk.org
Cc: ferruh.yigit@intel.com, thomas@monjalon.net,
	Nic Chautru <nicolas.chautru@intel.com>,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH v2 1/2] baseband/fpga_lte_fec: fix probing fatal failure
Date: Tue, 22 Oct 2019 06:16:16 -0700	[thread overview]
Message-ID: <1571750177-387063-2-git-send-email-nicolas.chautru@intel.com> (raw)
In-Reply-To: <1571750177-387063-1-git-send-email-nicolas.chautru@intel.com>

From: Nic Chautru <nicolas.chautru@intel.com>

A change to PCI mapping assumption was missed earlier, this causes
probing to fail with the fpga_lte_fec PMD when checking for name
of the rte_driver (not set yet) instead of the rte_pci_driver.

Fixes: 391797f04208 ("drivers/bus: move driver assignment to end of probing")
Cc: thomas@monjalon.net
Cc: stable@dpdk.org

Signed-off-by: Nic Chautru <nicolas.chautru@intel.com>
---
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index 7e05b94..2fc7f11 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -2307,7 +2307,7 @@ struct __rte_cache_aligned fpga_queue {
 
 /* Initialization Function */
 static void
-fpga_lte_fec_init(struct rte_bbdev *dev)
+fpga_lte_fec_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
 {
 	struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev->device);
 
@@ -2318,7 +2318,7 @@ struct __rte_cache_aligned fpga_queue {
 	dev->dequeue_dec_ops = fpga_dequeue_dec;
 
 	((struct fpga_lte_fec_device *) dev->data->dev_private)->pf_device =
-			!strcmp(dev->device->driver->name,
+			!strcmp(drv->driver.name,
 					RTE_STR(FPGA_LTE_FEC_PF_DRIVER_NAME));
 	((struct fpga_lte_fec_device *) dev->data->dev_private)->mmio_base =
 			pci_dev->mem_resource[0].addr;
@@ -2331,7 +2331,7 @@ struct __rte_cache_aligned fpga_queue {
 }
 
 static int
-fpga_lte_fec_probe(struct rte_pci_driver *pci_drv __rte_unused,
+fpga_lte_fec_probe(struct rte_pci_driver *pci_drv,
 	struct rte_pci_device *pci_dev)
 {
 	struct rte_bbdev *bbdev = NULL;
@@ -2368,7 +2368,7 @@ struct __rte_cache_aligned fpga_queue {
 	bbdev->data->socket_id = pci_dev->device.numa_node;
 
 	/* Invoke FEC FPGA device initialization function */
-	fpga_lte_fec_init(bbdev);
+	fpga_lte_fec_init(bbdev, pci_drv);
 
 	rte_bbdev_log_debug("bbdev id = %u [%s]",
 			bbdev->data->dev_id, dev_name);
-- 
1.8.3.1


       reply	other threads:[~2019-10-22 20:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1571750177-387063-1-git-send-email-nicolas.chautru@intel.com>
2019-10-22 13:16 ` Nicolas Chautru [this message]
2019-10-22 13:16 ` [dpdk-stable] [PATCH v2 2/2] baseband/fpga_lte_fec: fix to polling of MMIO register Nicolas Chautru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1571750177-387063-2-git-send-email-nicolas.chautru@intel.com \
    --to=nicolas.chautru@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).