DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] net/txgbe: fix customized devices probe failure
@ 2022-06-29  3:34 Jiawen Wu
  2022-06-29  3:34 ` [PATCH 2/2] net/ngbe: " Jiawen Wu
  2022-06-30  8:10 ` [PATCH 1/2] net/txgbe: " Ferruh Yigit
  0 siblings, 2 replies; 3+ messages in thread
From: Jiawen Wu @ 2022-06-29  3:34 UTC (permalink / raw)
  To: dev; +Cc: Jiawen Wu

The devices with OEM subsystem vendor ID failed to be initialized,
because flash was read before memory address was set.

Fixes: 138d869e41c0 ("net/txgbe: support OEM subsystem vendor ID")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index dc8c3c70a9..9dc9948219 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -591,6 +591,8 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 
+	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
+
 	/* Vendor and Device ID need to be set before init of shared code */
 	hw->device_id = pci_dev->id.device_id;
 	hw->vendor_id = pci_dev->id.vendor_id;
@@ -607,7 +609,6 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 		}
 		hw->subsystem_device_id = (u16)ssid >> 8 | (u16)ssid << 8;
 	}
-	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
 	hw->allow_unsupported_sfp = 1;
 
 	/* Reserve memory for interrupt status block */
-- 
2.27.0




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

end of thread, other threads:[~2022-06-30  8:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29  3:34 [PATCH 1/2] net/txgbe: fix customized devices probe failure Jiawen Wu
2022-06-29  3:34 ` [PATCH 2/2] net/ngbe: " Jiawen Wu
2022-06-30  8:10 ` [PATCH 1/2] net/txgbe: " Ferruh Yigit

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).