thunderbolt: Serialize PCIe tunnel creation with PCI rescan
authorMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 18 Jan 2018 17:27:47 +0000 (20:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:29 +0000 (09:36 +0200)
commit7a4a66c504fbfae4428ac7a3784ee5017ae28682
tree2f61258f6ed263601fd7f3624e58ca97c0b2c8dd
parent6f40f6ee22b91c913b2891c26943eb37bfceb50a
thunderbolt: Serialize PCIe tunnel creation with PCI rescan

commit a03e828915c00ed0ea5aa40647c81472cfa7a984 upstream.

We need to make sure a new PCIe tunnel is not created in a middle of
previous PCI rescan because otherwise the rescan code might find too
much and fail to reconfigure devices properly. This is important when
native PCIe hotplug is used. In BIOS assisted hotplug there should be no
such issue.

Fixes: f67cf491175a ("thunderbolt: Add support for Internal Connection Manager (ICM)")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/switch.c