mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
Merge tag 'pci-v6.3-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull pci fixes from Bjorn Helgaas: - Provide pci_msix_can_alloc_dyn() stub when CONFIG_PCI_MSI unset to avoid build errors (Reinette Chatre) - Quirk AMD XHCI controller that loses MSI-X state in D3hot to avoid broken USB after hotplug or suspend/resume (Basavaraj Natikar) - Fix use-after-free in pci_bus_release_domain_nr() (Rob Herring) * tag 'pci-v6.3-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: Fix use-after-free in pci_bus_release_domain_nr() x86/PCI: Add quirk for AMD XHCI controller that loses MSI-X state in D3hot PCI/MSI: Provide missing stub for pci_msix_can_alloc_dyn()
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/vgaarb.h>
|
||||
#include <asm/amd_nb.h>
|
||||
#include <asm/hpet.h>
|
||||
#include <asm/pci_x86.h>
|
||||
|
||||
@@ -824,3 +825,23 @@ static void rs690_fix_64bit_dma(struct pci_dev *pdev)
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x7910, rs690_fix_64bit_dma);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_AMD_NB
|
||||
|
||||
#define AMD_15B8_RCC_DEV2_EPF0_STRAP2 0x10136008
|
||||
#define AMD_15B8_RCC_DEV2_EPF0_STRAP2_NO_SOFT_RESET_DEV2_F0_MASK 0x00000080L
|
||||
|
||||
static void quirk_clear_strap_no_soft_reset_dev2_f0(struct pci_dev *dev)
|
||||
{
|
||||
u32 data;
|
||||
|
||||
if (!amd_smn_read(0, AMD_15B8_RCC_DEV2_EPF0_STRAP2, &data)) {
|
||||
data &= ~AMD_15B8_RCC_DEV2_EPF0_STRAP2_NO_SOFT_RESET_DEV2_F0_MASK;
|
||||
if (amd_smn_write(0, AMD_15B8_RCC_DEV2_EPF0_STRAP2, data))
|
||||
pci_err(dev, "Failed to write data 0x%x\n", data);
|
||||
} else {
|
||||
pci_err(dev, "Failed to read data\n");
|
||||
}
|
||||
}
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x15b8, quirk_clear_strap_no_soft_reset_dev2_f0);
|
||||
#endif
|
||||
|
||||
@@ -157,8 +157,6 @@ void pci_remove_root_bus(struct pci_bus *bus)
|
||||
list_for_each_entry_safe(child, tmp,
|
||||
&bus->devices, bus_list)
|
||||
pci_remove_bus_device(child);
|
||||
pci_remove_bus(bus);
|
||||
host_bridge->bus = NULL;
|
||||
|
||||
#ifdef CONFIG_PCI_DOMAINS_GENERIC
|
||||
/* Release domain_nr if it was dynamically allocated */
|
||||
@@ -166,6 +164,9 @@ void pci_remove_root_bus(struct pci_bus *bus)
|
||||
pci_bus_release_domain_nr(bus, host_bridge->dev.parent);
|
||||
#endif
|
||||
|
||||
pci_remove_bus(bus);
|
||||
host_bridge->bus = NULL;
|
||||
|
||||
/* remove the host bridge */
|
||||
device_del(&host_bridge->dev);
|
||||
}
|
||||
|
||||
@@ -1624,6 +1624,8 @@ pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
|
||||
flags, NULL);
|
||||
}
|
||||
|
||||
static inline bool pci_msix_can_alloc_dyn(struct pci_dev *dev)
|
||||
{ return false; }
|
||||
static inline struct msi_map pci_msix_alloc_irq_at(struct pci_dev *dev, unsigned int index,
|
||||
const struct irq_affinity_desc *affdesc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user