diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-01-26 12:06:12 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-01-27 09:14:26 -0500 |
commit | ff59887f2de1692e7691004858adba3febcade20 (patch) | |
tree | ed160d8d0b3a657f46e5bcd177fd8aca1f41f52e /arch/tile | |
parent | b33f87c7e6f8cf26b1b2b525dd71c2d01c9e9f86 (diff) |
tile: use PCI define for Max_Read_Request_Size
Replace a magic number with a PCI #define symbol.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Chris Metcalf <cmetcalf@ezchip.com>
Diffstat (limited to 'arch/tile')
-rw-r--r-- | arch/tile/kernel/pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index f70c7892fa25..325df47f114d 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
@@ -245,7 +245,7 @@ static void fixup_read_and_payload_sizes(void) | |||
245 | { | 245 | { |
246 | struct pci_dev *dev = NULL; | 246 | struct pci_dev *dev = NULL; |
247 | int smallest_max_payload = 0x1; /* Tile maxes out at 256 bytes. */ | 247 | int smallest_max_payload = 0x1; /* Tile maxes out at 256 bytes. */ |
248 | int max_read_size = 0x2; /* Limit to 512 byte reads. */ | 248 | int max_read_size = PCI_EXP_DEVCTL_READRQ_512B; |
249 | u16 new_values; | 249 | u16 new_values; |
250 | 250 | ||
251 | /* Scan for the smallest maximum payload size. */ | 251 | /* Scan for the smallest maximum payload size. */ |
@@ -258,7 +258,7 @@ static void fixup_read_and_payload_sizes(void) | |||
258 | } | 258 | } |
259 | 259 | ||
260 | /* Now, set the max_payload_size for all devices to that value. */ | 260 | /* Now, set the max_payload_size for all devices to that value. */ |
261 | new_values = (max_read_size << 12) | (smallest_max_payload << 5); | 261 | new_values = max_read_size | (smallest_max_payload << 5); |
262 | for_each_pci_dev(dev) | 262 | for_each_pci_dev(dev) |
263 | pcie_capability_clear_and_set_word(dev, PCI_EXP_DEVCTL, | 263 | pcie_capability_clear_and_set_word(dev, PCI_EXP_DEVCTL, |
264 | PCI_EXP_DEVCTL_PAYLOAD | PCI_EXP_DEVCTL_READRQ, | 264 | PCI_EXP_DEVCTL_PAYLOAD | PCI_EXP_DEVCTL_READRQ, |