diff options
author | Lendacky, Thomas <Thomas.Lendacky@amd.com> | 2017-06-28 13:43:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-29 15:14:19 -0400 |
commit | 6f595959c095d8923b19196fea3e983dcb299f22 (patch) | |
tree | b78e9054899d2b726a2260c6115d9304315c1f7e /drivers/net/ethernet/amd/xgbe/xgbe-pci.c | |
parent | 7e1e6b86a5d96ca13834fbc6b6e54a9228f308e1 (diff) | |
download | linux-stable-6f595959c095d8923b19196fea3e983dcb299f22.tar.gz linux-stable-6f595959c095d8923b19196fea3e983dcb299f22.tar.bz2 linux-stable-6f595959c095d8923b19196fea3e983dcb299f22.zip |
amd-xgbe: Adjust register settings to improve performance
Add support to change some general performance settings and to provide
some performance settings based on the device that is probed.
This includes:
- Setting the maximum read/write outstanding request limit
- Reducing the AXI interface burst length size
- Selectively setting the Tx and Rx descriptor pre-fetch threshold
- Selectively setting additional cache coherency controls
Tested and verified on all versions of the hardware.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe-pci.c')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c index 1e7376887568..1e56ad7bd9a5 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-pci.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-pci.c @@ -327,8 +327,9 @@ static int xgbe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) /* Set the DMA coherency values */ pdata->coherent = 1; - pdata->arcr = XGBE_DMA_OS_ARCR; - pdata->awcr = XGBE_DMA_OS_AWCR; + pdata->arcr = XGBE_DMA_PCI_ARCR; + pdata->awcr = XGBE_DMA_PCI_AWCR; + pdata->awarcr = XGBE_DMA_PCI_AWARCR; /* Set the maximum channels and queues */ reg = XP_IOREAD(pdata, XP_PROP_1); @@ -447,6 +448,8 @@ static const struct xgbe_version_data xgbe_v2a = { .ecc_support = 1, .i2c_support = 1, .irq_reissue_support = 1, + .tx_desc_prefetch = 5, + .rx_desc_prefetch = 5, }; static const struct xgbe_version_data xgbe_v2b = { @@ -459,6 +462,8 @@ static const struct xgbe_version_data xgbe_v2b = { .ecc_support = 1, .i2c_support = 1, .irq_reissue_support = 1, + .tx_desc_prefetch = 5, + .rx_desc_prefetch = 5, }; static const struct pci_device_id xgbe_pci_table[] = { |