18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * aQuantia Corporation Network Driver 48c2ecf20Sopenharmony_ci * Copyright (C) 2014-2019 aQuantia Corporation. All rights reserved 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* File aq_cfg.h: Definition of configuration parameters and constants. */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef AQ_CFG_H 108c2ecf20Sopenharmony_ci#define AQ_CFG_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#define AQ_CFG_VECS_DEF 8U 138c2ecf20Sopenharmony_ci#define AQ_CFG_TCS_DEF 1U 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#define AQ_CFG_TXDS_DEF 4096U 168c2ecf20Sopenharmony_ci#define AQ_CFG_RXDS_DEF 2048U 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define AQ_CFG_IS_POLLING_DEF 0U 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define AQ_CFG_FORCE_LEGACY_INT 0U 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define AQ_CFG_INTERRUPT_MODERATION_OFF 0 238c2ecf20Sopenharmony_ci#define AQ_CFG_INTERRUPT_MODERATION_ON 1 248c2ecf20Sopenharmony_ci#define AQ_CFG_INTERRUPT_MODERATION_AUTO 0xFFFFU 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define AQ_CFG_INTERRUPT_MODERATION_USEC_MAX (0x1FF * 2) 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#define AQ_CFG_IRQ_MASK 0x3FFU 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define AQ_CFG_VECS_MAX 8U 318c2ecf20Sopenharmony_ci#define AQ_CFG_TCS_MAX 8U 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#define AQ_CFG_TX_FRAME_MAX (16U * 1024U) 348c2ecf20Sopenharmony_ci#define AQ_CFG_RX_FRAME_MAX (2U * 1024U) 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#define AQ_CFG_TX_CLEAN_BUDGET 256U 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#define AQ_CFG_RX_REFILL_THRES 32U 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define AQ_CFG_RX_HDR_SIZE 256U 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#define AQ_CFG_RX_PAGEORDER 0U 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci/* LRO */ 458c2ecf20Sopenharmony_ci#define AQ_CFG_IS_LRO_DEF 1U 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci/* RSS */ 488c2ecf20Sopenharmony_ci#define AQ_CFG_RSS_INDIRECTION_TABLE_MAX 64U 498c2ecf20Sopenharmony_ci#define AQ_CFG_RSS_HASHKEY_SIZE 40U 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#define AQ_CFG_IS_RSS_DEF 1U 528c2ecf20Sopenharmony_ci#define AQ_CFG_NUM_RSS_QUEUES_DEF AQ_CFG_VECS_DEF 538c2ecf20Sopenharmony_ci#define AQ_CFG_RSS_BASE_CPU_NUM_DEF 0U 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci#define AQ_CFG_PCI_FUNC_MSIX_IRQS 9U 568c2ecf20Sopenharmony_ci#define AQ_CFG_PCI_FUNC_PORTS 2U 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci#define AQ_CFG_SERVICE_TIMER_INTERVAL (1 * HZ) 598c2ecf20Sopenharmony_ci#define AQ_CFG_POLLING_TIMER_INTERVAL ((unsigned int)(2 * HZ)) 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#define AQ_CFG_SKB_FRAGS_MAX 32U 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci/* Number of descriptors available in one ring to resume this ring queue 648c2ecf20Sopenharmony_ci */ 658c2ecf20Sopenharmony_ci#define AQ_CFG_RESTART_DESC_THRES (AQ_CFG_SKB_FRAGS_MAX * 2) 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci#define AQ_CFG_NAPI_WEIGHT 64U 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci/*#define AQ_CFG_MAC_ADDR_PERMANENT {0x30, 0x0E, 0xE3, 0x12, 0x34, 0x56}*/ 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci#define AQ_CFG_FC_MODE AQ_NIC_FC_FULL 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci/* Default WOL modes used on initialization */ 748c2ecf20Sopenharmony_ci#define AQ_CFG_WOL_MODES WAKE_MAGIC 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci#define AQ_CFG_SPEED_MSK 0xFFFFU /* 0xFFFFU==auto_neg */ 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci#define AQ_CFG_IS_AUTONEG_DEF 1U 798c2ecf20Sopenharmony_ci#define AQ_CFG_MTU_DEF 1514U 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci#define AQ_CFG_LOCK_TRYS 100U 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci#define AQ_CFG_DRV_AUTHOR "Marvell" 848c2ecf20Sopenharmony_ci#define AQ_CFG_DRV_DESC "Marvell (Aquantia) Corporation(R) Network Driver" 858c2ecf20Sopenharmony_ci#define AQ_CFG_DRV_NAME "atlantic" 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci#endif /* AQ_CFG_H */ 88