From: "Peter Oruba" These driver changes incorporate the proposed PCI-X / PCI-Express read byte count interface. Reading and setting those valuse doesn't take place "manually", instead wrapping functions are called to allow quirks for some PCI bridges. Signed-off by: Peter Oruba Based on work by Stephen Hemminger Cc: Andrew Vasquez Signed-off-by: Andrew Morton --- drivers/scsi/qla2xxx/qla_init.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) diff -puN drivers/scsi/qla2xxx/qla_init.c~pci-x-pci-express-read-control-interfaces-qla2xxx drivers/scsi/qla2xxx/qla_init.c --- a/drivers/scsi/qla2xxx/qla_init.c~pci-x-pci-express-read-control-interfaces-qla2xxx +++ a/drivers/scsi/qla2xxx/qla_init.c @@ -281,15 +281,9 @@ qla24xx_pci_config(scsi_qla_host_t *ha) /* PCIe -- adjust Maximum Read Request Size (2048). */ pcie_dctl_reg = pci_find_capability(ha->pdev, PCI_CAP_ID_EXP); - if (pcie_dctl_reg) { - uint16_t pcie_dctl; - - pcie_dctl_reg += PCI_EXP_DEVCTL; - pci_read_config_word(ha->pdev, pcie_dctl_reg, &pcie_dctl); - pcie_dctl &= ~PCI_EXP_DEVCTL_READRQ; - pcie_dctl |= 0x4000; - pci_write_config_word(ha->pdev, pcie_dctl_reg, pcie_dctl); - } + if (pcie_dctl_reg) + if (pcie_set_readrq(ha->pdev, 2048)) + DEBUG2(printk("Couldn't write PCI Express read request\n")); /* Reset expansion ROM address decode enable */ pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); _