]> git.droids-corp.org - dpdk.git/commit
bus/pci: assign driver pointer before mapping
authorMichal Krawczyk <mk@semihalf.com>
Wed, 19 Jan 2022 14:50:37 +0000 (15:50 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 27 Feb 2022 19:15:15 +0000 (20:15 +0100)
commit6b92f184680283b4b3da4ebc722b5feb7ef280fb
tree8f25a138197791b45ee9b1c61e7b2f79435d8f41
parent356a2aa054a9e803782ee8380a7ab1a53aecd1e3
bus/pci: assign driver pointer before mapping

Patch changing the way of accessing interrupt handle also changed order
of the rte_pci_map_device() call and rte_pci_device:driver assignment.
It was causing issues with Write Combine mapping on the Linux platform
if it was used with the igb_uio module.

Linux implementation of pci_uio_map_resource_by_index(), which is called
by rte_pci_map_device(), needs access to the device's driver. Otherwise
it won't be able to check the driver's flags and won't respect them.

Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
drivers/bus/pci/pci_common.c