drivers/bus: move driver assignment to end of probing
authorThomas Monjalon <thomas@monjalon.net>
Tue, 25 Sep 2018 20:55:27 +0000 (22:55 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 17 Oct 2018 08:26:59 +0000 (10:26 +0200)
commit391797f04208aec3a75efd01bfa368899b2f37db
tree63105172165dc6e010341bacf920329da21b444b
parent9fca82045935147838d59154c3dada582b7c7fe4
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>
drivers/bus/ifpga/ifpga_bus.c
drivers/bus/pci/pci_common.c
drivers/bus/pci/rte_bus_pci.h
drivers/bus/vdev/vdev.c
drivers/bus/vmbus/vmbus_common.c
drivers/net/i40e/i40e_vf_representor.c
drivers/net/mlx4/mlx4.c
drivers/net/mlx5/mlx5.c
drivers/net/szedata2/rte_eth_szedata2.c
lib/librte_eal/common/include/rte_dev.h