aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorAndrew Patterson <andrew.patterson@hp.com>2009-04-22 18:52:09 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-06-11 15:04:21 -0400
commit43c16408842b0eeb367c23a6fa540ce69f99e347 (patch)
tree25be054b280b430b8bb00ff5f9c1f422bc21a3a0 /include/linux/pci.h
parentf62795f1e892ca9269849fa83de97621da7e02c0 (diff)
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>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 19ee92c53ef7..ec03b90d3510 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -878,6 +878,17 @@ static inline int pcie_aspm_enabled(void)
878extern int pcie_aspm_enabled(void); 878extern int pcie_aspm_enabled(void);
879#endif 879#endif
880 880
881#ifndef CONFIG_PCIE_ECRC
882static inline void pcie_set_ecrc_checking(struct pci_dev *dev)
883{
884 return;
885}
886static inline void pcie_ecrc_get_policy(char *str) {};
887#else
888extern void pcie_set_ecrc_checking(struct pci_dev *dev);
889extern void pcie_ecrc_get_policy(char *str);
890#endif
891
881#define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) 892#define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1)
882 893
883#ifdef CONFIG_HT_IRQ 894#ifdef CONFIG_HT_IRQ