Skip to content

Commit 7498bd6

Browse files
zuban32gregkh
authored andcommitted
PCI: shpchp: Enable bridge bus mastering if MSI is enabled
commit 48b79a14505349a29b3e20f03619ada9b33c4b17 upstream. An SHPC may generate MSIs to notify software about slot or controller events (SHPC spec r1.0, sec 4.7). A PCI device can only generate an MSI if it has bus mastering enabled. Enable bus mastering if the bridge contains an SHPC that uses MSI for event notifications. Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com> [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 81306fc commit 7498bd6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/pci/hotplug/shpchp_hpc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,8 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev)
10621062
if (rc) {
10631063
ctrl_info(ctrl, "Can't get msi for the hotplug controller\n");
10641064
ctrl_info(ctrl, "Use INTx for the hotplug controller\n");
1065+
} else {
1066+
pci_set_master(pdev);
10651067
}
10661068

10671069
rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED,

0 commit comments

Comments
 (0)