162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * aQuantia Corporation Network Driver
462306a36Sopenharmony_ci * Copyright (C) 2014-2019 aQuantia Corporation. All rights reserved
562306a36Sopenharmony_ci */
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci/* File aq_cfg.h: Definition of configuration parameters and constants. */
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#ifndef AQ_CFG_H
1062306a36Sopenharmony_ci#define AQ_CFG_H
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#define AQ_CFG_VECS_DEF   8U
1362306a36Sopenharmony_ci#define AQ_CFG_TCS_DEF    1U
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#define AQ_CFG_TXDS_DEF    4096U
1662306a36Sopenharmony_ci#define AQ_CFG_RXDS_DEF    2048U
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci#define AQ_CFG_IS_POLLING_DEF 0U
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci#define AQ_CFG_FORCE_LEGACY_INT 0U
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci#define AQ_CFG_INTERRUPT_MODERATION_OFF		0
2362306a36Sopenharmony_ci#define AQ_CFG_INTERRUPT_MODERATION_ON		1
2462306a36Sopenharmony_ci#define AQ_CFG_INTERRUPT_MODERATION_AUTO	0xFFFFU
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci#define AQ_CFG_INTERRUPT_MODERATION_USEC_MAX (0x1FF * 2)
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci#define AQ_CFG_IRQ_MASK                      0x3FFU
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci#define AQ_CFG_VECS_MAX   8U
3162306a36Sopenharmony_ci#define AQ_CFG_TCS_MAX    8U
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci#define AQ_CFG_TX_FRAME_MAX  (16U * 1024U)
3462306a36Sopenharmony_ci#define AQ_CFG_RX_FRAME_MAX  (2U * 1024U)
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci#define AQ_CFG_TX_CLEAN_BUDGET 256U
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci#define AQ_CFG_RX_REFILL_THRES 32U
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci#define AQ_CFG_RX_HDR_SIZE 256U
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci#define AQ_CFG_RX_PAGEORDER 0U
4362306a36Sopenharmony_ci#define AQ_CFG_XDP_PAGEORDER 2U
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci/* LRO */
4662306a36Sopenharmony_ci#define AQ_CFG_IS_LRO_DEF           1U
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci/* RSS */
4962306a36Sopenharmony_ci#define AQ_CFG_RSS_INDIRECTION_TABLE_MAX  64U
5062306a36Sopenharmony_ci#define AQ_CFG_RSS_HASHKEY_SIZE           40U
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci#define AQ_CFG_IS_RSS_DEF           1U
5362306a36Sopenharmony_ci#define AQ_CFG_NUM_RSS_QUEUES_DEF   AQ_CFG_VECS_DEF
5462306a36Sopenharmony_ci#define AQ_CFG_RSS_BASE_CPU_NUM_DEF 0U
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci#define AQ_CFG_PCI_FUNC_MSIX_IRQS   9U
5762306a36Sopenharmony_ci#define AQ_CFG_PCI_FUNC_PORTS       2U
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci#define AQ_CFG_SERVICE_TIMER_INTERVAL    (1 * HZ)
6062306a36Sopenharmony_ci#define AQ_CFG_POLLING_TIMER_INTERVAL   ((unsigned int)(2 * HZ))
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ci#define AQ_CFG_SKB_FRAGS_MAX   32U
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci/* Number of descriptors available in one ring to resume this ring queue
6562306a36Sopenharmony_ci */
6662306a36Sopenharmony_ci#define AQ_CFG_RESTART_DESC_THRES   (AQ_CFG_SKB_FRAGS_MAX * 2)
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ci/*#define AQ_CFG_MAC_ADDR_PERMANENT {0x30, 0x0E, 0xE3, 0x12, 0x34, 0x56}*/
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci#define AQ_CFG_FC_MODE AQ_NIC_FC_FULL
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci/* Default WOL modes used on initialization */
7362306a36Sopenharmony_ci#define AQ_CFG_WOL_MODES WAKE_MAGIC
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci#define AQ_CFG_SPEED_MSK  0xFFFFU	/* 0xFFFFU==auto_neg */
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ci#define AQ_CFG_IS_AUTONEG_DEF       1U
7862306a36Sopenharmony_ci#define AQ_CFG_MTU_DEF              1514U
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ci#define AQ_CFG_LOCK_TRYS   100U
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci#define AQ_CFG_DRV_AUTHOR      "Marvell"
8362306a36Sopenharmony_ci#define AQ_CFG_DRV_DESC        "Marvell (Aquantia) Corporation(R) Network Driver"
8462306a36Sopenharmony_ci#define AQ_CFG_DRV_NAME        "atlantic"
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ci#endif /* AQ_CFG_H */
87