diff options
-rw-r--r-- | drivers/net/sfc/falcon.c | 12 | ||||
-rw-r--r-- | drivers/net/sfc/net_driver.h | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 7c9c9c935957..539d0223b434 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -45,11 +45,9 @@ | |||
45 | */ | 45 | */ |
46 | #define TX_DC_ENTRIES 16 | 46 | #define TX_DC_ENTRIES 16 |
47 | #define TX_DC_ENTRIES_ORDER 1 | 47 | #define TX_DC_ENTRIES_ORDER 1 |
48 | #define TX_DC_BASE 0x130000 | ||
49 | 48 | ||
50 | #define RX_DC_ENTRIES 64 | 49 | #define RX_DC_ENTRIES 64 |
51 | #define RX_DC_ENTRIES_ORDER 3 | 50 | #define RX_DC_ENTRIES_ORDER 3 |
52 | #define RX_DC_BASE 0x100000 | ||
53 | 51 | ||
54 | static const unsigned int | 52 | static const unsigned int |
55 | /* "Large" EEPROM device: Atmel AT25640 or similar | 53 | /* "Large" EEPROM device: Atmel AT25640 or similar |
@@ -3043,9 +3041,11 @@ int falcon_init_nic(struct efx_nic *efx) | |||
3043 | return rc; | 3041 | return rc; |
3044 | 3042 | ||
3045 | /* Set positions of descriptor caches in SRAM. */ | 3043 | /* Set positions of descriptor caches in SRAM. */ |
3046 | EFX_POPULATE_OWORD_1(temp, FRF_AZ_SRM_TX_DC_BASE_ADR, TX_DC_BASE / 8); | 3044 | EFX_POPULATE_OWORD_1(temp, FRF_AZ_SRM_TX_DC_BASE_ADR, |
3045 | efx->type->tx_dc_base / 8); | ||
3047 | efx_writeo(efx, &temp, FR_AZ_SRM_TX_DC_CFG); | 3046 | efx_writeo(efx, &temp, FR_AZ_SRM_TX_DC_CFG); |
3048 | EFX_POPULATE_OWORD_1(temp, FRF_AZ_SRM_RX_DC_BASE_ADR, RX_DC_BASE / 8); | 3047 | EFX_POPULATE_OWORD_1(temp, FRF_AZ_SRM_RX_DC_BASE_ADR, |
3048 | efx->type->rx_dc_base / 8); | ||
3049 | efx_writeo(efx, &temp, FR_AZ_SRM_RX_DC_CFG); | 3049 | efx_writeo(efx, &temp, FR_AZ_SRM_RX_DC_CFG); |
3050 | 3050 | ||
3051 | /* Set TX descriptor cache size. */ | 3051 | /* Set TX descriptor cache size. */ |
@@ -3248,6 +3248,8 @@ struct efx_nic_type falcon_a1_nic_type = { | |||
3248 | .rx_buffer_padding = 0x24, | 3248 | .rx_buffer_padding = 0x24, |
3249 | .max_interrupt_mode = EFX_INT_MODE_MSI, | 3249 | .max_interrupt_mode = EFX_INT_MODE_MSI, |
3250 | .phys_addr_channels = 4, | 3250 | .phys_addr_channels = 4, |
3251 | .tx_dc_base = 0x130000, | ||
3252 | .rx_dc_base = 0x100000, | ||
3251 | }; | 3253 | }; |
3252 | 3254 | ||
3253 | struct efx_nic_type falcon_b0_nic_type = { | 3255 | struct efx_nic_type falcon_b0_nic_type = { |
@@ -3271,5 +3273,7 @@ struct efx_nic_type falcon_b0_nic_type = { | |||
3271 | .phys_addr_channels = 32, /* Hardware limit is 64, but the legacy | 3273 | .phys_addr_channels = 32, /* Hardware limit is 64, but the legacy |
3272 | * interrupt handler only supports 32 | 3274 | * interrupt handler only supports 32 |
3273 | * channels */ | 3275 | * channels */ |
3276 | .tx_dc_base = 0x130000, | ||
3277 | .rx_dc_base = 0x100000, | ||
3274 | }; | 3278 | }; |
3275 | 3279 | ||
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index a42a0516d044..30fb21e60511 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
@@ -857,6 +857,8 @@ static inline const char *efx_dev_name(struct efx_nic *efx) | |||
857 | * from &enum efx_init_mode. | 857 | * from &enum efx_init_mode. |
858 | * @phys_addr_channels: Number of channels with physically addressed | 858 | * @phys_addr_channels: Number of channels with physically addressed |
859 | * descriptors | 859 | * descriptors |
860 | * @tx_dc_base: Base address in SRAM of TX queue descriptor caches | ||
861 | * @rx_dc_base: Base address in SRAM of RX queue descriptor caches | ||
860 | */ | 862 | */ |
861 | struct efx_nic_type { | 863 | struct efx_nic_type { |
862 | struct efx_mac_operations *default_mac_ops; | 864 | struct efx_mac_operations *default_mac_ops; |
@@ -872,6 +874,8 @@ struct efx_nic_type { | |||
872 | unsigned int rx_buffer_padding; | 874 | unsigned int rx_buffer_padding; |
873 | unsigned int max_interrupt_mode; | 875 | unsigned int max_interrupt_mode; |
874 | unsigned int phys_addr_channels; | 876 | unsigned int phys_addr_channels; |
877 | unsigned int tx_dc_base; | ||
878 | unsigned int rx_dc_base; | ||
875 | }; | 879 | }; |
876 | 880 | ||
877 | /************************************************************************** | 881 | /************************************************************************** |