From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>
Subject: [PATCH 2/2] net/ngbe: fix customized devices probe failure
Date: Wed, 29 Jun 2022 11:34:17 +0800 [thread overview]
Message-ID: <20220629033417.958443-2-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20220629033417.958443-1-jiawenwu@trustnetic.com>
The devices with OEM subsystem vendor ID failed to be initialized,
because flash was read before memory address was set.
Fixes: 240422edbf84 ("net/ngbe: support OEM subsystem vendor ID")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/ngbe_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 308c231183..86c28099c4 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -363,6 +363,8 @@ eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
rte_eth_copy_pci_info(eth_dev, pci_dev);
eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+ hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
+
/* Vendor and Device ID need to be set before init of shared code */
hw->back = pci_dev;
hw->device_id = pci_dev->id.device_id;
@@ -381,7 +383,6 @@ eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
hw->sub_system_id = (u16)ssid >> 8 | (u16)ssid << 8;
}
ngbe_map_device_id(hw);
- hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
/* Reserve memory for interrupt status block */
mz = rte_eth_dma_zone_reserve(eth_dev, "ngbe_driver", -1,
--
2.27.0
next prev parent reply other threads:[~2022-06-29 3:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 3:34 [PATCH 1/2] net/txgbe: " Jiawen Wu
2022-06-29 3:34 ` Jiawen Wu [this message]
2022-06-30 8:10 ` Ferruh Yigit
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=20220629033417.958443-2-jiawenwu@trustnetic.com \
--to=jiawenwu@trustnetic.com \
--cc=dev@dpdk.org \
/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).