diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-02-14 20:58:49 -0500 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-02-15 19:25:12 -0500 |
commit | 28e47c498a931200125e299e9d60d22e27b4ab0d (patch) | |
tree | 871e75c4db7e670c2ceaed7b5fd69b9ef9a5f4c4 /drivers/net/ethernet/sfc/falcon.c | |
parent | a9a52506277275b73955504bf4df745502a28b8b (diff) |
sfc: Allocate SRAM between buffer table and descriptor caches at init time
Each port has a block of 64-bit SRAM that is divided between buffer
table and descriptor cache regions at initialisation time. Currently
we use a fixed allocation, but it needs to be changed to support
larger numbers of queues.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/falcon.c')
-rw-r--r-- | drivers/net/ethernet/sfc/falcon.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sfc/falcon.c b/drivers/net/ethernet/sfc/falcon.c index 98285115df10..3a1ca2bd1548 100644 --- a/drivers/net/ethernet/sfc/falcon.c +++ b/drivers/net/ethernet/sfc/falcon.c | |||
@@ -1333,6 +1333,12 @@ out: | |||
1333 | return rc; | 1333 | return rc; |
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | static void falcon_dimension_resources(struct efx_nic *efx) | ||
1337 | { | ||
1338 | efx->rx_dc_base = 0x20000; | ||
1339 | efx->tx_dc_base = 0x26000; | ||
1340 | } | ||
1341 | |||
1336 | /* Probe all SPI devices on the NIC */ | 1342 | /* Probe all SPI devices on the NIC */ |
1337 | static void falcon_probe_spi_devices(struct efx_nic *efx) | 1343 | static void falcon_probe_spi_devices(struct efx_nic *efx) |
1338 | { | 1344 | { |
@@ -1749,6 +1755,7 @@ const struct efx_nic_type falcon_a1_nic_type = { | |||
1749 | .probe = falcon_probe_nic, | 1755 | .probe = falcon_probe_nic, |
1750 | .remove = falcon_remove_nic, | 1756 | .remove = falcon_remove_nic, |
1751 | .init = falcon_init_nic, | 1757 | .init = falcon_init_nic, |
1758 | .dimension_resources = falcon_dimension_resources, | ||
1752 | .fini = efx_port_dummy_op_void, | 1759 | .fini = efx_port_dummy_op_void, |
1753 | .monitor = falcon_monitor, | 1760 | .monitor = falcon_monitor, |
1754 | .map_reset_reason = falcon_map_reset_reason, | 1761 | .map_reset_reason = falcon_map_reset_reason, |
@@ -1783,8 +1790,6 @@ const struct efx_nic_type falcon_a1_nic_type = { | |||
1783 | .max_interrupt_mode = EFX_INT_MODE_MSI, | 1790 | .max_interrupt_mode = EFX_INT_MODE_MSI, |
1784 | .phys_addr_channels = 4, | 1791 | .phys_addr_channels = 4, |
1785 | .timer_period_max = 1 << FRF_AB_TC_TIMER_VAL_WIDTH, | 1792 | .timer_period_max = 1 << FRF_AB_TC_TIMER_VAL_WIDTH, |
1786 | .tx_dc_base = 0x130000, | ||
1787 | .rx_dc_base = 0x100000, | ||
1788 | .offload_features = NETIF_F_IP_CSUM, | 1793 | .offload_features = NETIF_F_IP_CSUM, |
1789 | }; | 1794 | }; |
1790 | 1795 | ||
@@ -1792,6 +1797,7 @@ const struct efx_nic_type falcon_b0_nic_type = { | |||
1792 | .probe = falcon_probe_nic, | 1797 | .probe = falcon_probe_nic, |
1793 | .remove = falcon_remove_nic, | 1798 | .remove = falcon_remove_nic, |
1794 | .init = falcon_init_nic, | 1799 | .init = falcon_init_nic, |
1800 | .dimension_resources = falcon_dimension_resources, | ||
1795 | .fini = efx_port_dummy_op_void, | 1801 | .fini = efx_port_dummy_op_void, |
1796 | .monitor = falcon_monitor, | 1802 | .monitor = falcon_monitor, |
1797 | .map_reset_reason = falcon_map_reset_reason, | 1803 | .map_reset_reason = falcon_map_reset_reason, |
@@ -1835,8 +1841,6 @@ const struct efx_nic_type falcon_b0_nic_type = { | |||
1835 | * interrupt handler only supports 32 | 1841 | * interrupt handler only supports 32 |
1836 | * channels */ | 1842 | * channels */ |
1837 | .timer_period_max = 1 << FRF_AB_TC_TIMER_VAL_WIDTH, | 1843 | .timer_period_max = 1 << FRF_AB_TC_TIMER_VAL_WIDTH, |
1838 | .tx_dc_base = 0x130000, | ||
1839 | .rx_dc_base = 0x100000, | ||
1840 | .offload_features = NETIF_F_IP_CSUM | NETIF_F_RXHASH | NETIF_F_NTUPLE, | 1844 | .offload_features = NETIF_F_IP_CSUM | NETIF_F_RXHASH | NETIF_F_NTUPLE, |
1841 | }; | 1845 | }; |
1842 | 1846 | ||