175a6faf6SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 23a35780fSDavid VomLehn /* 33a35780fSDavid VomLehn * aQuantia Corporation Network Driver 404a18399SEgor Pomozov * Copyright (C) 2014-2019 aQuantia Corporation. All rights reserved 53a35780fSDavid VomLehn */ 63a35780fSDavid VomLehn 73a35780fSDavid VomLehn /* File aq_cfg.h: Definition of configuration parameters and constants. */ 83a35780fSDavid VomLehn 93a35780fSDavid VomLehn #ifndef AQ_CFG_H 103a35780fSDavid VomLehn #define AQ_CFG_H 113a35780fSDavid VomLehn 1271a963cfSDmitry Bogdanov #define AQ_CFG_VECS_DEF 8U 133a35780fSDavid VomLehn #define AQ_CFG_TCS_DEF 1U 143a35780fSDavid VomLehn 153a35780fSDavid VomLehn #define AQ_CFG_TXDS_DEF 4096U 161b09e72dSIgor Russkikh #define AQ_CFG_RXDS_DEF 2048U 173a35780fSDavid VomLehn 183a35780fSDavid VomLehn #define AQ_CFG_IS_POLLING_DEF 0U 193a35780fSDavid VomLehn 203a35780fSDavid VomLehn #define AQ_CFG_FORCE_LEGACY_INT 0U 213a35780fSDavid VomLehn 22b82ee71aSIgor Russkikh #define AQ_CFG_INTERRUPT_MODERATION_OFF 0 23b82ee71aSIgor Russkikh #define AQ_CFG_INTERRUPT_MODERATION_ON 1 24b82ee71aSIgor Russkikh #define AQ_CFG_INTERRUPT_MODERATION_AUTO 0xFFFFU 25b82ee71aSIgor Russkikh 26b82ee71aSIgor Russkikh #define AQ_CFG_INTERRUPT_MODERATION_USEC_MAX (0x1FF * 2) 27b82ee71aSIgor Russkikh 2804a18399SEgor Pomozov #define AQ_CFG_IRQ_MASK 0x3FFU 293a35780fSDavid VomLehn 303a35780fSDavid VomLehn #define AQ_CFG_VECS_MAX 8U 313a35780fSDavid VomLehn #define AQ_CFG_TCS_MAX 8U 323a35780fSDavid VomLehn 333a35780fSDavid VomLehn #define AQ_CFG_TX_FRAME_MAX (16U * 1024U) 348bd7e763SIgor Russkikh #define AQ_CFG_RX_FRAME_MAX (2U * 1024U) 353a35780fSDavid VomLehn 36b647d398SIgor Russkikh #define AQ_CFG_TX_CLEAN_BUDGET 256U 37b647d398SIgor Russkikh 389773ef18SIgor Russkikh #define AQ_CFG_RX_REFILL_THRES 32U 399773ef18SIgor Russkikh 407e2698c4SIgor Russkikh #define AQ_CFG_RX_HDR_SIZE 256U 417e2698c4SIgor Russkikh 4246f4c29dSIgor Russkikh #define AQ_CFG_RX_PAGEORDER 0U 43*0d14657fSTaehee Yoo #define AQ_CFG_XDP_PAGEORDER 2U 4446f4c29dSIgor Russkikh 453a35780fSDavid VomLehn /* LRO */ 463a35780fSDavid VomLehn #define AQ_CFG_IS_LRO_DEF 1U 473a35780fSDavid VomLehn 483a35780fSDavid VomLehn /* RSS */ 49474fb115SDmitry Bogdanov #define AQ_CFG_RSS_INDIRECTION_TABLE_MAX 64U 50474fb115SDmitry Bogdanov #define AQ_CFG_RSS_HASHKEY_SIZE 40U 513a35780fSDavid VomLehn 523a35780fSDavid VomLehn #define AQ_CFG_IS_RSS_DEF 1U 533a35780fSDavid VomLehn #define AQ_CFG_NUM_RSS_QUEUES_DEF AQ_CFG_VECS_DEF 543a35780fSDavid VomLehn #define AQ_CFG_RSS_BASE_CPU_NUM_DEF 0U 553a35780fSDavid VomLehn 563a35780fSDavid VomLehn #define AQ_CFG_PCI_FUNC_MSIX_IRQS 9U 573a35780fSDavid VomLehn #define AQ_CFG_PCI_FUNC_PORTS 2U 583a35780fSDavid VomLehn 59fdb4a083SIgor Russkikh #define AQ_CFG_SERVICE_TIMER_INTERVAL (1 * HZ) 603a35780fSDavid VomLehn #define AQ_CFG_POLLING_TIMER_INTERVAL ((unsigned int)(2 * HZ)) 613a35780fSDavid VomLehn 623a35780fSDavid VomLehn #define AQ_CFG_SKB_FRAGS_MAX 32U 633a35780fSDavid VomLehn 643aec6412SIgor Russkikh /* Number of descriptors available in one ring to resume this ring queue 653aec6412SIgor Russkikh */ 663aec6412SIgor Russkikh #define AQ_CFG_RESTART_DESC_THRES (AQ_CFG_SKB_FRAGS_MAX * 2) 673aec6412SIgor Russkikh 683a35780fSDavid VomLehn /*#define AQ_CFG_MAC_ADDR_PERMANENT {0x30, 0x0E, 0xE3, 0x12, 0x34, 0x56}*/ 693a35780fSDavid VomLehn 70efe779b7SIgor Russkikh #define AQ_CFG_FC_MODE AQ_NIC_FC_FULL 713a35780fSDavid VomLehn 72837c6378SNikita Danilov /* Default WOL modes used on initialization */ 73837c6378SNikita Danilov #define AQ_CFG_WOL_MODES WAKE_MAGIC 74837c6378SNikita Danilov 753a35780fSDavid VomLehn #define AQ_CFG_SPEED_MSK 0xFFFFU /* 0xFFFFU==auto_neg */ 763a35780fSDavid VomLehn 773a35780fSDavid VomLehn #define AQ_CFG_IS_AUTONEG_DEF 1U 783a35780fSDavid VomLehn #define AQ_CFG_MTU_DEF 1514U 793a35780fSDavid VomLehn 803a35780fSDavid VomLehn #define AQ_CFG_LOCK_TRYS 100U 813a35780fSDavid VomLehn 82fe677b05SIgor Russkikh #define AQ_CFG_DRV_AUTHOR "Marvell" 83fe677b05SIgor Russkikh #define AQ_CFG_DRV_DESC "Marvell (Aquantia) Corporation(R) Network Driver" 845900eca1SPavel Belous #define AQ_CFG_DRV_NAME "atlantic" 853a35780fSDavid VomLehn 863a35780fSDavid VomLehn #endif /* AQ_CFG_H */ 87