DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tduszynski@marvell.com>
To: <dev@dpdk.org>, Jakub Palider <jpalider@marvell.com>,
	Tomasz Duszynski <tduszynski@marvell.com>
Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Subject: [dpdk-dev] [PATCH 1/3] raw/cnxk_bphy: fix device lookup
Date: Mon, 16 Aug 2021 01:12:00 +0200	[thread overview]
Message-ID: <20210815231202.1192974-2-tduszynski@marvell.com> (raw)
In-Reply-To: <20210815231202.1192974-1-tduszynski@marvell.com>

Name needs to be prepared before the lookup otherwise
PMD will not be released.

Fixes: 24d9c5d59d5d ("raw/cnxk_bphy: add baseband PHY skeleton driver")

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
---
 drivers/raw/cnxk_bphy/cnxk_bphy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
index 9cb3f8d332..8a0d2224c0 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
@@ -306,14 +306,13 @@ bphy_rawdev_remove(struct rte_pci_device *pci_dev)
 		return -EINVAL;
 	}
 
+	bphy_rawdev_get_name(name, pci_dev);
 	rawdev = rte_rawdev_pmd_get_named_dev(name);
 	if (rawdev == NULL) {
 		plt_err("invalid device name (%s)", name);
 		return -EINVAL;
 	}
 
-	bphy_rawdev_get_name(name, pci_dev);
-
 	return rte_rawdev_pmd_release(rawdev);
 }
 
-- 
2.25.1


  reply	other threads:[~2021-08-15 23:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-15 23:11 [dpdk-dev] [PATCH 0/3] support reading NPA/SSO PF function Tomasz Duszynski
2021-08-15 23:12 ` Tomasz Duszynski [this message]
2021-09-28 13:20   ` [dpdk-dev] [PATCH 1/3] raw/cnxk_bphy: fix device lookup Jerin Jacob
2021-08-15 23:12 ` [dpdk-dev] [PATCH 2/3] common/cnxk: support reading NPA/SSO PF function Tomasz Duszynski
2021-08-15 23:12 ` [dpdk-dev] [PATCH 3/3] raw/cnxk_bphy: " Tomasz Duszynski

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=20210815231202.1192974-2-tduszynski@marvell.com \
    --to=tduszynski@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=jpalider@marvell.com \
    /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).