diff options
author | Lendacky, Thomas <Thomas.Lendacky@amd.com> | 2016-11-03 21:19:27 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-04 21:48:45 +0300 |
commit | bd8255d8ba35ae03f0a6d4d7d55b46660f2fc198 (patch) | |
tree | a519875e556a3f3b7b453c804c565c4eafcc81f9 /drivers/net/ethernet/amd/xgbe/xgbe-dev.c | |
parent | 4b8acdf5fe97d01962f3a62eaff3f010f8de5869 (diff) | |
download | linux-bd8255d8ba35ae03f0a6d4d7d55b46660f2fc198.tar.xz |
amd-xgbe: Prepare for supporting PCI devices
Update the driver framework to separate out platform/ACPI specific code
from general code during device initialization. This will allow for the
introduction of PCI device support.
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-dev.c')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c index 0a7ab63deaf9..903731902153 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c @@ -2088,24 +2088,16 @@ static void xgbe_config_flow_control_threshold(struct xgbe_prv_data *pdata) static unsigned int xgbe_get_tx_fifo_size(struct xgbe_prv_data *pdata) { - unsigned int fifo_size; - - /* Calculate the configured fifo size */ - fifo_size = 1 << (pdata->hw_feat.tx_fifo_size + 7); - /* The configured value may not be the actual amount of fifo RAM */ - return min_t(unsigned int, XGMAC_FIFO_TX_MAX, fifo_size); + return min_t(unsigned int, pdata->tx_max_fifo_size, + pdata->hw_feat.tx_fifo_size); } static unsigned int xgbe_get_rx_fifo_size(struct xgbe_prv_data *pdata) { - unsigned int fifo_size; - - /* Calculate the configured fifo size */ - fifo_size = 1 << (pdata->hw_feat.rx_fifo_size + 7); - /* The configured value may not be the actual amount of fifo RAM */ - return min_t(unsigned int, XGMAC_FIFO_RX_MAX, fifo_size); + return min_t(unsigned int, pdata->rx_max_fifo_size, + pdata->hw_feat.rx_fifo_size); } static void xgbe_calculate_equal_fifo(unsigned int fifo_size, |