Skip to content

Commit

Permalink
PCI / PCIe: Introduce command line option to disable ARI
Browse files Browse the repository at this point in the history
There are PCIe devices on the market that report ARI support but
then fail to initialize correctly when ARI is actually used.  This
leads to situations in which kernels 2.6.34 and newer fail to handle
systems where the previous kernels worked without any apparent
problems.  Unfortunately, it is currently unknown how many such
devices are there.

For this reason, introduce a new kernel command line option,
pci=noari, allowing users to disable PCIe ARI altogether if they
see problems with PCIe device initialization.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Rafael J. Wysocki authored and Jesse Barnes committed Mar 1, 2012
1 parent f6330c3 commit 6748dcc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2116,6 +2116,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
off: Turn realloc off
on: Turn realloc on
realloc same as realloc=on
noari do not use PCIe ARI.

pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power
Management.
Expand Down
7 changes: 6 additions & 1 deletion drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ u8 pci_cache_line_size;
*/
unsigned int pcibios_max_latency = 255;

/* If set, the PCIe ARI capability will not be used. */
static bool pcie_ari_disabled;

/**
* pci_bus_max_busnr - returns maximum PCI bus number of given bus' children
* @bus: pointer to PCI bus structure to search
Expand Down Expand Up @@ -1955,7 +1958,7 @@ void pci_enable_ari(struct pci_dev *dev)
u16 flags, ctrl;
struct pci_dev *bridge;

if (!pci_is_pcie(dev) || dev->devfn)
if (pcie_ari_disabled || !pci_is_pcie(dev) || dev->devfn)
return;

pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ARI);
Expand Down Expand Up @@ -3840,6 +3843,8 @@ static int __init pci_setup(char *str)
pci_realloc_get_opt("on");
} else if (!strcmp(str, "nodomains")) {
pci_no_domains();
} else if (!strncmp(str, "noari", 5)) {
pcie_ari_disabled = true;
} else if (!strncmp(str, "cbiosize=", 9)) {
pci_cardbus_io_size = memparse(str + 9, &str);
} else if (!strncmp(str, "cbmemsize=", 10)) {
Expand Down

0 comments on commit 6748dcc

Please sign in to comment.