patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] bus/pci: fix hardware ids parsing on Windows
@ 2020-08-23 13:06 Tal Shnaiderman
  2020-09-09 23:15 ` Narcisa Ana Maria Vasile
  0 siblings, 1 reply; 3+ messages in thread
From: Tal Shnaiderman @ 2020-08-23 13:06 UTC (permalink / raw)
  To: dev
  Cc: thomas, pallavi.kadam, dmitry.kozliuk, ranjit.menon, navasile,
	harini.ramakrishnan, Tal Shnaiderman, stable

From: Tal Shnaiderman <talshn@mellanox.com>

Swap subsystem vendor id and subsystem device id.
Parse the SPDRP_HARDWAREID string with correct type values.

Fixes: b762221ac24 ("bus/pci: support Windows with bifurcated drivers")
Cc: stable@dpdk.org

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
 drivers/bus/pci/windows/pci.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index 489aa7902a..c80bd55716 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -270,17 +270,18 @@ static int
 parse_pci_hardware_id(const char *buf, struct rte_pci_id *pci_id)
 {
 	int ids = 0;
-	uint16_t vendor_id, device_id, subvendor_id = 0;
+	uint16_t vendor_id, device_id;
+	uint32_t subvendor_id = 0;
 
-	ids = sscanf_s(buf, "PCI\\VEN_%x&DEV_%x&SUBSYS_%x", &vendor_id,
-		&device_id, &subvendor_id);
+	ids = sscanf_s(buf, "PCI\\VEN_%" PRIx16 "&DEV_%" PRIx16 "&SUBSYS_%"
+		PRIx32, &vendor_id, &device_id, &subvendor_id);
 	if (ids != 3)
 		return -1;
 
 	pci_id->vendor_id = vendor_id;
 	pci_id->device_id = device_id;
-	pci_id->subsystem_vendor_id = subvendor_id >> 16;
-	pci_id->subsystem_device_id = subvendor_id & 0xffff;
+	pci_id->subsystem_device_id = subvendor_id >> 16;
+	pci_id->subsystem_vendor_id = subvendor_id & 0xffff;
 	return 0;
 }
 
-- 
2.16.1.windows.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] bus/pci: fix hardware ids parsing on Windows
  2020-08-23 13:06 [dpdk-stable] [PATCH] bus/pci: fix hardware ids parsing on Windows Tal Shnaiderman
@ 2020-09-09 23:15 ` Narcisa Ana Maria Vasile
  2020-09-11  0:06   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Narcisa Ana Maria Vasile @ 2020-09-09 23:15 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, thomas, pallavi.kadam, dmitry.kozliuk, ranjit.menon,
	harini.ramakrishnan, Tal Shnaiderman, stable

On Sun, Aug 23, 2020 at 04:06:04PM +0300, Tal Shnaiderman wrote:
> From: Tal Shnaiderman <talshn@mellanox.com>
> 
> Swap subsystem vendor id and subsystem device id.
> Parse the SPDRP_HARDWAREID string with correct type values.
> 
> Fixes: b762221ac24 ("bus/pci: support Windows with bifurcated drivers")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> ---
>  drivers/bus/pci/windows/pci.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c

Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] bus/pci: fix hardware ids parsing on Windows
  2020-09-09 23:15 ` Narcisa Ana Maria Vasile
@ 2020-09-11  0:06   ` " Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-09-11  0:06 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, pallavi.kadam, dmitry.kozliuk, ranjit.menon,
	harini.ramakrishnan, stable, Narcisa Ana Maria Vasile

10/09/2020 01:15, Narcisa Ana Maria Vasile:
> On Sun, Aug 23, 2020 at 04:06:04PM +0300, Tal Shnaiderman wrote:
> > From: Tal Shnaiderman <talshn@mellanox.com>
> > 
> > Swap subsystem vendor id and subsystem device id.
> > Parse the SPDRP_HARDWAREID string with correct type values.
> > 
> > Fixes: b762221ac24 ("bus/pci: support Windows with bifurcated drivers")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> 
> Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>

Applied, thanks



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-23 13:06 [dpdk-stable] [PATCH] bus/pci: fix hardware ids parsing on Windows Tal Shnaiderman
2020-09-09 23:15 ` Narcisa Ana Maria Vasile
2020-09-11  0:06   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox