PCI: Add support for turning PCIe ECRC on or off
Adds support for PCI Express transaction layer end-to-end CRC checking (ECRC). This patch will enable/disable ECRC checking by setting/clearing the ECRC Check Enable and/or ECRC Generation Enable bits for devices that support ECRC. The ECRC setting is controlled by the "pci=ecrc=<policy>" command-line option. If this option is not set or is set to 'bios", the enable and generation bits are left in whatever state that firmware/BIOS set them to. The "off" setting turns them off, and the "on" option turns them on (if the device supports it). Turning ECRC on or off can be a data integrity versus performance tradeoff. In theory, turning it on will catch more data errors, turning it off means possibly better performance since CRC does not need to be calculated by the PCIe hardware and packet sizes are reduced. Signed-off-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
committed by
Jesse Barnes
parent
f62795f1e8
commit
43c1640884
@ -878,6 +878,17 @@ static inline int pcie_aspm_enabled(void)
|
||||
extern int pcie_aspm_enabled(void);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_PCIE_ECRC
|
||||
static inline void pcie_set_ecrc_checking(struct pci_dev *dev)
|
||||
{
|
||||
return;
|
||||
}
|
||||
static inline void pcie_ecrc_get_policy(char *str) {};
|
||||
#else
|
||||
extern void pcie_set_ecrc_checking(struct pci_dev *dev);
|
||||
extern void pcie_ecrc_get_policy(char *str);
|
||||
#endif
|
||||
|
||||
#define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1)
|
||||
|
||||
#ifdef CONFIG_HT_IRQ
|
||||
|
Reference in New Issue
Block a user