Skip to content

Commit e67bb0d

Browse files
committed
Merge tag 'pci-v6.18-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull pci fixes from Bjorn Helgaas: - Search for MSI Capability with correct ID to fix an MSI regression on platforms with Cadence IP (Hans Zhang) - Revert early bridge resource set up to fix resource assignment failures that broke at least alpha boot and Snapdragon ath12k WiFi (Ilpo Järvinen) - Implement VMD .irq_startup()/.irq_shutdown() to fix IRQ issues that caused boot crashes and broken devices below VMD (Inochi Amaoto) - Select CONFIG_SCREEN_INFO on X86 to fix black screen on boot when SCREEN_INFO not selected (Mario Limonciello) * tag 'pci-v6.18-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI/VGA: Select SCREEN_INFO on X86 PCI: vmd: Override irq_startup()/irq_shutdown() in vmd_init_dev_msi_info() PCI: Revert early bridge resource set up PCI: cadence: Search for MSI Capability with correct ID
2 parents ea0bdf2 + a78835b commit e67bb0d

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

drivers/pci/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ config VGA_ARB
306306
bool "VGA Arbitration" if EXPERT
307307
default y
308308
depends on (PCI && !S390)
309+
select SCREEN_INFO if X86
309310
help
310311
Some "legacy" VGA devices implemented on PCI typically have the same
311312
hard-decoded addresses as they did on ISA. When multiple PCI devices

drivers/pci/controller/cadence/pcie-cadence-ep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static int cdns_pcie_ep_get_msi(struct pci_epc *epc, u8 fn, u8 vfn)
255255
u16 flags, mme;
256256
u8 cap;
257257

258-
cap = cdns_pcie_find_capability(pcie, PCI_CAP_ID_MSIX);
258+
cap = cdns_pcie_find_capability(pcie, PCI_CAP_ID_MSI);
259259
fn = cdns_pcie_get_fn_from_vfn(pcie, fn, vfn);
260260

261261
/* Validate that the MSI feature is actually enabled. */

drivers/pci/controller/vmd.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ static void vmd_pci_msi_enable(struct irq_data *data)
192192
data->chip->irq_unmask(data);
193193
}
194194

195+
static unsigned int vmd_pci_msi_startup(struct irq_data *data)
196+
{
197+
vmd_pci_msi_enable(data);
198+
return 0;
199+
}
200+
195201
static void vmd_irq_disable(struct irq_data *data)
196202
{
197203
struct vmd_irq *vmdirq = data->chip_data;
@@ -210,6 +216,11 @@ static void vmd_pci_msi_disable(struct irq_data *data)
210216
vmd_irq_disable(data->parent_data);
211217
}
212218

219+
static void vmd_pci_msi_shutdown(struct irq_data *data)
220+
{
221+
vmd_pci_msi_disable(data);
222+
}
223+
213224
static struct irq_chip vmd_msi_controller = {
214225
.name = "VMD-MSI",
215226
.irq_compose_msi_msg = vmd_compose_msi_msg,
@@ -309,6 +320,8 @@ static bool vmd_init_dev_msi_info(struct device *dev, struct irq_domain *domain,
309320
if (!msi_lib_init_dev_msi_info(dev, domain, real_parent, info))
310321
return false;
311322

323+
info->chip->irq_startup = vmd_pci_msi_startup;
324+
info->chip->irq_shutdown = vmd_pci_msi_shutdown;
312325
info->chip->irq_enable = vmd_pci_msi_enable;
313326
info->chip->irq_disable = vmd_pci_msi_disable;
314327
return true;

drivers/pci/probe.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -538,14 +538,10 @@ static void pci_read_bridge_windows(struct pci_dev *bridge)
538538
}
539539
if (io) {
540540
bridge->io_window = 1;
541-
pci_read_bridge_io(bridge,
542-
pci_resource_n(bridge, PCI_BRIDGE_IO_WINDOW),
543-
true);
541+
pci_read_bridge_io(bridge, &res, true);
544542
}
545543

546-
pci_read_bridge_mmio(bridge,
547-
pci_resource_n(bridge, PCI_BRIDGE_MEM_WINDOW),
548-
true);
544+
pci_read_bridge_mmio(bridge, &res, true);
549545

550546
/*
551547
* DECchip 21050 pass 2 errata: the bridge may miss an address
@@ -583,10 +579,7 @@ static void pci_read_bridge_windows(struct pci_dev *bridge)
583579
bridge->pref_64_window = 1;
584580
}
585581

586-
pci_read_bridge_mmio_pref(bridge,
587-
pci_resource_n(bridge,
588-
PCI_BRIDGE_PREF_MEM_WINDOW),
589-
true);
582+
pci_read_bridge_mmio_pref(bridge, &res, true);
590583
}
591584

592585
void pci_read_bridge_bases(struct pci_bus *child)

drivers/pci/vgaarb.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,8 @@ EXPORT_SYMBOL(vga_put);
556556

557557
static bool vga_is_firmware_default(struct pci_dev *pdev)
558558
{
559-
#ifdef CONFIG_SCREEN_INFO
560-
struct screen_info *si = &screen_info;
561-
562-
return pdev == screen_info_pci_dev(si);
559+
#if defined CONFIG_X86
560+
return pdev == screen_info_pci_dev(&screen_info);
563561
#else
564562
return false;
565563
#endif

0 commit comments

Comments
 (0)