From 1120e8745ccd3e512fe2016c9e5092fcd378490a Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 2 Mar 2016 19:37:30 +0100 Subject: Restructure driver headers --- driver/compat.c | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 driver/compat.c (limited to 'driver/compat.c') diff --git a/driver/compat.c b/driver/compat.c deleted file mode 100644 index f28f527..0000000 --- a/driver/compat.c +++ /dev/null @@ -1,25 +0,0 @@ -#include - -int pcidriver_pcie_get_mps(struct pci_dev *dev) -{ - u16 ctl; - - pcie_capability_read_word(dev, PCI_EXP_DEVCTL, &ctl); - - return 128 << ((ctl & PCI_EXP_DEVCTL_PAYLOAD) >> 5); -} - -int pcidriver_pcie_set_mps(struct pci_dev *dev, int mps) -{ - u16 v; - - if (mps < 128 || mps > 4096 || !is_power_of_2(mps)) - return -EINVAL; - - v = ffs(mps) - 8; - if (v > dev->pcie_mpss) - return -EINVAL; - v <<= 5; - - return pcie_capability_clear_and_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_PAYLOAD, v); -} -- cgit v1.2.3