mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
pci-v5.8-fixes-2
-----BEGIN PGP SIGNATURE----- iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAl8beM8UHGJoZWxnYWFz QGdvb2dsZS5jb20ACgkQWYigwDrT+vygXhAAwYMQgoLF+HZDVGWK6q/YmN+Q0ygb tXtnKt/ehf+zrvWiWZxmRVPZ71MjR9Ut6kXQ+MWlADkLkBeIxsCMj4N8ZjGSp/Gh UMfFwVYoUhJG3AM8uko6hCugsYsxagFA5zr53crHIE9AHCp/2Ca4lq1VrBB5k5OQ v4bghphxtPZXtUelHHcbmylU8EmnPG79XzL1VYqgeOd98nSrn34c68Ib7tezLF3I zgRraYghlyI6TGvbA55vdouMs+z+eYYN2hIu6FEXDx2lm81IvFYD5LdXwfb78Ns3 4+BcyuqHcsyvHuxD77Y/JrlmLdFopFRyhexfc887znqD2nXc0kAAtLXKM+d+/bXz vV8qtsDVWhYXS6cwvDuYSjsa1DiaWyJNQ/4tIuu5hYofXfi7ltyATkVrAjE0QPaC QpWnMVKecXSjd//VyTSvAAgO3Bk27uhXfTy3n7lpCTcpzMJj04t6go6u8/SOLtz9 ECWs4WWQVoi7zX65chcXtwce2+plQA6Pu7duzNLo5hP5KIIH4Ij0I19w1yGZueUm V5CIRAsVXPfQPJ45nhKwHldHJpZ/uXM97nYH5F9H14j9VXrrMJWptzyZiH53ZKvE 9GLBfHGcyKBCHcOhJtEJqgf7gkrxGpfSVcacYmPClB8SOsTd67mzIVRdH3xS7DUk j8VlWiNB266bHaY= =hzUW -----END PGP SIGNATURE----- Merge tag 'pci-v5.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci into master Pull PCI fixes from Bjorn Helgaas: - Reject invalid IRQ 0 command line argument for virtio_mmio because IRQ 0 now generates warnings (Bjorn Helgaas) - Revert "PCI/PM: Assume ports without DLL Link Active train links in 100 ms", which broke nouveau (Bjorn Helgaas) * tag 'pci-v5.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: Revert "PCI/PM: Assume ports without DLL Link Active train links in 100 ms" virtio-mmio: Reject invalid IRQ 0 command line argument
This commit is contained in:
commit
23ee3e4e5b
@ -4638,8 +4638,7 @@ static int pci_pm_reset(struct pci_dev *dev, int probe)
|
||||
* pcie_wait_for_link_delay - Wait until link is active or inactive
|
||||
* @pdev: Bridge device
|
||||
* @active: waiting for active or inactive?
|
||||
* @delay: Delay to wait after link has become active (in ms). Specify %0
|
||||
* for no delay.
|
||||
* @delay: Delay to wait after link has become active (in ms)
|
||||
*
|
||||
* Use this to wait till link becomes active or inactive.
|
||||
*/
|
||||
@ -4680,7 +4679,7 @@ static bool pcie_wait_for_link_delay(struct pci_dev *pdev, bool active,
|
||||
msleep(10);
|
||||
timeout -= 10;
|
||||
}
|
||||
if (active && ret && delay)
|
||||
if (active && ret)
|
||||
msleep(delay);
|
||||
else if (ret != active)
|
||||
pci_info(pdev, "Data Link Layer Link Active not %s in 1000 msec\n",
|
||||
@ -4801,28 +4800,17 @@ void pci_bridge_wait_for_secondary_bus(struct pci_dev *dev)
|
||||
if (!pcie_downstream_port(dev))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Per PCIe r5.0, sec 6.6.1, for downstream ports that support
|
||||
* speeds > 5 GT/s, we must wait for link training to complete
|
||||
* before the mandatory delay.
|
||||
*
|
||||
* We can only tell when link training completes via DLL Link
|
||||
* Active, which is required for downstream ports that support
|
||||
* speeds > 5 GT/s (sec 7.5.3.6). Unfortunately some common
|
||||
* devices do not implement Link Active reporting even when it's
|
||||
* required, so we'll check for that directly instead of checking
|
||||
* the supported link speed. We assume devices without Link Active
|
||||
* reporting can train in 100 ms regardless of speed.
|
||||
*/
|
||||
if (dev->link_active_reporting) {
|
||||
pci_dbg(dev, "waiting for link to train\n");
|
||||
if (!pcie_wait_for_link_delay(dev, true, 0)) {
|
||||
if (pcie_get_speed_cap(dev) <= PCIE_SPEED_5_0GT) {
|
||||
pci_dbg(dev, "waiting %d ms for downstream link\n", delay);
|
||||
msleep(delay);
|
||||
} else {
|
||||
pci_dbg(dev, "waiting %d ms for downstream link, after activation\n",
|
||||
delay);
|
||||
if (!pcie_wait_for_link_delay(dev, true, delay)) {
|
||||
/* Did not train, no need to wait any further */
|
||||
return;
|
||||
}
|
||||
}
|
||||
pci_dbg(child, "waiting %d ms to become accessible\n", delay);
|
||||
msleep(delay);
|
||||
|
||||
if (!pci_device_is_present(child)) {
|
||||
pci_dbg(child, "waiting additional %d ms to become accessible\n", delay);
|
||||
|
@ -641,11 +641,11 @@ static int vm_cmdline_set(const char *device,
|
||||
&vm_cmdline_id, &consumed);
|
||||
|
||||
/*
|
||||
* sscanf() must processes at least 2 chunks; also there
|
||||
* sscanf() must process at least 2 chunks; also there
|
||||
* must be no extra characters after the last chunk, so
|
||||
* str[consumed] must be '\0'
|
||||
*/
|
||||
if (processed < 2 || str[consumed])
|
||||
if (processed < 2 || str[consumed] || irq == 0)
|
||||
return -EINVAL;
|
||||
|
||||
resources[0].flags = IORESOURCE_MEM;
|
||||
|
Loading…
Reference in New Issue
Block a user