PCI: shpchp: Check bridge's secondary (not primary) bus speed
authorMarcel Apfelbaum <marcel.a@redhat.com>
Thu, 15 May 2014 18:42:49 +0000 (12:42 -0600)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 9 Jun 2014 12:29:12 +0000 (13:29 +0100)
commitb48a6859224f0a37649a39339ee10356ab8b0fec
tree76c5b7516071781facf5b77a4d05b000857822eb
parent434ffe9cc9c9336f375f1acfb00993ee6f18bd80
PCI: shpchp: Check bridge's secondary (not primary) bus speed

commit 93fa9d32670f5592c8e56abc9928fc194e1e72fc upstream.

When a new device is added below a hotplug bridge, the bridge's secondary
bus speed and the device's bus speed must match.  The shpchp driver
previously checked the bridge's *primary* bus speed, not the secondary bus
speed.

This caused hot-add errors like:

  shpchp 0000:00:03.0: Speed of bus ff and adapter 0 mismatch

Check the secondary bus speed instead.

[bhelgaas: changelog]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=75251
Fixes: 3749c51ac6c1 ("PCI: Make current and maximum bus speeds part of the PCI core")
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/pci/hotplug/shpchp_ctrl.c