diff options
| -rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 12 | ||||
| -rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c index e4e3b8e2d67e..36fddb199160 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include "hw_atl_utils.h" | 16 | #include "hw_atl_utils.h" |
| 17 | #include "hw_atl_llh.h" | 17 | #include "hw_atl_llh.h" |
| 18 | #include "hw_atl_b0_internal.h" | 18 | #include "hw_atl_b0_internal.h" |
| 19 | #include "hw_atl_llh_internal.h" | ||
| 19 | 20 | ||
| 20 | static int hw_atl_b0_get_hw_caps(struct aq_hw_s *self, | 21 | static int hw_atl_b0_get_hw_caps(struct aq_hw_s *self, |
| 21 | struct aq_hw_caps_s *aq_hw_caps, | 22 | struct aq_hw_caps_s *aq_hw_caps, |
| @@ -368,6 +369,7 @@ static int hw_atl_b0_hw_init(struct aq_hw_s *self, | |||
| 368 | }; | 369 | }; |
| 369 | 370 | ||
| 370 | int err = 0; | 371 | int err = 0; |
| 372 | u32 val; | ||
| 371 | 373 | ||
| 372 | self->aq_nic_cfg = aq_nic_cfg; | 374 | self->aq_nic_cfg = aq_nic_cfg; |
| 373 | 375 | ||
| @@ -385,6 +387,16 @@ static int hw_atl_b0_hw_init(struct aq_hw_s *self, | |||
| 385 | hw_atl_b0_hw_rss_set(self, &aq_nic_cfg->aq_rss); | 387 | hw_atl_b0_hw_rss_set(self, &aq_nic_cfg->aq_rss); |
| 386 | hw_atl_b0_hw_rss_hash_set(self, &aq_nic_cfg->aq_rss); | 388 | hw_atl_b0_hw_rss_hash_set(self, &aq_nic_cfg->aq_rss); |
| 387 | 389 | ||
| 390 | /* Force limit MRRS on RDM/TDM to 2K */ | ||
| 391 | val = aq_hw_read_reg(self, pci_reg_control6_adr); | ||
| 392 | aq_hw_write_reg(self, pci_reg_control6_adr, (val & ~0x707) | 0x404); | ||
| 393 | |||
| 394 | /* TX DMA total request limit. B0 hardware is not capable to | ||
| 395 | * handle more than (8K-MRRS) incoming DMA data. | ||
| 396 | * Value 24 in 256byte units | ||
| 397 | */ | ||
| 398 | aq_hw_write_reg(self, tx_dma_total_req_limit_adr, 24); | ||
| 399 | |||
| 388 | err = aq_hw_err_from_flags(self); | 400 | err = aq_hw_err_from_flags(self); |
| 389 | if (err < 0) | 401 | if (err < 0) |
| 390 | goto err_exit; | 402 | goto err_exit; |
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h index 5527fc0e5942..93450ec930e8 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h | |||
| @@ -2343,6 +2343,9 @@ | |||
| 2343 | #define tx_dma_desc_base_addrmsw_adr(descriptor) \ | 2343 | #define tx_dma_desc_base_addrmsw_adr(descriptor) \ |
| 2344 | (0x00007c04u + (descriptor) * 0x40) | 2344 | (0x00007c04u + (descriptor) * 0x40) |
| 2345 | 2345 | ||
| 2346 | /* tx dma total request limit */ | ||
| 2347 | #define tx_dma_total_req_limit_adr 0x00007b20u | ||
| 2348 | |||
| 2346 | /* tx interrupt moderation control register definitions | 2349 | /* tx interrupt moderation control register definitions |
| 2347 | * Preprocessor definitions for TX Interrupt Moderation Control Register | 2350 | * Preprocessor definitions for TX Interrupt Moderation Control Register |
| 2348 | * Base Address: 0x00008980 | 2351 | * Base Address: 0x00008980 |
| @@ -2369,6 +2372,9 @@ | |||
| 2369 | /* default value of bitfield reg_res_dsbl */ | 2372 | /* default value of bitfield reg_res_dsbl */ |
| 2370 | #define pci_reg_res_dsbl_default 0x1 | 2373 | #define pci_reg_res_dsbl_default 0x1 |
| 2371 | 2374 | ||
| 2375 | /* PCI core control register */ | ||
| 2376 | #define pci_reg_control6_adr 0x1014u | ||
| 2377 | |||
| 2372 | /* global microprocessor scratch pad definitions */ | 2378 | /* global microprocessor scratch pad definitions */ |
| 2373 | #define glb_cpu_scratch_scp_adr(scratch_scp) (0x00000300u + (scratch_scp) * 0x4) | 2379 | #define glb_cpu_scratch_scp_adr(scratch_scp) (0x00000300u + (scratch_scp) * 0x4) |
| 2374 | 2380 | ||
