Skip to content

Commit ce4a9f1

Browse files
committed
Merge branch 'pci/enumeration'
- Clear bridge Secondary Status errors after enumeration since enumeration causes many errors (Vidya Sagar) - Wait for Link Training==0 before starting Link retrain to avoid a race; this was done previously but broken by a faulty merge (Ilpo Järvinen) - Rename PCI_IRQ_LEGACY to PCI_IRQ_INTX to be more specific about what "LEGACY" means (Damien Le Moal) - Update return types of pci_find_capability() stubs to match the extern declarations for the actual implementations (Bjorn Helgaas) - Drop unnecessary pci_enable_device_io() from pata_cs5520 (Heiner Kallweit) - Drop unused pci_enable_device_io() (Heiner Kallweit) - On 2016 and newer BIOSes, skip early E820 check for ECAM regions described in ACPI MCFG; there's no spec requirement for E820 reservations, and some machines don't provide them (Bjorn Helgaas) - If devices were disconnected while suspended, don't wait for them when resuming (Ilpo Järvinen) * pci/enumeration: PCI: Do not wait for disconnected devices when resuming x86/pci: Skip early E820 check for ECAM region PCI: Remove unused pci_enable_device_io() ata: pata_cs5520: Remove unnecessary call to pci_enable_device_io() PCI: Update pci_find_capability() stub return types PCI: Remove PCI_IRQ_LEGACY scsi: vmw_pvscsi: Do not use PCI_IRQ_LEGACY instead of PCI_IRQ_LEGACY scsi: pmcraid: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY scsi: mpt3sas: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY scsi: megaraid_sas: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY scsi: ipr: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY scsi: hpsa: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY scsi: arcmsr: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY wifi: rtw89: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY wifi: rtw88: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY wifi: ath10k: Refer to INTX instead of LEGACY net: wangxun: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY r8169: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY net: alx: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY net: atlantic: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY net: amd-xgbe: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY VMCI: Use PCI_IRQ_ALL_TYPES to remove PCI_IRQ_LEGACY use RDMA/vmw_pvrdma: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY IB/qib: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY drm/amdgpu: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY mfd: intel-lpss: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY ntb: idt: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY platform/x86: intel_ips: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY tty: 8250_pci: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY usb: hcd-pci: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY ASoC: Intel: avs: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY Documentation: PCI: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY PCI/portdrv: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY PCI/MSI: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY PCI: Clarify intent of LT wait PCI: Wait for Link Training==0 before starting Link retrain PCI: Clear Secondary Status errors after enumeration
2 parents 68c8edf + 6613443 commit ce4a9f1

File tree

46 files changed

+134
-131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+134
-131
lines changed

Documentation/PCI/msi-howto.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ min_vecs argument set to this limit, and the PCI core will return -ENOSPC
103103
if it can't meet the minimum number of vectors.
104104

105105
The flags argument is used to specify which type of interrupt can be used
106-
by the device and the driver (PCI_IRQ_LEGACY, PCI_IRQ_MSI, PCI_IRQ_MSIX).
106+
by the device and the driver (PCI_IRQ_INTX, PCI_IRQ_MSI, PCI_IRQ_MSIX).
107107
A convenient short-hand (PCI_IRQ_ALL_TYPES) is also available to ask for
108108
any possible kind of interrupt. If the PCI_IRQ_AFFINITY flag is set,
109109
pci_alloc_irq_vectors() will spread the interrupts around the available CPUs.

Documentation/PCI/pci.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ causes the PCI support to program CPU vector data into the PCI device
335335
capability registers. Many architectures, chip-sets, or BIOSes do NOT
336336
support MSI or MSI-X and a call to pci_alloc_irq_vectors with just
337337
the PCI_IRQ_MSI and PCI_IRQ_MSIX flags will fail, so try to always
338-
specify PCI_IRQ_LEGACY as well.
338+
specify PCI_IRQ_INTX as well.
339339

340340
Drivers that have different interrupt handlers for MSI/MSI-X and
341341
legacy INTx should chose the right one based on the msi_enabled

Documentation/translations/zh_CN/PCI/msi-howto.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ MSI功能。
8888
如果设备对最小数量的向量有要求,驱动程序可以传递一个min_vecs参数,设置为这个限制,
8989
如果PCI核不能满足最小数量的向量,将返回-ENOSPC。
9090

