aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-08-23 17:22:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-08-26 14:09:02 -0400
commitf4a83e578e0011ddcfdbe1c62d0916dadb4802aa (patch)
tree0d79aef2e8087c6f2615b3b204e0b3ba0cb97361 /drivers/bcma
parent634b80595fef79071d82bc231b7f82c4f808a1e8 (diff)
bcma: change max PCI read request size to 128
This PCIe controller does not support a max read request size above 128 bytes. The sold card I tested this controller with used 128 as default value, but some new routers are sold with BCM4331 chips, which have a default max read request size of 512. This device fails at the first DMA reqeust whch is bigger than 126 bytes. This patch changes the max read request size to 128 for every device on the PCIe link. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma')
-rw-r--r--drivers/bcma/driver_pci_host.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c
index 30629a3d44cc..c3d7b03c2fdc 100644
--- a/drivers/bcma/driver_pci_host.c
+++ b/drivers/bcma/driver_pci_host.c
@@ -581,6 +581,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, bcma_core_pci_fixup_addresses);
581int bcma_core_pci_plat_dev_init(struct pci_dev *dev) 581int bcma_core_pci_plat_dev_init(struct pci_dev *dev)
582{ 582{
583 struct bcma_drv_pci_host *pc_host; 583 struct bcma_drv_pci_host *pc_host;
584 int readrq;
584 585
585 if (dev->bus->ops->read != bcma_core_pci_hostmode_read_config) { 586 if (dev->bus->ops->read != bcma_core_pci_hostmode_read_config) {
586 /* This is not a device on the PCI-core bridge. */ 587 /* This is not a device on the PCI-core bridge. */
@@ -595,6 +596,11 @@ int bcma_core_pci_plat_dev_init(struct pci_dev *dev)
595 dev->irq = bcma_core_irq(pc_host->pdev->core); 596 dev->irq = bcma_core_irq(pc_host->pdev->core);
596 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); 597 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
597 598
599 readrq = pcie_get_readrq(dev);
600 if (readrq > 128) {
601 pr_info("change PCIe max read request size from %i to 128\n", readrq);
602 pcie_set_readrq(dev, 128);
603 }
598 return 0; 604 return 0;
599} 605}
600EXPORT_SYMBOL(bcma_core_pci_plat_dev_init); 606EXPORT_SYMBOL(bcma_core_pci_plat_dev_init);