summaryrefslogtreecommitdiff
path: root/drivers/net/mlx4/mlx4.c
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-09-25 22:55:27 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-10-17 10:26:59 +0200
commit391797f04208aec3a75efd01bfa368899b2f37db (patch)
tree63105172165dc6e010341bacf920329da21b444b /drivers/net/mlx4/mlx4.c
parent9fca82045935147838d59154c3dada582b7c7fe4 (diff)
downloaddpdk-391797f04208aec3a75efd01bfa368899b2f37db.zip
dpdk-391797f04208aec3a75efd01bfa368899b2f37db.tar.gz
dpdk-391797f04208aec3a75efd01bfa368899b2f37db.tar.xz
drivers/bus: move driver assignment to end of probing
The PCI mapping requires to know the PCI driver to use, even before the probing is done. That's why the PCI driver is referenced early inside the PCI device structure. See commit 1d20a073fa5e ("bus/pci: reference driver structure before mapping") However the rte_driver does not need to be referenced in rte_device before the device probing is done. By moving back this assignment at the end of the device probing, it becomes possible to make clear the status of a rte_device. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Tested-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Rosen Xu <rosen.xu@intel.com>
Diffstat (limited to 'drivers/net/mlx4/mlx4.c')
-rw-r--r--drivers/net/mlx4/mlx4.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index defc0d4..3de7bc5 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -734,7 +734,6 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
eth_dev->data->mac_addrs = priv->mac;
eth_dev->device = &pci_dev->device;
rte_eth_copy_pci_info(eth_dev, pci_dev);
- eth_dev->device->driver = &mlx4_driver.driver;
/* Initialize local interrupt handle for current port. */
priv->intr_handle = (struct rte_intr_handle){
.fd = -1,