91-
flags参数用来指定设备和驱动程序可以使用哪种类型的中断(PCI_IRQ_LEGACY, PCI_IRQ_MSI,
91+
flags参数用来指定设备和驱动程序可以使用哪种类型的中断(PCI_IRQ_INTX, PCI_IRQ_MSI,
9292
PCI_IRQ_MSIX)。一个方便的短语(PCI_IRQ_ALL_TYPES)也可以用来要求任何可能的中断类型。
9393
如果PCI_IRQ_AFFINITY标志被设置,pci_alloc_irq_vectors()将把中断分散到可用的CPU上。
9494

Documentation/translations/zh_CN/PCI/pci.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ MSI-X可以分配几个单独的向量。
304304
的PCI_IRQ_MSI和/或PCI_IRQ_MSIX标志来启用MSI功能。这将导致PCI支持将CPU向量数
305305
据编程到PCI设备功能寄存器中。许多架构、芯片组或BIOS不支持MSI或MSI-X,调用
306306
``pci_alloc_irq_vectors`` 时只使用PCI_IRQ_MSI和PCI_IRQ_MSIX标志会失败,
307-
所以尽量也要指定 ``PCI_IRQ_LEGACY`` 。
307+
所以尽量也要指定 ``PCI_IRQ_INTX`` 。
308308

309309
对MSI/MSI-X和传统INTx有不同中断处理程序的驱动程序应该在调用
310310
``pci_alloc_irq_vectors`` 后根据 ``pci_dev``结构体中的 ``msi_enabled``

arch/x86/pci/mmconfig-shared.c

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,34 @@ static bool __ref pci_mmcfg_reserved(struct device *dev,
518518
{
519519
struct resource *conflict;
520520

521-
if (!early && !acpi_disabled) {
521+
if (early) {
522+
523+
/*
524+
* Don't try to do this check unless configuration type 1
525+
* is available. How about type 2?
526+
*/
527+
528+
/*
529+
* 946f2ee5c731 ("Check that MCFG points to an e820
530+
* reserved area") added this E820 check in 2006 to work
531+
* around BIOS defects.
532+
*
533+
* Per PCI Firmware r3.3, sec 4.1.2, ECAM space must be
534+
* reserved by a PNP0C02 resource, but it need not be
535+
* mentioned in E820. Before the ACPI interpreter is
536+
* available, we can't check for PNP0C02 resources, so
537+
* there's no reliable way to verify the region in this
538+
* early check. Keep it only for the old machines that
539+
* motivated 946f2ee5c731.
540+
*/
541+
if (dmi_get_bios_year() < 2016 && raw_pci_ops)
542+
return is_mmconf_reserved(e820__mapped_all, cfg, dev,
543+
"E820 entry");
544+
545+
return true;
546+
}
547+
548+
if (!acpi_disabled) {
522549
if (is_mmconf_reserved(is_acpi_reserved, cfg, dev,
523550
"ACPI motherboard resource"))
524551
return true;
@@ -551,16 +578,7 @@ static bool __ref pci_mmcfg_reserved(struct device *dev,
551578
* For MCFG information constructed from hotpluggable host bridge's
552579
* _CBA method, just assume it's reserved.
553580
*/
554-
if (pci_mmcfg_running_state)
555-
return true;
556-
557-
/* Don't try to do this check unless configuration
558-
type 1 is available. how about type 2 ?*/
559-
if (raw_pci_ops)
560-
return is_mmconf_reserved(e820__mapped_all, cfg, dev,
561-
"E820 entry");
562-
563-
return false;
581+
return pci_mmcfg_running_state;
564582
}
565583

566584
static void __init pci_mmcfg_reject_broken(int early)

drivers/ata/pata_cs5520.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,6 @@ static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
151151
if (!host)
152152
return -ENOMEM;
153153

154-
/* Perform set up for DMA */
155-
if (pci_enable_device_io(pdev)) {
156-
dev_err(&pdev->dev, "unable to configure BAR2.\n");
157-
return -ENODEV;
158-
}
159-
160154
if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) {
161155
dev_err(&pdev->dev, "unable to configure DMA mask.\n");
162156
return -ENODEV;

drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
279279
adev->irq.msi_enabled = false;
280280

281281
if (!amdgpu_msi_ok(adev))
282-
flags = PCI_IRQ_LEGACY;
282+
flags = PCI_IRQ_INTX;
283283
else
284284
flags = PCI_IRQ_ALL_TYPES;
285285

drivers/infiniband/hw/qib/qib_iba7220.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3281,7 +3281,7 @@ static int qib_7220_intr_fallback(struct qib_devdata *dd)
32813281

32823282
qib_free_irq(dd);
32833283
dd->msi_lo = 0;
3284-
if (pci_alloc_irq_vectors(dd->pcidev, 1, 1, PCI_IRQ_LEGACY) < 0)
3284+
if (pci_alloc_irq_vectors(dd->pcidev, 1, 1, PCI_IRQ_INTX) < 0)
32853285
qib_dev_err(dd, "Failed to enable INTx\n");
32863286
qib_setup_7220_interrupt(dd);
32873287
return 1;

drivers/infiniband/hw/qib/qib_iba7322.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,8 +3471,7 @@ static void qib_setup_7322_interrupt(struct qib_devdata *dd, int clearpend)
34713471
pci_irq_vector(dd->pcidev, msixnum),
34723472
ret);
34733473
qib_7322_free_irq(dd);
3474-
pci_alloc_irq_vectors(dd->pcidev, 1, 1,
3475-
PCI_IRQ_LEGACY);
3474+
pci_alloc_irq_vectors(dd->pcidev, 1, 1, PCI_IRQ_INTX);
34763475
goto try_intx;
34773476
}
34783477
dd->cspec->msix_entries[msixnum].arg = arg;
@@ -5143,7 +5142,7 @@ static int qib_7322_intr_fallback(struct qib_devdata *dd)
51435142
qib_devinfo(dd->pcidev,
51445143
"MSIx interrupt not detected, trying INTx interrupts\n");
51455144
qib_7322_free_irq(dd);
5146-
if (pci_alloc_irq_vectors(dd->pcidev, 1, 1, PCI_IRQ_LEGACY) < 0)
5145+
if (pci_alloc_irq_vectors(dd->pcidev, 1, 1, PCI_IRQ_INTX) < 0)
51475146
qib_dev_err(dd, "Failed to enable INTx\n");
51485147
qib_setup_7322_interrupt(dd, 0);
51495148
return 1;

drivers/infiniband/hw/qib/qib_pcie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ int qib_pcie_params(struct qib_devdata *dd, u32 minw, u32 *nent)
210210
}
211211

212212
if (dd->flags & QIB_HAS_INTX)
213-
flags |= PCI_IRQ_LEGACY;
213+
flags |= PCI_IRQ_INTX;
214214
maxvec = (nent && *nent) ? *nent : 1;
215215
nvec = pci_alloc_irq_vectors(dd->pcidev, 1, maxvec, flags);
216216
if (nvec < 0)

0 commit comments

Comments
 (0)