iPXE
etherfabric.c File Reference
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include <byteswap.h>
#include <ipxe/io.h>
#include <ipxe/pci.h>
#include <ipxe/malloc.h>
#include <ipxe/ethernet.h>
#include <ipxe/iobuf.h>
#include <ipxe/netdevice.h>
#include <ipxe/timer.h>
#include <mii.h>
#include "etherfabric.h"
#include "etherfabric_nic.h"

Go to the source code of this file.

Data Structures

struct  falcon_nv_config_ver2
struct  falcon_nv_extra

Macros

#define EFAB_REGDUMP(...)
#define EFAB_TRACE(...)
#define EFAB_LOG(...)
#define EFAB_ERR(...)
#define FALCON_USE_IO_BAR   0
#define HZ   100
#define EFAB_BYTE   1
#define FQS(_prefix, _x)
#define EFAB_MAX_FRAME_LEN(mtu)
#define GMII_PSSR   0x11 /* PHY-specific status register */
#define LPA_EF_1000FULL   0x00020000
#define LPA_EF_1000HALF   0x00010000
#define LPA_EF_10000FULL   0x00040000
#define LPA_EF_10000HALF   0x00080000
#define LPA_EF_1000   ( LPA_EF_1000FULL | LPA_EF_1000HALF )
#define LPA_EF_10000   ( LPA_EF_10000FULL | LPA_EF_10000HALF )
#define LPA_EF_DUPLEX
#define LPA_OTHER
#define PSSR_LSTATUS   0x0400 /* Bit 10 - link status */
#define MDIO_MMD_PMAPMD   (1)
#define MDIO_MMD_WIS   (2)
#define MDIO_MMD_PCS   (3)
#define MDIO_MMD_PHYXS   (4)
#define MDIO_MMD_DTEXS   (5)
#define MDIO_MMD_TC   (6)
#define MDIO_MMD_AN   (7)
#define MDIO_MMDREG_CTRL1   (0)
#define MDIO_MMDREG_STAT1   (1)
#define MDIO_MMDREG_DEVS0   (5)
#define MDIO_MMDREG_STAT2   (8)
#define MDIO_MMDREG_CTRL1_RESET_LBN   (15)
#define MDIO_MMDREG_CTRL1_RESET_WIDTH   (1)
#define MDIO_MMDREG_STAT1_FAULT_LBN   (7)
#define MDIO_MMDREG_STAT1_FAULT_WIDTH   (1)
#define MDIO_MMDREG_STAT1_LINK_LBN   (2)
#define MDIO_MMDREG_STAT1_LINK_WIDTH   (1)
#define DEV_PRESENT_BIT(_b)
#define MDIO_MMDREG_DEVS0_DTEXS   DEV_PRESENT_BIT(MDIO_MMD_DTEXS)
#define MDIO_MMDREG_DEVS0_PHYXS   DEV_PRESENT_BIT(MDIO_MMD_PHYXS)
#define MDIO_MMDREG_DEVS0_PCS   DEV_PRESENT_BIT(MDIO_MMD_PCS)
#define MDIO_MMDREG_DEVS0_WIS   DEV_PRESENT_BIT(MDIO_MMD_WIS)
#define MDIO_MMDREG_DEVS0_PMAPMD   DEV_PRESENT_BIT(MDIO_MMD_PMAPMD)
#define MDIO_MMDREG_DEVS0_AN   DEV_PRESENT_BIT(MDIO_MMD_AN)
#define MDIO_MMDREG_STAT2_PRESENT_VAL   (2)
#define MDIO_MMDREG_STAT2_PRESENT_LBN   (14)
#define MDIO_MMDREG_STAT2_PRESENT_WIDTH   (2)
#define MDIO_PHYXS_LANE_STATE   (0x18)
#define MDIO_PHYXS_LANE_ALIGNED_LBN   (12)
#define MDIO_PHYXS_LANE_SYNC0_LBN   (0)
#define MDIO_PHYXS_LANE_SYNC1_LBN   (1)
#define MDIO_PHYXS_LANE_SYNC2_LBN   (2)
#define MDIO_PHYXS_LANE_SYNC3_LBN   (3)
#define MDIO45_RESET_TRIES   100
#define MDIO45_RESET_SPINTIME   10
#define FCN_IOM_IND_ADR_REG   0x0
#define FCN_IOM_IND_DAT_REG   0x4
#define FCN_ADR_REGION_REG_KER   0x00
#define FCN_ADR_REGION0_LBN   0
#define FCN_ADR_REGION0_WIDTH   18
#define FCN_ADR_REGION1_LBN   32
#define FCN_ADR_REGION1_WIDTH   18
#define FCN_ADR_REGION2_LBN   64
#define FCN_ADR_REGION2_WIDTH   18
#define FCN_ADR_REGION3_LBN   96
#define FCN_ADR_REGION3_WIDTH   18
#define FCN_INT_EN_REG_KER   0x0010
#define FCN_MEM_PERR_INT_EN_KER_LBN   5
#define FCN_MEM_PERR_INT_EN_KER_WIDTH   1
#define FCN_KER_INT_CHAR_LBN   4
#define FCN_KER_INT_CHAR_WIDTH   1
#define FCN_KER_INT_KER_LBN   3
#define FCN_KER_INT_KER_WIDTH   1
#define FCN_ILL_ADR_ERR_INT_EN_KER_LBN   2
#define FCN_ILL_ADR_ERR_INT_EN_KER_WIDTH   1
#define FCN_SRM_PERR_INT_EN_KER_LBN   1
#define FCN_SRM_PERR_INT_EN_KER_WIDTH   1
#define FCN_DRV_INT_EN_KER_LBN   0
#define FCN_DRV_INT_EN_KER_WIDTH   1
#define FCN_INT_ADR_REG_KER   0x0030
#define FCN_INT_ADR_KER_LBN   0
#define FCN_INT_ADR_KER_WIDTH   EFAB_DMA_TYPE_WIDTH ( 64 )
#define INT_ISR0_B0   0x90
#define INT_ISR1_B0   0xA0
#define FCN_INT_ACK_KER_REG_A1   0x0050
#define INT_ACK_DUMMY_DATA_LBN   0
#define INT_ACK_DUMMY_DATA_WIDTH   32
#define WORK_AROUND_BROKEN_PCI_READS_REG_KER_A1   0x0070
#define FCN_HW_INIT_REG_KER   0x00c0
#define FCN_BCSR_TARGET_MASK_LBN   101
#define FCN_BCSR_TARGET_MASK_WIDTH   4
#define FCN_EE_SPI_HCMD_REG   0x0100
#define FCN_EE_SPI_HCMD_CMD_EN_LBN   31
#define FCN_EE_SPI_HCMD_CMD_EN_WIDTH   1
#define FCN_EE_WR_TIMER_ACTIVE_LBN   28
#define FCN_EE_WR_TIMER_ACTIVE_WIDTH   1
#define FCN_EE_SPI_HCMD_SF_SEL_LBN   24
#define FCN_EE_SPI_HCMD_SF_SEL_WIDTH   1
#define FCN_EE_SPI_EEPROM   0
#define FCN_EE_SPI_FLASH   1
#define FCN_EE_SPI_HCMD_DABCNT_LBN   16
#define FCN_EE_SPI_HCMD_DABCNT_WIDTH   5
#define FCN_EE_SPI_HCMD_READ_LBN   15
#define FCN_EE_SPI_HCMD_READ_WIDTH   1
#define FCN_EE_SPI_READ   1
#define FCN_EE_SPI_WRITE   0
#define FCN_EE_SPI_HCMD_DUBCNT_LBN   12
#define FCN_EE_SPI_HCMD_DUBCNT_WIDTH   2
#define FCN_EE_SPI_HCMD_ADBCNT_LBN   8
#define FCN_EE_SPI_HCMD_ADBCNT_WIDTH   2
#define FCN_EE_SPI_HCMD_ENC_LBN   0
#define FCN_EE_SPI_HCMD_ENC_WIDTH   8
#define FCN_EE_SPI_HADR_REG   0x0110
#define FCN_EE_SPI_HADR_DUBYTE_LBN   24
#define FCN_EE_SPI_HADR_DUBYTE_WIDTH   8
#define FCN_EE_SPI_HADR_ADR_LBN   0
#define FCN_EE_SPI_HADR_ADR_WIDTH   24
#define FCN_EE_SPI_HDATA_REG   0x0120
#define FCN_EE_SPI_HDATA3_LBN   96
#define FCN_EE_SPI_HDATA3_WIDTH   32
#define FCN_EE_SPI_HDATA2_LBN   64
#define FCN_EE_SPI_HDATA2_WIDTH   32
#define FCN_EE_SPI_HDATA1_LBN   32
#define FCN_EE_SPI_HDATA1_WIDTH   32
#define FCN_EE_SPI_HDATA0_LBN   0
#define FCN_EE_SPI_HDATA0_WIDTH   32
#define FCN_EE_VPD_CFG_REG   0x0140
#define FCN_EE_VPD_EN_LBN   0
#define FCN_EE_VPD_EN_WIDTH   1
#define FCN_EE_VPD_EN_AD9_MODE_LBN   1
#define FCN_EE_VPD_EN_AD9_MODE_WIDTH   1
#define FCN_EE_EE_CLOCK_DIV_LBN   112
#define FCN_EE_EE_CLOCK_DIV_WIDTH   7
#define FCN_EE_SF_CLOCK_DIV_LBN   120
#define FCN_EE_SF_CLOCK_DIV_WIDTH   7
#define FCN_NIC_STAT_REG   0x0200
#define FCN_ONCHIP_SRAM_LBN   16
#define FCN_ONCHIP_SRAM_WIDTH   1
#define FCN_SF_PRST_LBN   9
#define FCN_SF_PRST_WIDTH   1
#define FCN_EE_PRST_LBN   8
#define FCN_EE_PRST_WIDTH   1
#define FCN_EE_STRAP_LBN   7
#define FCN_EE_STRAP_WIDTH   1
#define FCN_PCI_PCIX_MODE_LBN   4
#define FCN_PCI_PCIX_MODE_WIDTH   3
#define FCN_PCI_PCIX_MODE_PCI33_DECODE   0
#define FCN_PCI_PCIX_MODE_PCI66_DECODE   1
#define FCN_PCI_PCIX_MODE_PCIX66_DECODE   5
#define FCN_PCI_PCIX_MODE_PCIX100_DECODE   6
#define FCN_PCI_PCIX_MODE_PCIX133_DECODE   7
#define FCN_STRAP_ISCSI_EN_LBN   3
#define FCN_STRAP_ISCSI_EN_WIDTH   1
#define FCN_STRAP_PINS_LBN   0
#define FCN_STRAP_PINS_WIDTH   3
#define FCN_STRAP_10G_LBN   2
#define FCN_STRAP_10G_WIDTH   1
#define FCN_STRAP_DUAL_PORT_LBN   1
#define FCN_STRAP_DUAL_PORT_WIDTH   1
#define FCN_STRAP_PCIE_LBN   0
#define FCN_STRAP_PCIE_WIDTH   1
#define FALCON_REV_A0   0
#define FALCON_REV_A1   1
#define FALCON_REV_B0   2
#define FCN_GPIO_CTL_REG_KER   0x0210
#define FCN_GPIO_CTL_REG_KER   0x0210
#define FCN_GPIO3_OEN_LBN   27
#define FCN_GPIO3_OEN_WIDTH   1
#define FCN_GPIO2_OEN_LBN   26
#define FCN_GPIO2_OEN_WIDTH   1
#define FCN_GPIO1_OEN_LBN   25
#define FCN_GPIO1_OEN_WIDTH   1
#define FCN_GPIO0_OEN_LBN   24
#define FCN_GPIO0_OEN_WIDTH   1
#define FCN_GPIO3_OUT_LBN   19
#define FCN_GPIO3_OUT_WIDTH   1
#define FCN_GPIO2_OUT_LBN   18
#define FCN_GPIO2_OUT_WIDTH   1
#define FCN_GPIO1_OUT_LBN   17
#define FCN_GPIO1_OUT_WIDTH   1
#define FCN_GPIO0_OUT_LBN   16
#define FCN_GPIO0_OUT_WIDTH   1
#define FCN_GPIO3_IN_LBN   11
#define FCN_GPIO3_IN_WIDTH   1
#define FCN_GPIO2_IN_LBN   10
#define FCN_GPIO2_IN_WIDTH   1
#define FCN_GPIO1_IN_LBN   9
#define FCN_GPIO1_IN_WIDTH   1
#define FCN_GPIO0_IN_LBN   8
#define FCN_GPIO0_IN_WIDTH   1
#define FCN_FLASH_PRESENT_LBN   7
#define FCN_FLASH_PRESENT_WIDTH   1
#define FCN_EEPROM_PRESENT_LBN   6
#define FCN_EEPROM_PRESENT_WIDTH   1
#define FCN_BOOTED_USING_NVDEVICE_LBN   3
#define FCN_BOOTED_USING_NVDEVICE_WIDTH   1
#define FCN_NV_MAGIC_NUMBER   0xFA1C
#define FCN_GLB_CTL_REG_KER   0x0220
#define FCN_EXT_PHY_RST_CTL_LBN   63
#define FCN_EXT_PHY_RST_CTL_WIDTH   1
#define FCN_PCIE_SD_RST_CTL_LBN   61
#define FCN_PCIE_SD_RST_CTL_WIDTH   1
#define FCN_PCIE_STCK_RST_CTL_LBN   59
#define FCN_PCIE_STCK_RST_CTL_WIDTH   1
#define FCN_PCIE_NSTCK_RST_CTL_LBN   58
#define FCN_PCIE_NSTCK_RST_CTL_WIDTH   1
#define FCN_PCIE_CORE_RST_CTL_LBN   57
#define FCN_PCIE_CORE_RST_CTL_WIDTH   1
#define FCN_EE_RST_CTL_LBN   49
#define FCN_EE_RST_CTL_WIDTH   1
#define FCN_RST_EXT_PHY_LBN   31
#define FCN_RST_EXT_PHY_WIDTH   1
#define FCN_EXT_PHY_RST_DUR_LBN   1
#define FCN_EXT_PHY_RST_DUR_WIDTH   3
#define FCN_SWRST_LBN   0
#define FCN_SWRST_WIDTH   1
#define INCLUDE_IN_RESET   0
#define EXCLUDE_FROM_RESET   1
#define FCN_ALTERA_BUILD_REG_KER   0x0300
#define FCN_VER_MAJOR_LBN   24
#define FCN_VER_MAJOR_WIDTH   8
#define FCN_VER_MINOR_LBN   16
#define FCN_VER_MINOR_WIDTH   8
#define FCN_VER_BUILD_LBN   0
#define FCN_VER_BUILD_WIDTH   16
#define FCN_VER_ALL_LBN   0
#define FCN_VER_ALL_WIDTH   32
#define FCN_SPARE_REG_KER   0x310
#define FCN_MEM_PERR_EN_TX_DATA_LBN   72
#define FCN_MEM_PERR_EN_TX_DATA_WIDTH   2
#define FCN_TIMER_CMD_REG_KER   0x420
#define FCN_TIMER_MODE_LBN   12
#define FCN_TIMER_MODE_WIDTH   2
#define FCN_TIMER_MODE_DIS   0
#define FCN_TIMER_MODE_INT_HLDOFF   1
#define FCN_TIMER_VAL_LBN   0
#define FCN_TIMER_VAL_WIDTH   12
#define FCN_RX_CFG_REG_KER   0x800
#define FCN_RX_XOFF_EN_LBN   0
#define FCN_RX_XOFF_EN_WIDTH   1
#define FCN_SRM_RX_DC_CFG_REG_KER   0x610
#define FCN_SRM_RX_DC_BASE_ADR_LBN   0
#define FCN_SRM_RX_DC_BASE_ADR_WIDTH   21
#define FCN_SRM_TX_DC_CFG_REG_KER   0x620
#define FCN_SRM_TX_DC_BASE_ADR_LBN   0
#define FCN_SRM_TX_DC_BASE_ADR_WIDTH   21
#define FCN_SRM_CFG_REG_KER   0x630
#define FCN_SRAM_OOB_ADR_INTEN_LBN   5
#define FCN_SRAM_OOB_ADR_INTEN_WIDTH   1
#define FCN_SRAM_OOB_BUF_INTEN_LBN   4
#define FCN_SRAM_OOB_BUF_INTEN_WIDTH   1
#define FCN_SRAM_OOB_BT_INIT_EN_LBN   3
#define FCN_SRAM_OOB_BT_INIT_EN_WIDTH   1
#define FCN_SRM_NUM_BANK_LBN   2
#define FCN_SRM_NUM_BANK_WIDTH   1
#define FCN_SRM_BANK_SIZE_LBN   0
#define FCN_SRM_BANK_SIZE_WIDTH   2
#define FCN_SRM_NUM_BANKS_AND_BANK_SIZE_LBN   0
#define FCN_SRM_NUM_BANKS_AND_BANK_SIZE_WIDTH   3
#define FCN_RX_CFG_REG_KER   0x800
#define FCN_RX_INGR_EN_B0_LBN   47
#define FCN_RX_INGR_EN_B0_WIDTH   1
#define FCN_RX_USR_BUF_SIZE_B0_LBN   19
#define FCN_RX_USR_BUF_SIZE_B0_WIDTH   9
#define FCN_RX_XON_MAC_TH_B0_LBN   10
#define FCN_RX_XON_MAC_TH_B0_WIDTH   9
#define FCN_RX_XOFF_MAC_TH_B0_LBN   1
#define FCN_RX_XOFF_MAC_TH_B0_WIDTH   9
#define FCN_RX_XOFF_MAC_EN_B0_LBN   0
#define FCN_RX_XOFF_MAC_EN_B0_WIDTH   1
#define FCN_RX_USR_BUF_SIZE_A1_LBN   11
#define FCN_RX_USR_BUF_SIZE_A1_WIDTH   9
#define FCN_RX_XON_MAC_TH_A1_LBN   6
#define FCN_RX_XON_MAC_TH_A1_WIDTH   5
#define FCN_RX_XOFF_MAC_TH_A1_LBN   1
#define FCN_RX_XOFF_MAC_TH_A1_WIDTH   5
#define FCN_RX_XOFF_MAC_EN_A1_LBN   0
#define FCN_RX_XOFF_MAC_EN_A1_WIDTH   1
#define FCN_RX_USR_BUF_SIZE_A1_LBN   11
#define FCN_RX_USR_BUF_SIZE_A1_WIDTH   9
#define FCN_RX_XOFF_MAC_EN_A1_LBN   0
#define FCN_RX_XOFF_MAC_EN_A1_WIDTH   1
#define FCN_RX_FILTER_CTL_REG_KER   0x810
#define FCN_UDP_FULL_SRCH_LIMIT_LBN   32
#define FCN_UDP_FULL_SRCH_LIMIT_WIDTH   8
#define FCN_NUM_KER_LBN   24
#define FCN_NUM_KER_WIDTH   2
#define FCN_UDP_WILD_SRCH_LIMIT_LBN   16
#define FCN_UDP_WILD_SRCH_LIMIT_WIDTH   8
#define FCN_TCP_WILD_SRCH_LIMIT_LBN   8
#define FCN_TCP_WILD_SRCH_LIMIT_WIDTH   8
#define FCN_TCP_FULL_SRCH_LIMIT_LBN   0
#define FCN_TCP_FULL_SRCH_LIMIT_WIDTH   8
#define FCN_RX_FLUSH_DESCQ_REG_KER   0x0820
#define FCN_RX_FLUSH_DESCQ_CMD_LBN   24
#define FCN_RX_FLUSH_DESCQ_CMD_WIDTH   1
#define FCN_RX_FLUSH_DESCQ_LBN   0
#define FCN_RX_FLUSH_DESCQ_WIDTH   12
#define FCN_RX_DESC_UPD_REG_KER   0x0830
#define FCN_RX_DESC_WPTR_LBN   96
#define FCN_RX_DESC_WPTR_WIDTH   12
#define FCN_RX_DESC_UPD_REG_KER_DWORD   ( FCN_RX_DESC_UPD_REG_KER + 12 )
#define FCN_RX_DESC_WPTR_DWORD_LBN   0
#define FCN_RX_DESC_WPTR_DWORD_WIDTH   12
#define FCN_RX_DC_CFG_REG_KER   0x840
#define FCN_RX_DC_SIZE_LBN   0
#define FCN_RX_DC_SIZE_WIDTH   2
#define FCN_RX_SELF_RST_REG_KER   0x890
#define FCN_RX_ISCSI_DIS_LBN   17
#define FCN_RX_ISCSI_DIS_WIDTH   1
#define FCN_RX_NODESC_WAIT_DIS_LBN   9
#define FCN_RX_NODESC_WAIT_DIS_WIDTH   1
#define FCN_RX_RECOVERY_EN_LBN   8
#define FCN_RX_RECOVERY_EN_WIDTH   1
#define FCN_TX_FLUSH_DESCQ_REG_KER   0x0a00
#define FCN_TX_FLUSH_DESCQ_CMD_LBN   12
#define FCN_TX_FLUSH_DESCQ_CMD_WIDTH   1
#define FCN_TX_FLUSH_DESCQ_LBN   0
#define FCN_TX_FLUSH_DESCQ_WIDTH   12
#define FCN_TX_CFG2_REG_KER   0xa80
#define FCN_TX_DIS_NON_IP_EV_LBN   17
#define FCN_TX_DIS_NON_IP_EV_WIDTH   1
#define FCN_TX_DESC_UPD_REG_KER   0x0a10
#define FCN_TX_DESC_WPTR_LBN   96
#define FCN_TX_DESC_WPTR_WIDTH   12
#define FCN_TX_DESC_UPD_REG_KER_DWORD   ( FCN_TX_DESC_UPD_REG_KER + 12 )
#define FCN_TX_DESC_WPTR_DWORD_LBN   0
#define FCN_TX_DESC_WPTR_DWORD_WIDTH   12
#define FCN_TX_DC_CFG_REG_KER   0xa20
#define FCN_TX_DC_SIZE_LBN   0
#define FCN_TX_DC_SIZE_WIDTH   2
#define FCN_MD_TXD_REG_KER   0xc00
#define FCN_MD_TXD_LBN   0
#define FCN_MD_TXD_WIDTH   16
#define FCN_MD_RXD_REG_KER   0xc10
#define FCN_MD_RXD_LBN   0
#define FCN_MD_RXD_WIDTH   16
#define FCN_MD_CS_REG_KER   0xc20
#define FCN_MD_GC_LBN   4
#define FCN_MD_GC_WIDTH   1
#define FCN_MD_RIC_LBN   2
#define FCN_MD_RIC_WIDTH   1
#define FCN_MD_RDC_LBN   1
#define FCN_MD_RDC_WIDTH   1
#define FCN_MD_WRC_LBN   0
#define FCN_MD_WRC_WIDTH   1
#define FCN_MD_PHY_ADR_REG_KER   0xc30
#define FCN_MD_PHY_ADR_LBN   0
#define FCN_MD_PHY_ADR_WIDTH   16
#define FCN_MD_ID_REG_KER   0xc40
#define FCN_MD_PRT_ADR_LBN   11
#define FCN_MD_PRT_ADR_WIDTH   5
#define FCN_MD_DEV_ADR_LBN   6
#define FCN_MD_DEV_ADR_WIDTH   5
#define FCN_MD_STAT_REG_KER   0xc50
#define FCN_MD_PINT_LBN   4
#define FCN_MD_PINT_WIDTH   1
#define FCN_MD_DONE_LBN   3
#define FCN_MD_DONE_WIDTH   1
#define FCN_MD_BSERR_LBN   2
#define FCN_MD_BSERR_WIDTH   1
#define FCN_MD_LNFL_LBN   1
#define FCN_MD_LNFL_WIDTH   1
#define FCN_MD_BSY_LBN   0
#define FCN_MD_BSY_WIDTH   1
#define FCN_MAC0_CTRL_REG_KER   0xc80
#define FCN_MAC1_CTRL_REG_KER   0xc90
#define FCN_MAC_XOFF_VAL_LBN   16
#define FCN_MAC_XOFF_VAL_WIDTH   16
#define FCN_MAC_BCAD_ACPT_LBN   4
#define FCN_MAC_BCAD_ACPT_WIDTH   1
#define FCN_MAC_UC_PROM_LBN   3
#define FCN_MAC_UC_PROM_WIDTH   1
#define FCN_MAC_LINK_STATUS_LBN   2
#define FCN_MAC_LINK_STATUS_WIDTH   1
#define FCN_MAC_SPEED_LBN   0
#define FCN_MAC_SPEED_WIDTH   2
#define XX_TXDRV_DEQ_DEFAULT   0xe /* deq=.6 */
#define XX_TXDRV_DTX_DEFAULT   0x5 /* 1.25 */
#define XX_SD_CTL_DRV_DEFAULT   0 /* 20mA */
#define FALCON_GMAC_REGBANK   0xe00
#define FALCON_GMAC_REGBANK_SIZE   0x200
#define FALCON_GMAC_REG_SIZE   0x10
#define FALCON_XMAC_REGBANK   0x1200
#define FALCON_XMAC_REGBANK_SIZE   0x200
#define FALCON_XMAC_REG_SIZE   0x10
#define FCN_XM_ADR_LO_REG_MAC   0x00
#define FCN_XM_ADR_3_LBN   24
#define FCN_XM_ADR_3_WIDTH   8
#define FCN_XM_ADR_2_LBN   16
#define FCN_XM_ADR_2_WIDTH   8
#define FCN_XM_ADR_1_LBN   8
#define FCN_XM_ADR_1_WIDTH   8
#define FCN_XM_ADR_0_LBN   0
#define FCN_XM_ADR_0_WIDTH   8
#define FCN_XM_ADR_HI_REG_MAC   0x01
#define FCN_XM_ADR_5_LBN   8
#define FCN_XM_ADR_5_WIDTH   8
#define FCN_XM_ADR_4_LBN   0
#define FCN_XM_ADR_4_WIDTH   8
#define FCN_XM_GLB_CFG_REG_MAC   0x02
#define FCN_XM_RX_STAT_EN_LBN   11
#define FCN_XM_RX_STAT_EN_WIDTH   1
#define FCN_XM_TX_STAT_EN_LBN   10
#define FCN_XM_TX_STAT_EN_WIDTH   1
#define FCN_XM_RX_JUMBO_MODE_LBN   6
#define FCN_XM_RX_JUMBO_MODE_WIDTH   1
#define FCN_XM_CORE_RST_LBN   0
#define FCN_XM_CORE_RST_WIDTH   1
#define FCN_XM_TX_CFG_REG_MAC   0x03
#define FCN_XM_IPG_LBN   16
#define FCN_XM_IPG_WIDTH   4
#define FCN_XM_FCNTL_LBN   10
#define FCN_XM_FCNTL_WIDTH   1
#define FCN_XM_TXCRC_LBN   8
#define FCN_XM_TXCRC_WIDTH   1
#define FCN_XM_AUTO_PAD_LBN   5
#define FCN_XM_AUTO_PAD_WIDTH   1
#define FCN_XM_TX_PRMBL_LBN   2
#define FCN_XM_TX_PRMBL_WIDTH   1
#define FCN_XM_TXEN_LBN   1
#define FCN_XM_TXEN_WIDTH   1
#define FCN_XM_RX_CFG_REG_MAC   0x04
#define FCN_XM_PASS_CRC_ERR_LBN   25
#define FCN_XM_PASS_CRC_ERR_WIDTH   1
#define FCN_XM_AUTO_DEPAD_LBN   8
#define FCN_XM_AUTO_DEPAD_WIDTH   1
#define FCN_XM_RXEN_LBN   1
#define FCN_XM_RXEN_WIDTH   1
#define FCN_XM_MGT_INT_MSK_REG_MAC_B0   0x5
#define FCN_XM_MSK_PRMBLE_ERR_LBN   2
#define FCN_XM_MSK_PRMBLE_ERR_WIDTH   1
#define FCN_XM_MSK_RMTFLT_LBN   1
#define FCN_XM_MSK_RMTFLT_WIDTH   1
#define FCN_XM_MSK_LCLFLT_LBN   0
#define FCN_XM_MSK_LCLFLT_WIDTH   1
#define FCN_XM_FC_REG_MAC   0x7
#define FCN_XM_PAUSE_TIME_LBN   16
#define FCN_XM_PAUSE_TIME_WIDTH   16
#define FCN_XM_DIS_FCNTL_LBN   0
#define FCN_XM_DIS_FCNTL_WIDTH   1
#define FCN_XM_TX_PARAM_REG_MAC   0x0d
#define FCN_XM_TX_JUMBO_MODE_LBN   31
#define FCN_XM_TX_JUMBO_MODE_WIDTH   1
#define FCN_XM_MAX_TX_FRM_SIZE_LBN   16
#define FCN_XM_MAX_TX_FRM_SIZE_WIDTH   14
#define FCN_XM_ACPT_ALL_MCAST_LBN   11
#define FCN_XM_ACPT_ALL_MCAST_WIDTH   1
#define FCN_XM_RX_PARAM_REG_MAC   0x0e
#define FCN_XM_MAX_RX_FRM_SIZE_LBN   0
#define FCN_XM_MAX_RX_FRM_SIZE_WIDTH   14
#define FCN_XM_MGT_INT_REG_MAC_B0   0x0f
#define FCN_XM_PRMBLE_ERR   2
#define FCN_XM_PRMBLE_WIDTH   1
#define FCN_XM_RMTFLT_LBN   1
#define FCN_XM_RMTFLT_WIDTH   1
#define FCN_XM_LCLFLT_LBN   0
#define FCN_XM_LCLFLT_WIDTH   1
#define FCN_XX_ALIGN_DONE_LBN   20
#define FCN_XX_ALIGN_DONE_WIDTH   1
#define FCN_XX_CORE_STAT_REG_MAC   0x16
#define FCN_XX_SYNC_STAT_LBN   16
#define FCN_XX_SYNC_STAT_WIDTH   4
#define FCN_XX_SYNC_STAT_DECODE_SYNCED   0xf
#define FCN_XX_COMMA_DET_LBN   12
#define FCN_XX_COMMA_DET_WIDTH   4
#define FCN_XX_COMMA_DET_RESET   0xf
#define FCN_XX_CHARERR_LBN   4
#define FCN_XX_CHARERR_WIDTH   4
#define FCN_XX_CHARERR_RESET   0xf
#define FCN_XX_DISPERR_LBN   0
#define FCN_XX_DISPERR_WIDTH   4
#define FCN_XX_DISPERR_RESET   0xf
#define FCN_XX_PWR_RST_REG_MAC   0x10
#define FCN_XX_PWRDND_EN_LBN   15
#define FCN_XX_PWRDND_EN_WIDTH   1
#define FCN_XX_PWRDNC_EN_LBN   14
#define FCN_XX_PWRDNC_EN_WIDTH   1
#define FCN_XX_PWRDNB_EN_LBN   13
#define FCN_XX_PWRDNB_EN_WIDTH   1
#define FCN_XX_PWRDNA_EN_LBN   12
#define FCN_XX_PWRDNA_EN_WIDTH   1
#define FCN_XX_RSTPLLCD_EN_LBN   9
#define FCN_XX_RSTPLLCD_EN_WIDTH   1
#define FCN_XX_RSTPLLAB_EN_LBN   8
#define FCN_XX_RSTPLLAB_EN_WIDTH   1
#define FCN_XX_RESETD_EN_LBN   7
#define FCN_XX_RESETD_EN_WIDTH   1
#define FCN_XX_RESETC_EN_LBN   6
#define FCN_XX_RESETC_EN_WIDTH   1
#define FCN_XX_RESETB_EN_LBN   5
#define FCN_XX_RESETB_EN_WIDTH   1
#define FCN_XX_RESETA_EN_LBN   4
#define FCN_XX_RESETA_EN_WIDTH   1
#define FCN_XX_RSTXGXSRX_EN_LBN   2
#define FCN_XX_RSTXGXSRX_EN_WIDTH   1
#define FCN_XX_RSTXGXSTX_EN_LBN   1
#define FCN_XX_RSTXGXSTX_EN_WIDTH   1
#define FCN_XX_RST_XX_EN_LBN   0
#define FCN_XX_RST_XX_EN_WIDTH   1
#define FCN_XX_SD_CTL_REG_MAC   0x11
#define FCN_XX_TERMADJ1_LBN   17
#define FCN_XX_TERMADJ1_WIDTH   1
#define FCN_XX_TERMADJ0_LBN   16
#define FCN_XX_TERMADJ0_WIDTH   1
#define FCN_XX_HIDRVD_LBN   15
#define FCN_XX_HIDRVD_WIDTH   1
#define FCN_XX_LODRVD_LBN   14
#define FCN_XX_LODRVD_WIDTH   1
#define FCN_XX_HIDRVC_LBN   13
#define FCN_XX_HIDRVC_WIDTH   1
#define FCN_XX_LODRVC_LBN   12
#define FCN_XX_LODRVC_WIDTH   1
#define FCN_XX_HIDRVB_LBN   11
#define FCN_XX_HIDRVB_WIDTH   1
#define FCN_XX_LODRVB_LBN   10
#define FCN_XX_LODRVB_WIDTH   1
#define FCN_XX_HIDRVA_LBN   9
#define FCN_XX_HIDRVA_WIDTH   1
#define FCN_XX_LODRVA_LBN   8
#define FCN_XX_LODRVA_WIDTH   1
#define FCN_XX_LPBKD_LBN   3
#define FCN_XX_LPBKD_WIDTH   1
#define FCN_XX_LPBKC_LBN   2
#define FCN_XX_LPBKC_WIDTH   1
#define FCN_XX_LPBKB_LBN   1
#define FCN_XX_LPBKB_WIDTH   1
#define FCN_XX_LPBKA_LBN   0
#define FCN_XX_LPBKA_WIDTH   1
#define FCN_XX_TXDRV_CTL_REG_MAC   0x12
#define FCN_XX_DEQD_LBN   28
#define FCN_XX_DEQD_WIDTH   4
#define FCN_XX_DEQC_LBN   24
#define FCN_XX_DEQC_WIDTH   4
#define FCN_XX_DEQB_LBN   20
#define FCN_XX_DEQB_WIDTH   4
#define FCN_XX_DEQA_LBN   16
#define FCN_XX_DEQA_WIDTH   4
#define FCN_XX_DTXD_LBN   12
#define FCN_XX_DTXD_WIDTH   4
#define FCN_XX_DTXC_LBN   8
#define FCN_XX_DTXC_WIDTH   4
#define FCN_XX_DTXB_LBN   4
#define FCN_XX_DTXB_WIDTH   4
#define FCN_XX_DTXA_LBN   0
#define FCN_XX_DTXA_WIDTH   4
#define FCN_RX_FILTER_TBL0   0xF00000
#define FCN_RX_DESC_PTR_TBL_KER_A1   0x11800
#define FCN_RX_DESC_PTR_TBL_KER_B0   0xF40000
#define FCN_RX_ISCSI_DDIG_EN_LBN   88
#define FCN_RX_ISCSI_DDIG_EN_WIDTH   1
#define FCN_RX_ISCSI_HDIG_EN_LBN   87
#define FCN_RX_ISCSI_HDIG_EN_WIDTH   1
#define FCN_RX_DESCQ_BUF_BASE_ID_LBN   36
#define FCN_RX_DESCQ_BUF_BASE_ID_WIDTH   20
#define FCN_RX_DESCQ_EVQ_ID_LBN   24
#define FCN_RX_DESCQ_EVQ_ID_WIDTH   12
#define FCN_RX_DESCQ_OWNER_ID_LBN   10
#define FCN_RX_DESCQ_OWNER_ID_WIDTH   14
#define FCN_RX_DESCQ_SIZE_LBN   3
#define FCN_RX_DESCQ_SIZE_WIDTH   2
#define FCN_RX_DESCQ_SIZE_4K   3
#define FCN_RX_DESCQ_SIZE_2K   2
#define FCN_RX_DESCQ_SIZE_1K   1
#define FCN_RX_DESCQ_SIZE_512   0
#define FCN_RX_DESCQ_TYPE_LBN   2
#define FCN_RX_DESCQ_TYPE_WIDTH   1
#define FCN_RX_DESCQ_JUMBO_LBN   1
#define FCN_RX_DESCQ_JUMBO_WIDTH   1
#define FCN_RX_DESCQ_EN_LBN   0
#define FCN_RX_DESCQ_EN_WIDTH   1
#define FCN_TX_DESC_PTR_TBL_KER_A1   0x11900
#define FCN_TX_DESC_PTR_TBL_KER_B0   0xF50000
#define FCN_TX_NON_IP_DROP_DIS_B0_LBN   91
#define FCN_TX_NON_IP_DROP_DIS_B0_WIDTH   1
#define FCN_TX_DESCQ_EN_LBN   88
#define FCN_TX_DESCQ_EN_WIDTH   1
#define FCN_TX_ISCSI_DDIG_EN_LBN   87
#define FCN_TX_ISCSI_DDIG_EN_WIDTH   1
#define FCN_TX_ISCSI_HDIG_EN_LBN   86
#define FCN_TX_ISCSI_HDIG_EN_WIDTH   1
#define FCN_TX_DESCQ_BUF_BASE_ID_LBN   36
#define FCN_TX_DESCQ_BUF_BASE_ID_WIDTH   20
#define FCN_TX_DESCQ_EVQ_ID_LBN   24
#define FCN_TX_DESCQ_EVQ_ID_WIDTH   12
#define FCN_TX_DESCQ_OWNER_ID_LBN   10
#define FCN_TX_DESCQ_OWNER_ID_WIDTH   14
#define FCN_TX_DESCQ_SIZE_LBN   3
#define FCN_TX_DESCQ_SIZE_WIDTH   2
#define FCN_TX_DESCQ_SIZE_4K   3
#define FCN_TX_DESCQ_SIZE_2K   2
#define FCN_TX_DESCQ_SIZE_1K   1
#define FCN_TX_DESCQ_SIZE_512   0
#define FCN_TX_DESCQ_TYPE_LBN   1
#define FCN_TX_DESCQ_TYPE_WIDTH   2
#define FCN_TX_DESCQ_FLUSH_LBN   0
#define FCN_TX_DESCQ_FLUSH_WIDTH   1
#define FCN_EVQ_PTR_TBL_KER_A1   0x11a00
#define FCN_EVQ_PTR_TBL_KER_B0   0xf60000
#define FCN_EVQ_EN_LBN   23
#define FCN_EVQ_EN_WIDTH   1
#define FCN_EVQ_SIZE_LBN   20
#define FCN_EVQ_SIZE_WIDTH   3
#define FCN_EVQ_SIZE_32K   6
#define FCN_EVQ_SIZE_16K   5
#define FCN_EVQ_SIZE_8K   4
#define FCN_EVQ_SIZE_4K   3
#define FCN_EVQ_SIZE_2K   2
#define FCN_EVQ_SIZE_1K   1
#define FCN_EVQ_SIZE_512   0
#define FCN_EVQ_BUF_BASE_ID_LBN   0
#define FCN_EVQ_BUF_BASE_ID_WIDTH   20
#define FCN_RX_RSS_INDIR_TBL_B0   0xFB0000
#define FCN_EVQ_RPTR_REG_KER_A1   0x11b00
#define FCN_EVQ_RPTR_REG_KER_B0   0xfa0000
#define FCN_EVQ_RPTR_LBN   0
#define FCN_EVQ_RPTR_WIDTH   14
#define FCN_EVQ_RPTR_REG_KER_DWORD_A1   ( FCN_EVQ_RPTR_REG_KER_A1 + 0 )
#define FCN_EVQ_RPTR_REG_KER_DWORD_B0   ( FCN_EVQ_RPTR_REG_KER_B0 + 0 )
#define FCN_EVQ_RPTR_DWORD_LBN   0
#define FCN_EVQ_RPTR_DWORD_WIDTH   14
#define FCN_BUF_FULL_TBL_KER_A1   0x18000
#define FCN_BUF_FULL_TBL_KER_B0   0x800000
#define FCN_IP_DAT_BUF_SIZE_LBN   50
#define FCN_IP_DAT_BUF_SIZE_WIDTH   1
#define FCN_IP_DAT_BUF_SIZE_8K   1
#define FCN_IP_DAT_BUF_SIZE_4K   0
#define FCN_BUF_ADR_FBUF_LBN   14
#define FCN_BUF_ADR_FBUF_WIDTH   34
#define FCN_BUF_OWNER_ID_FBUF_LBN   0
#define FCN_BUF_OWNER_ID_FBUF_WIDTH   14
#define FALCON_GMAC_REG(efab, mac_reg)
 Offset of a GMAC register within Falcon.
#define FALCON_XMAC_REG(efab_port, mac_reg)
 Offset of an XMAC register within Falcon.
#define FCN_MAC_DATA_LBN   0
#define FCN_MAC_DATA_WIDTH   32
#define FCN_TX_KER_PORT_LBN   63
#define FCN_TX_KER_PORT_WIDTH   1
#define FCN_TX_KER_BYTE_CNT_LBN   48
#define FCN_TX_KER_BYTE_CNT_WIDTH   14
#define FCN_TX_KER_BUF_ADR_LBN   0
#define FCN_TX_KER_BUF_ADR_WIDTH   EFAB_DMA_TYPE_WIDTH ( 46 )
#define FCN_RX_KER_BUF_SIZE_LBN   48
#define FCN_RX_KER_BUF_SIZE_WIDTH   14
#define FCN_RX_KER_BUF_ADR_LBN   0
#define FCN_RX_KER_BUF_ADR_WIDTH   EFAB_DMA_TYPE_WIDTH ( 46 )
#define FCN_EV_CODE_LBN   60
#define FCN_EV_CODE_WIDTH   4
#define FCN_RX_IP_EV_DECODE   0
#define FCN_TX_IP_EV_DECODE   2
#define FCN_DRIVER_EV_DECODE   5
#define FCN_RX_EV_PKT_OK_LBN   56
#define FCN_RX_EV_PKT_OK_WIDTH   1
#define FCN_RX_PORT_LBN   30
#define FCN_RX_PORT_WIDTH   1
#define FCN_RX_EV_BYTE_CNT_LBN   16
#define FCN_RX_EV_BYTE_CNT_WIDTH   14
#define FCN_RX_EV_DESC_PTR_LBN   0
#define FCN_RX_EV_DESC_PTR_WIDTH   12
#define FCN_TX_EV_DESC_PTR_LBN   0
#define FCN_TX_EV_DESC_PTR_WIDTH   12
#define FCN_REVISION_REG(efab, reg)
#define EFAB_SET_OWORD_FIELD_VER(efab, reg, field, val)
#define _falcon_writel(efab, value, reg)
#define _falcon_readl(efab, reg)
#define FCN_DUMP_REG(efab, _reg)
#define FCN_DUMP_MAC_REG(efab, _mac_reg)
#define FALCON_SPI_MAX_LEN   16
 Maximum length for a single SPI transaction.
#define GM_CFG1_REG_MAC   0x00
#define GM_SW_RST_LBN   31
#define GM_SW_RST_WIDTH   1
#define GM_RX_FC_EN_LBN   5
#define GM_RX_FC_EN_WIDTH   1
#define GM_TX_FC_EN_LBN   4
#define GM_TX_FC_EN_WIDTH   1
#define GM_RX_EN_LBN   2
#define GM_RX_EN_WIDTH   1
#define GM_TX_EN_LBN   0
#define GM_TX_EN_WIDTH   1
#define GM_CFG2_REG_MAC   0x01
#define GM_PAMBL_LEN_LBN   12
#define GM_PAMBL_LEN_WIDTH   4
#define GM_IF_MODE_LBN   8
#define GM_IF_MODE_WIDTH   2
#define GM_PAD_CRC_EN_LBN   2
#define GM_PAD_CRC_EN_WIDTH   1
#define GM_FD_LBN   0
#define GM_FD_WIDTH   1
#define GM_MAX_FLEN_REG_MAC   0x04
#define GM_MAX_FLEN_LBN   0
#define GM_MAX_FLEN_WIDTH   16
#define GM_MII_MGMT_CFG_REG_MAC   0x08
#define GM_MGMT_CLK_SEL_LBN   0
#define GM_MGMT_CLK_SEL_WIDTH   3
#define GM_MII_MGMT_CMD_REG_MAC   0x09
#define GM_MGMT_SCAN_CYC_LBN   1
#define GM_MGMT_SCAN_CYC_WIDTH   1
#define GM_MGMT_RD_CYC_LBN   0
#define GM_MGMT_RD_CYC_WIDTH   1
#define GM_MII_MGMT_ADR_REG_MAC   0x0a
#define GM_MGMT_PHY_ADDR_LBN   8
#define GM_MGMT_PHY_ADDR_WIDTH   5
#define GM_MGMT_REG_ADDR_LBN   0
#define GM_MGMT_REG_ADDR_WIDTH   5
#define GM_MII_MGMT_CTL_REG_MAC   0x0b
#define GM_MGMT_CTL_LBN   0
#define GM_MGMT_CTL_WIDTH   16
#define GM_MII_MGMT_STAT_REG_MAC   0x0c
#define GM_MGMT_STAT_LBN   0
#define GM_MGMT_STAT_WIDTH   16
#define GM_MII_MGMT_IND_REG_MAC   0x0d
#define GM_MGMT_BUSY_LBN   0
#define GM_MGMT_BUSY_WIDTH   1
#define GM_ADR1_REG_MAC   0x10
#define GM_HWADDR_5_LBN   24
#define GM_HWADDR_5_WIDTH   8
#define GM_HWADDR_4_LBN   16
#define GM_HWADDR_4_WIDTH   8
#define GM_HWADDR_3_LBN   8
#define GM_HWADDR_3_WIDTH   8
#define GM_HWADDR_2_LBN   0
#define GM_HWADDR_2_WIDTH   8
#define GM_ADR2_REG_MAC   0x11
#define GM_HWADDR_1_LBN   24
#define GM_HWADDR_1_WIDTH   8
#define GM_HWADDR_0_LBN   16
#define GM_HWADDR_0_WIDTH   8
#define GMF_CFG0_REG_MAC   0x12
#define GMF_FTFENREQ_LBN   12
#define GMF_FTFENREQ_WIDTH   1
#define GMF_STFENREQ_LBN   11
#define GMF_STFENREQ_WIDTH   1
#define GMF_FRFENREQ_LBN   10
#define GMF_FRFENREQ_WIDTH   1
#define GMF_SRFENREQ_LBN   9
#define GMF_SRFENREQ_WIDTH   1
#define GMF_WTMENREQ_LBN   8
#define GMF_WTMENREQ_WIDTH   1
#define GMF_CFG1_REG_MAC   0x13
#define GMF_CFGFRTH_LBN   16
#define GMF_CFGFRTH_WIDTH   5
#define GMF_CFGXOFFRTX_LBN   0
#define GMF_CFGXOFFRTX_WIDTH   16
#define GMF_CFG2_REG_MAC   0x14
#define GMF_CFGHWM_LBN   16
#define GMF_CFGHWM_WIDTH   6
#define GMF_CFGLWM_LBN   0
#define GMF_CFGLWM_WIDTH   6
#define GMF_CFG3_REG_MAC   0x15
#define GMF_CFGHWMFT_LBN   16
#define GMF_CFGHWMFT_WIDTH   6
#define GMF_CFGFTTH_LBN   0
#define GMF_CFGFTTH_WIDTH   6
#define GMF_CFG4_REG_MAC   0x16
#define GMF_HSTFLTRFRM_PAUSE_LBN   12
#define GMF_HSTFLTRFRM_PAUSE_WIDTH   12
#define GMF_CFG5_REG_MAC   0x17
#define GMF_CFGHDPLX_LBN   22
#define GMF_CFGHDPLX_WIDTH   1
#define GMF_CFGBYTMODE_LBN   19
#define GMF_CFGBYTMODE_WIDTH   1
#define GMF_HSTDRPLT64_LBN   18
#define GMF_HSTDRPLT64_WIDTH   1
#define GMF_HSTFLTRFRMDC_PAUSE_LBN   12
#define GMF_HSTFLTRFRMDC_PAUSE_WIDTH   1
#define XFP_REQUIRED_DEVS
#define TXC_GLRGS_GLCMD   (0xc004)
#define TXC_GLCMD_LMTSWRST_LBN   (14)
#define TXC_ALRGS_ATXAMP0   (0xc041)
#define TXC_ALRGS_ATXAMP1   (0xc042)
#define TXC_ATXAMP_LANE02_LBN   (3)
#define TXC_ATXAMP_LANE13_LBN   (11)
#define TXC_ATXAMP_1280_mV   (0)
#define TXC_ATXAMP_1200_mV   (8)
#define TXC_ATXAMP_1120_mV   (12)
#define TXC_ATXAMP_1060_mV   (14)
#define TXC_ATXAMP_0820_mV   (25)
#define TXC_ATXAMP_0720_mV   (26)
#define TXC_ATXAMP_0580_mV   (27)
#define TXC_ATXAMP_0440_mV   (28)
#define TXC_ATXAMP_0820_BOTH
#define TXC_ATXAMP_DEFAULT   (0x6060) /* From databook */
#define TXC_ALRGS_ATXPRE0   (0xc043)
#define TXC_ALRGS_ATXPRE1   (0xc044)
#define TXC_ATXPRE_NONE   (0)
#define TXC_ATXPRE_DEFAULT   (0x1010) /* From databook */
#define TXC_REQUIRED_DEVS
#define TENXPRESS_REQUIRED_DEVS
#define PCS_TEST_SELECT_REG   0xd807 /* PRM 10.5.8 */
#define CLK312_EN_LBN   3
#define CLK312_EN_WIDTH   1
#define PCS_CLOCK_CTRL_REG   0xd801
#define PLL312_RST_N_LBN   2
#define PMA_PMD_EXT_CTRL_REG   49152
#define PMA_PMD_EXT_SSR_LBN   15
#define PCS_BOOT_STATUS_REG   0xd000
#define PCS_BOOT_FATAL_ERR_LBN   0
#define PCS_BOOT_PROGRESS_LBN   1
#define PCS_BOOT_PROGRESS_WIDTH   2
#define PCS_BOOT_COMPLETE_LBN   3
#define PCS_SOFT_RST2_REG   0xd806
#define SERDES_RST_N_LBN   13
#define XGXS_RST_N_LBN   12
#define PM8358_REQUIRED_DEVS   (MDIO_MMDREG_DEVS0_DTEXS)
#define PMC_MASTER_REG   (0xd000)
#define PMC_MASTER_ANLG_CTRL   (1<< 11)
#define PMC_MCONF2_REG   (0xd002)
#define PMC_MCONF2_TEDGE   (1 << 2)
#define PMC_MCONF2_REDGE   (1 << 3)
#define PMC_ANALOG_RX_CFG0   (0xd025)
#define PMC_ANALOG_RX_CFG1   (0xd02d)
#define PMC_ANALOG_RX_CFG2   (0xd035)
#define PMC_ANALOG_RX_CFG3   (0xd03d)
#define PMC_ANALOG_RX_TERM
#define PMC_ANALOG_RX_EQ_MASK   (3 << 8)
#define PMC_ANALOG_RX_EQ_NONE   (0 << 8)
#define PMC_ANALOG_RX_EQ_HALF   (1 << 8)
#define PMC_ANALOG_RX_EQ_FULL   (2 << 8)
#define PMC_ANALOG_RX_EQ_RSVD   (3 << 8)
#define MAX_TEMP_THRESH   90
#define PCA9539   0x74
#define P0_IN   0x00
#define P0_OUT   0x02
#define P0_CONFIG   0x06
#define P0_EN_1V0X_LBN   0
#define P0_EN_1V0X_WIDTH   1
#define P0_EN_1V2_LBN   1
#define P0_EN_1V2_WIDTH   1
#define P0_EN_2V5_LBN   2
#define P0_EN_2V5_WIDTH   1
#define P0_EN_3V3X_LBN   3
#define P0_EN_3V3X_WIDTH   1
#define P0_EN_5V_LBN   4
#define P0_EN_5V_WIDTH   1
#define P0_X_TRST_LBN   6
#define P0_X_TRST_WIDTH   1
#define P1_IN   0x01
#define P1_CONFIG   0x07
#define P1_AFE_PWD_LBN   0
#define P1_AFE_PWD_WIDTH   1
#define P1_DSP_PWD25_LBN   1
#define P1_DSP_PWD25_WIDTH   1
#define P1_SPARE_LBN   4
#define P1_SPARE_WIDTH   4
#define MAX6647   0x4e
#define RSL   0x02
#define RLHN   0x05
#define WLHO   0x0b
#define FALCON_MAC_ADDRESS_OFFSET   0x310
 Offset of MAC address within EEPROM or Flash.
#define SF_NV_CONFIG_BASE   0x300
#define SF_NV_CONFIG_EXTRA   0xA0
#define BOARD_TYPE(_rev)

Functions

 FILE_LICENCE (GPL_ANY)
static void falcon_mdio_write (struct efab_nic *efab, int device, int location, int value)
static int falcon_mdio_read (struct efab_nic *efab, int device, int location)
static unsigned int gmii_autoneg_advertised (struct efab_nic *efab)
 Retrieve GMII autonegotiation advertised abilities.
static unsigned int gmii_autoneg_lpa (struct efab_nic *efab)
 Retrieve GMII autonegotiation link partner abilities.
static unsigned int gmii_nway_result (unsigned int negotiated)
 Calculate GMII autonegotiated link technology.
static int gmii_link_ok (struct efab_nic *efab)
 Check GMII PHY link status.
static int mdio_clause45_wait_reset_mmds (struct efab_nic *efab)
static int mdio_clause45_reset_mmd (struct efab_nic *efab, int mmd)
static int mdio_clause45_links_ok (struct efab_nic *efab)
static int mdio_clause45_check_mmds (struct efab_nic *efab)
static void falcon_write (struct efab_nic *efab, efab_oword_t *value, unsigned int reg)
 Write to a Falcon register.
static void falcon_write_sram (struct efab_nic *efab, efab_qword_t *value, unsigned int index)
 Write to Falcon SRAM.
static void falcon_writel (struct efab_nic *efab, efab_dword_t *value, unsigned int reg)
 Write dword to Falcon register that allows partial writes.
static void falcon_read (struct efab_nic *efab, efab_oword_t *value, unsigned int reg)
 Read from a Falcon register.
static void falcon_read_sram (struct efab_nic *efab, efab_qword_t *value, unsigned int index)
 Read from Falcon SRAM.
static void falcon_readl (struct efab_nic *efab, efab_dword_t *value, unsigned int reg)
 Read dword from a portion of a Falcon register.
static int falcon_event_present (falcon_event_t *event)
 See if an event is present.
static void falcon_eventq_read_ack (struct efab_nic *efab, struct efab_ev_queue *ev_queue)
static void falcon_interrupts (struct efab_nic *efab, int enabled, int force)
static int falcon_spi_wait (struct efab_nic *efab)
static int falcon_spi_rw (struct spi_bus *bus, struct spi_device *device, unsigned int command, int address, const void *data_out, void *data_in, size_t len)
static void falcon_i2c_bit_write (struct bit_basher *basher, unsigned int bit_id, unsigned long data)
static int falcon_i2c_bit_read (struct bit_basher *basher, unsigned int bit_id)
static int falcon_gmii_wait (struct efab_nic *efab)
static void falcon_reconfigure_mac_wrapper (struct efab_nic *efab)
static void falcon_gmac_writel (struct efab_nic *efab, efab_dword_t *value, unsigned int mac_reg)
static void falcon_gmac_readl (struct efab_nic *efab, efab_dword_t *value, unsigned int mac_reg)
static void mentormac_reset (struct efab_nic *efab)
static void mentormac_init (struct efab_nic *efab)
static int falcon_init_gmac (struct efab_nic *efab)
static void falcon_xmac_writel (struct efab_nic *efab, efab_dword_t *value, unsigned int mac_reg)
 Write dword to a Falcon XMAC register.
static void falcon_xmac_readl (struct efab_nic *efab, efab_dword_t *value, unsigned int mac_reg)
 Read dword from a Falcon XMAC register.
static void falcon_setup_xaui (struct efab_nic *efab)
 Configure Falcon XAUI output.
static int falcon_xgmii_status (struct efab_nic *efab)
static void falcon_mask_status_intr (struct efab_nic *efab, int enable)
static int falcon_reset_xmac (struct efab_nic *efab)
 Reset 10G MAC connected to port.
static int falcon_reset_xaui (struct efab_nic *efab)
static int falcon_xaui_link_ok (struct efab_nic *efab)
static void falcon_reconfigure_xmac (struct efab_nic *efab)
 Initialise XMAC.
static int falcon_init_xmac (struct efab_nic *efab)
static int falcon_xaui_phy_init (struct efab_nic *efab)
static int alaska_init (struct efab_nic *efab)
 Initialise Alaska PHY.
static int falcon_xfp_phy_init (struct efab_nic *efab)
static int falcon_txc_logic_reset (struct efab_nic *efab)
static int falcon_txc_phy_init (struct efab_nic *efab)
static int falcon_tenxpress_check_c11 (struct efab_nic *efab)
static int falcon_tenxpress_phy_init (struct efab_nic *efab)
static int falcon_pm8358_phy_init (struct efab_nic *efab)
static int sfe4001_init (struct efab_nic *efab)
static void sfe4001_fini (struct efab_nic *efab)
static int sfe4002_init (struct efab_nic *efab)
static void sfe4002_fini (struct efab_nic *efab)
static int sfe4003_init (struct efab_nic *efab)
static void sfe4003_fini (struct efab_nic *efab)
static void falcon_free_special_buffer (void *p)
static void * falcon_alloc_special_buffer (struct efab_nic *efab, int bytes, struct efab_special_buffer *entry)
static void clear_b0_fpga_memories (struct efab_nic *efab)
static int falcon_reset (struct efab_nic *efab)
static void falcon_probe_nic_variant (struct efab_nic *efab, struct pci_device *pci)
static void falcon_init_spi_device (struct efab_nic *efab, struct spi_device *spi)
static int falcon_probe_spi (struct efab_nic *efab)
static int falcon_probe_nvram (struct efab_nic *efab)
static int falcon_init_sram (struct efab_nic *efab)
static void falcon_setup_nic (struct efab_nic *efab)
static void falcon_init_resources (struct efab_nic *efab)
static void falcon_fini_resources (struct efab_nic *efab)
static void falcon_build_rx_desc (falcon_rx_desc_t *rxd, struct io_buffer *iob)
static void falcon_notify_rx_desc (struct efab_nic *efab, struct efab_rx_queue *rx_queue)
static void falcon_build_tx_desc (falcon_tx_desc_t *txd, struct io_buffer *iob)
static void falcon_notify_tx_desc (struct efab_nic *efab, struct efab_tx_queue *tx_queue)
static int efab_fill_rx_queue (struct efab_nic *efab, struct efab_rx_queue *rx_queue)
static void efab_receive (struct efab_nic *efab, unsigned int id, int len, int drop)
static int efab_transmit (struct net_device *netdev, struct io_buffer *iob)
static int efab_transmit_done (struct efab_nic *efab, int id)
static void falcon_clear_interrupts (struct efab_nic *efab)
static void falcon_handle_event (struct efab_nic *efab, falcon_event_t *evt)
static void efab_poll (struct net_device *netdev)
static void efab_irq (struct net_device *netdev, int enable)
static void efab_free_resources (struct efab_nic *efab)
static int efab_alloc_resources (struct efab_nic *efab)
static int efab_init_mac (struct efab_nic *efab)
static void efab_close (struct net_device *netdev)
static int efab_open (struct net_device *netdev)
static void efab_remove (struct pci_device *pci)
static int efab_probe (struct pci_device *pci)

Variables

int __invalid_queue_size
static struct bit_basher_operations falcon_i2c_bit_ops
static struct efab_mac_operations falcon_gmac_operations
static struct efab_mac_operations falcon_xmac_operations
static struct efab_phy_operations falcon_xaui_phy_ops
static struct efab_phy_operations falcon_alaska_phy_ops
static struct efab_phy_operations falcon_xfp_phy_ops
static struct efab_phy_operations falcon_txc_phy_ops
static struct efab_phy_operations falcon_tenxpress_phy_ops
static struct efab_phy_operations falcon_pm8358_phy_ops
static struct i2c_device i2c_pca9539
static struct i2c_device i2c_max6647
struct efab_board_operations sfe4001_ops
struct efab_board_operations sfe4002_ops
struct efab_board_operations sfe4003_ops
static struct net_device_operations efab_operations
static struct pci_device_id efab_nics []
struct pci_driver etherfabric_driver __pci_driver

Macro Definition Documentation

◆ EFAB_REGDUMP

#define EFAB_REGDUMP ( ...)

◆ EFAB_TRACE

◆ EFAB_LOG

#define EFAB_LOG ( ...)
Value:
DBG(__VA_ARGS__)
#define DBG(...)
Print a debugging message.
Definition compiler.h:498

Definition at line 51 of file etherfabric.c.

Referenced by efab_init_mac(), efab_probe(), falcon_probe_spi(), falcon_xaui_link_ok(), and sfe4001_init().

◆ EFAB_ERR

◆ FALCON_USE_IO_BAR

#define FALCON_USE_IO_BAR   0

Definition at line 54 of file etherfabric.c.

◆ HZ

#define HZ   100

Definition at line 56 of file etherfabric.c.

◆ EFAB_BYTE

#define EFAB_BYTE   1

Definition at line 57 of file etherfabric.c.

Referenced by sfe4001_fini(), and sfe4001_init().

◆ FQS

#define FQS ( _prefix,
_x )
Value:
( ( (_x) == 512 ) ? _prefix ## _SIZE_512 : \
( ( (_x) == 1024 ) ? _prefix ## _SIZE_1K : \
( ( (_x) == 2048 ) ? _prefix ## _SIZE_2K : \
( ( (_x) == 4096) ? _prefix ## _SIZE_4K : \
int __invalid_queue_size
char _prefix[]
Start address of the iPXE image.

Definition at line 66 of file etherfabric.c.

66#define FQS(_prefix, _x) \
67 ( ( (_x) == 512 ) ? _prefix ## _SIZE_512 : \
68 ( ( (_x) == 1024 ) ? _prefix ## _SIZE_1K : \
69 ( ( (_x) == 2048 ) ? _prefix ## _SIZE_2K : \
70 ( ( (_x) == 4096) ? _prefix ## _SIZE_4K : \
71 __invalid_queue_size ) ) ) )

Referenced by falcon_init_resources().

◆ EFAB_MAX_FRAME_LEN

#define EFAB_MAX_FRAME_LEN ( mtu)
Value:
( ( ( ( mtu ) + 4/* FCS */ ) + 7 ) & ~7 )
uint32_t mtu
Maximum MTU.
Definition ena.h:17

Definition at line 74 of file etherfabric.c.

74#define EFAB_MAX_FRAME_LEN(mtu) \
75 ( ( ( ( mtu ) + 4/* FCS */ ) + 7 ) & ~7 )

Referenced by falcon_reconfigure_xmac(), and mentormac_init().

◆ GMII_PSSR

#define GMII_PSSR   0x11 /* PHY-specific status register */

Definition at line 89 of file etherfabric.c.

Referenced by gmii_link_ok().

◆ LPA_EF_1000FULL

#define LPA_EF_1000FULL   0x00020000

Definition at line 92 of file etherfabric.c.

Referenced by gmii_nway_result().

◆ LPA_EF_1000HALF

#define LPA_EF_1000HALF   0x00010000

Definition at line 93 of file etherfabric.c.

Referenced by gmii_nway_result().

◆ LPA_EF_10000FULL

#define LPA_EF_10000FULL   0x00040000

◆ LPA_EF_10000HALF

#define LPA_EF_10000HALF   0x00080000

Definition at line 95 of file etherfabric.c.

◆ LPA_EF_1000

#define LPA_EF_1000   ( LPA_EF_1000FULL | LPA_EF_1000HALF )

Definition at line 97 of file etherfabric.c.

Referenced by efab_init_mac(), falcon_reconfigure_mac_wrapper(), and mentormac_init().

◆ LPA_EF_10000

#define LPA_EF_10000   ( LPA_EF_10000FULL | LPA_EF_10000HALF )

Definition at line 98 of file etherfabric.c.

Referenced by efab_init_mac(), and falcon_reconfigure_mac_wrapper().

◆ LPA_EF_DUPLEX

#define LPA_EF_DUPLEX
Value:
#define LPA_EF_1000FULL
Definition etherfabric.c:92
#define LPA_EF_10000FULL
Definition etherfabric.c:94
#define LPA_10FULL
Definition mii.h:100
#define LPA_100FULL
Definition mii.h:104

Definition at line 99 of file etherfabric.c.

99#define LPA_EF_DUPLEX ( LPA_10FULL | LPA_100FULL | LPA_EF_1000FULL | \
100 LPA_EF_10000FULL )

Referenced by efab_init_mac(), and mentormac_init().

◆ LPA_OTHER

#define LPA_OTHER
Value:
#define LPA_EF_1000HALF
Definition etherfabric.c:93
#define LPA_100HALF
Definition mii.h:102
#define LPA_10HALF
Definition mii.h:98

Definition at line 103 of file etherfabric.c.

103#define LPA_OTHER ~( LPA_10FULL | LPA_10HALF | LPA_100FULL | \
104 LPA_100HALF | LPA_EF_1000FULL | LPA_EF_1000HALF )

Referenced by gmii_nway_result().

◆ PSSR_LSTATUS

#define PSSR_LSTATUS   0x0400 /* Bit 10 - link status */

Definition at line 107 of file etherfabric.c.

Referenced by gmii_link_ok().

◆ MDIO_MMD_PMAPMD

#define MDIO_MMD_PMAPMD   (1)

Definition at line 204 of file etherfabric.c.

Referenced by falcon_txc_phy_init().

◆ MDIO_MMD_WIS

#define MDIO_MMD_WIS   (2)

Definition at line 206 of file etherfabric.c.

◆ MDIO_MMD_PCS

#define MDIO_MMD_PCS   (3)

◆ MDIO_MMD_PHYXS

#define MDIO_MMD_PHYXS   (4)

◆ MDIO_MMD_DTEXS

#define MDIO_MMD_DTEXS   (5)

Definition at line 212 of file etherfabric.c.

Referenced by falcon_pm8358_phy_init().

◆ MDIO_MMD_TC

#define MDIO_MMD_TC   (6)

Definition at line 214 of file etherfabric.c.

◆ MDIO_MMD_AN

#define MDIO_MMD_AN   (7)

Definition at line 216 of file etherfabric.c.

◆ MDIO_MMDREG_CTRL1

#define MDIO_MMDREG_CTRL1   (0)

Definition at line 219 of file etherfabric.c.

Referenced by mdio_clause45_reset_mmd(), and mdio_clause45_wait_reset_mmds().

◆ MDIO_MMDREG_STAT1

#define MDIO_MMDREG_STAT1   (1)

Definition at line 220 of file etherfabric.c.

Referenced by mdio_clause45_links_ok().

◆ MDIO_MMDREG_DEVS0

#define MDIO_MMDREG_DEVS0   (5)

Definition at line 221 of file etherfabric.c.

Referenced by mdio_clause45_check_mmds().

◆ MDIO_MMDREG_STAT2

#define MDIO_MMDREG_STAT2   (8)

Definition at line 222 of file etherfabric.c.

Referenced by mdio_clause45_check_mmds().

◆ MDIO_MMDREG_CTRL1_RESET_LBN

#define MDIO_MMDREG_CTRL1_RESET_LBN   (15)

Definition at line 226 of file etherfabric.c.

Referenced by mdio_clause45_reset_mmd(), and mdio_clause45_wait_reset_mmds().

◆ MDIO_MMDREG_CTRL1_RESET_WIDTH

#define MDIO_MMDREG_CTRL1_RESET_WIDTH   (1)

Definition at line 227 of file etherfabric.c.

◆ MDIO_MMDREG_STAT1_FAULT_LBN

#define MDIO_MMDREG_STAT1_FAULT_LBN   (7)

Definition at line 230 of file etherfabric.c.

◆ MDIO_MMDREG_STAT1_FAULT_WIDTH

#define MDIO_MMDREG_STAT1_FAULT_WIDTH   (1)

Definition at line 231 of file etherfabric.c.

◆ MDIO_MMDREG_STAT1_LINK_LBN

#define MDIO_MMDREG_STAT1_LINK_LBN   (2)

Definition at line 234 of file etherfabric.c.

Referenced by mdio_clause45_links_ok().

◆ MDIO_MMDREG_STAT1_LINK_WIDTH

#define MDIO_MMDREG_STAT1_LINK_WIDTH   (1)

Definition at line 235 of file etherfabric.c.

◆ DEV_PRESENT_BIT

#define DEV_PRESENT_BIT ( _b)
Value:
(1 << _b)

Definition at line 238 of file etherfabric.c.

◆ MDIO_MMDREG_DEVS0_DTEXS

#define MDIO_MMDREG_DEVS0_DTEXS   DEV_PRESENT_BIT(MDIO_MMD_DTEXS)

Definition at line 240 of file etherfabric.c.

Referenced by falcon_pm8358_phy_init().

◆ MDIO_MMDREG_DEVS0_PHYXS

#define MDIO_MMDREG_DEVS0_PHYXS   DEV_PRESENT_BIT(MDIO_MMD_PHYXS)

Definition at line 241 of file etherfabric.c.

◆ MDIO_MMDREG_DEVS0_PCS

#define MDIO_MMDREG_DEVS0_PCS   DEV_PRESENT_BIT(MDIO_MMD_PCS)

Definition at line 242 of file etherfabric.c.

◆ MDIO_MMDREG_DEVS0_WIS

#define MDIO_MMDREG_DEVS0_WIS   DEV_PRESENT_BIT(MDIO_MMD_WIS)

Definition at line 243 of file etherfabric.c.

◆ MDIO_MMDREG_DEVS0_PMAPMD

#define MDIO_MMDREG_DEVS0_PMAPMD   DEV_PRESENT_BIT(MDIO_MMD_PMAPMD)

Definition at line 244 of file etherfabric.c.

◆ MDIO_MMDREG_DEVS0_AN

#define MDIO_MMDREG_DEVS0_AN   DEV_PRESENT_BIT(MDIO_MMD_AN)

Definition at line 246 of file etherfabric.c.

◆ MDIO_MMDREG_STAT2_PRESENT_VAL

#define MDIO_MMDREG_STAT2_PRESENT_VAL   (2)

Definition at line 249 of file etherfabric.c.

Referenced by mdio_clause45_check_mmds().

◆ MDIO_MMDREG_STAT2_PRESENT_LBN

#define MDIO_MMDREG_STAT2_PRESENT_LBN   (14)

Definition at line 250 of file etherfabric.c.

◆ MDIO_MMDREG_STAT2_PRESENT_WIDTH

#define MDIO_MMDREG_STAT2_PRESENT_WIDTH   (2)

Definition at line 251 of file etherfabric.c.

◆ MDIO_PHYXS_LANE_STATE

#define MDIO_PHYXS_LANE_STATE   (0x18)

Definition at line 254 of file etherfabric.c.

Referenced by falcon_xaui_link_ok().

◆ MDIO_PHYXS_LANE_ALIGNED_LBN

#define MDIO_PHYXS_LANE_ALIGNED_LBN   (12)

Definition at line 255 of file etherfabric.c.

Referenced by falcon_xaui_link_ok().

◆ MDIO_PHYXS_LANE_SYNC0_LBN

#define MDIO_PHYXS_LANE_SYNC0_LBN   (0)

Definition at line 256 of file etherfabric.c.

◆ MDIO_PHYXS_LANE_SYNC1_LBN

#define MDIO_PHYXS_LANE_SYNC1_LBN   (1)

Definition at line 257 of file etherfabric.c.

◆ MDIO_PHYXS_LANE_SYNC2_LBN

#define MDIO_PHYXS_LANE_SYNC2_LBN   (2)

Definition at line 258 of file etherfabric.c.

◆ MDIO_PHYXS_LANE_SYNC3_LBN

#define MDIO_PHYXS_LANE_SYNC3_LBN   (3)

Definition at line 259 of file etherfabric.c.

◆ MDIO45_RESET_TRIES

#define MDIO45_RESET_TRIES   100

Definition at line 262 of file etherfabric.c.

Referenced by mdio_clause45_reset_mmd(), and mdio_clause45_wait_reset_mmds().

◆ MDIO45_RESET_SPINTIME

#define MDIO45_RESET_SPINTIME   10

Definition at line 263 of file etherfabric.c.

Referenced by mdio_clause45_reset_mmd(), and mdio_clause45_wait_reset_mmds().

◆ FCN_IOM_IND_ADR_REG

#define FCN_IOM_IND_ADR_REG   0x0

Definition at line 395 of file etherfabric.c.

◆ FCN_IOM_IND_DAT_REG

#define FCN_IOM_IND_DAT_REG   0x4

Definition at line 398 of file etherfabric.c.

◆ FCN_ADR_REGION_REG_KER

#define FCN_ADR_REGION_REG_KER   0x00

Definition at line 401 of file etherfabric.c.

Referenced by clear_b0_fpga_memories().

◆ FCN_ADR_REGION0_LBN

#define FCN_ADR_REGION0_LBN   0

Definition at line 402 of file etherfabric.c.

◆ FCN_ADR_REGION0_WIDTH

#define FCN_ADR_REGION0_WIDTH   18

Definition at line 403 of file etherfabric.c.

◆ FCN_ADR_REGION1_LBN

#define FCN_ADR_REGION1_LBN   32

Definition at line 404 of file etherfabric.c.

◆ FCN_ADR_REGION1_WIDTH

#define FCN_ADR_REGION1_WIDTH   18

Definition at line 405 of file etherfabric.c.

◆ FCN_ADR_REGION2_LBN

#define FCN_ADR_REGION2_LBN   64

Definition at line 406 of file etherfabric.c.

◆ FCN_ADR_REGION2_WIDTH

#define FCN_ADR_REGION2_WIDTH   18

Definition at line 407 of file etherfabric.c.

◆ FCN_ADR_REGION3_LBN

#define FCN_ADR_REGION3_LBN   96

Definition at line 408 of file etherfabric.c.

◆ FCN_ADR_REGION3_WIDTH

#define FCN_ADR_REGION3_WIDTH   18

Definition at line 409 of file etherfabric.c.

◆ FCN_INT_EN_REG_KER

#define FCN_INT_EN_REG_KER   0x0010

Definition at line 412 of file etherfabric.c.

Referenced by falcon_interrupts().

◆ FCN_MEM_PERR_INT_EN_KER_LBN

#define FCN_MEM_PERR_INT_EN_KER_LBN   5

Definition at line 413 of file etherfabric.c.

◆ FCN_MEM_PERR_INT_EN_KER_WIDTH

#define FCN_MEM_PERR_INT_EN_KER_WIDTH   1

Definition at line 414 of file etherfabric.c.

◆ FCN_KER_INT_CHAR_LBN

#define FCN_KER_INT_CHAR_LBN   4

Definition at line 415 of file etherfabric.c.

◆ FCN_KER_INT_CHAR_WIDTH

#define FCN_KER_INT_CHAR_WIDTH   1

Definition at line 416 of file etherfabric.c.

◆ FCN_KER_INT_KER_LBN

#define FCN_KER_INT_KER_LBN   3

Definition at line 417 of file etherfabric.c.

◆ FCN_KER_INT_KER_WIDTH

#define FCN_KER_INT_KER_WIDTH   1

Definition at line 418 of file etherfabric.c.

◆ FCN_ILL_ADR_ERR_INT_EN_KER_LBN

#define FCN_ILL_ADR_ERR_INT_EN_KER_LBN   2

Definition at line 419 of file etherfabric.c.

◆ FCN_ILL_ADR_ERR_INT_EN_KER_WIDTH

#define FCN_ILL_ADR_ERR_INT_EN_KER_WIDTH   1

Definition at line 420 of file etherfabric.c.

◆ FCN_SRM_PERR_INT_EN_KER_LBN

#define FCN_SRM_PERR_INT_EN_KER_LBN   1

Definition at line 421 of file etherfabric.c.

◆ FCN_SRM_PERR_INT_EN_KER_WIDTH

#define FCN_SRM_PERR_INT_EN_KER_WIDTH   1

Definition at line 422 of file etherfabric.c.

◆ FCN_DRV_INT_EN_KER_LBN

#define FCN_DRV_INT_EN_KER_LBN   0

Definition at line 423 of file etherfabric.c.

◆ FCN_DRV_INT_EN_KER_WIDTH

#define FCN_DRV_INT_EN_KER_WIDTH   1

Definition at line 424 of file etherfabric.c.

◆ FCN_INT_ADR_REG_KER

#define FCN_INT_ADR_REG_KER   0x0030

Definition at line 427 of file etherfabric.c.

Referenced by falcon_init_resources().

◆ FCN_INT_ADR_KER_LBN

#define FCN_INT_ADR_KER_LBN   0

Definition at line 428 of file etherfabric.c.

◆ FCN_INT_ADR_KER_WIDTH

#define FCN_INT_ADR_KER_WIDTH   EFAB_DMA_TYPE_WIDTH ( 64 )

Definition at line 429 of file etherfabric.c.

◆ INT_ISR0_B0

#define INT_ISR0_B0   0x90

Definition at line 432 of file etherfabric.c.

Referenced by falcon_clear_interrupts().

◆ INT_ISR1_B0

#define INT_ISR1_B0   0xA0

Definition at line 433 of file etherfabric.c.

◆ FCN_INT_ACK_KER_REG_A1

#define FCN_INT_ACK_KER_REG_A1   0x0050

Definition at line 436 of file etherfabric.c.

Referenced by falcon_clear_interrupts().

◆ INT_ACK_DUMMY_DATA_LBN

#define INT_ACK_DUMMY_DATA_LBN   0

Definition at line 437 of file etherfabric.c.

◆ INT_ACK_DUMMY_DATA_WIDTH

#define INT_ACK_DUMMY_DATA_WIDTH   32

Definition at line 438 of file etherfabric.c.

◆ WORK_AROUND_BROKEN_PCI_READS_REG_KER_A1

#define WORK_AROUND_BROKEN_PCI_READS_REG_KER_A1   0x0070

Definition at line 441 of file etherfabric.c.

Referenced by falcon_clear_interrupts().

◆ FCN_HW_INIT_REG_KER

#define FCN_HW_INIT_REG_KER   0x00c0

Definition at line 444 of file etherfabric.c.

◆ FCN_BCSR_TARGET_MASK_LBN

#define FCN_BCSR_TARGET_MASK_LBN   101

Definition at line 445 of file etherfabric.c.

◆ FCN_BCSR_TARGET_MASK_WIDTH

#define FCN_BCSR_TARGET_MASK_WIDTH   4

Definition at line 446 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_REG

#define FCN_EE_SPI_HCMD_REG   0x0100

Definition at line 449 of file etherfabric.c.

Referenced by falcon_spi_rw(), and falcon_spi_wait().

◆ FCN_EE_SPI_HCMD_CMD_EN_LBN

#define FCN_EE_SPI_HCMD_CMD_EN_LBN   31

Definition at line 450 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_CMD_EN_WIDTH

#define FCN_EE_SPI_HCMD_CMD_EN_WIDTH   1

Definition at line 451 of file etherfabric.c.

◆ FCN_EE_WR_TIMER_ACTIVE_LBN

#define FCN_EE_WR_TIMER_ACTIVE_LBN   28

Definition at line 452 of file etherfabric.c.

◆ FCN_EE_WR_TIMER_ACTIVE_WIDTH

#define FCN_EE_WR_TIMER_ACTIVE_WIDTH   1

Definition at line 453 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_SF_SEL_LBN

#define FCN_EE_SPI_HCMD_SF_SEL_LBN   24

Definition at line 454 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_SF_SEL_WIDTH

#define FCN_EE_SPI_HCMD_SF_SEL_WIDTH   1

Definition at line 455 of file etherfabric.c.

◆ FCN_EE_SPI_EEPROM

#define FCN_EE_SPI_EEPROM   0

Definition at line 456 of file etherfabric.c.

Referenced by falcon_spi_rw().

◆ FCN_EE_SPI_FLASH

#define FCN_EE_SPI_FLASH   1

Definition at line 457 of file etherfabric.c.

Referenced by falcon_spi_rw().

◆ FCN_EE_SPI_HCMD_DABCNT_LBN

#define FCN_EE_SPI_HCMD_DABCNT_LBN   16

Definition at line 458 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_DABCNT_WIDTH

#define FCN_EE_SPI_HCMD_DABCNT_WIDTH   5

Definition at line 459 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_READ_LBN

#define FCN_EE_SPI_HCMD_READ_LBN   15

Definition at line 460 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_READ_WIDTH

#define FCN_EE_SPI_HCMD_READ_WIDTH   1

Definition at line 461 of file etherfabric.c.

◆ FCN_EE_SPI_READ

#define FCN_EE_SPI_READ   1

Definition at line 462 of file etherfabric.c.

Referenced by falcon_spi_rw().

◆ FCN_EE_SPI_WRITE

#define FCN_EE_SPI_WRITE   0

Definition at line 463 of file etherfabric.c.

Referenced by falcon_spi_rw().

◆ FCN_EE_SPI_HCMD_DUBCNT_LBN

#define FCN_EE_SPI_HCMD_DUBCNT_LBN   12

Definition at line 464 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_DUBCNT_WIDTH

#define FCN_EE_SPI_HCMD_DUBCNT_WIDTH   2

Definition at line 465 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_ADBCNT_LBN

#define FCN_EE_SPI_HCMD_ADBCNT_LBN   8

Definition at line 466 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_ADBCNT_WIDTH

#define FCN_EE_SPI_HCMD_ADBCNT_WIDTH   2

Definition at line 467 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_ENC_LBN

#define FCN_EE_SPI_HCMD_ENC_LBN   0

Definition at line 468 of file etherfabric.c.

◆ FCN_EE_SPI_HCMD_ENC_WIDTH

#define FCN_EE_SPI_HCMD_ENC_WIDTH   8

Definition at line 469 of file etherfabric.c.

◆ FCN_EE_SPI_HADR_REG

#define FCN_EE_SPI_HADR_REG   0x0110

Definition at line 472 of file etherfabric.c.

Referenced by falcon_spi_rw().

◆ FCN_EE_SPI_HADR_DUBYTE_LBN

#define FCN_EE_SPI_HADR_DUBYTE_LBN   24

Definition at line 473 of file etherfabric.c.

◆ FCN_EE_SPI_HADR_DUBYTE_WIDTH

#define FCN_EE_SPI_HADR_DUBYTE_WIDTH   8

Definition at line 474 of file etherfabric.c.

◆ FCN_EE_SPI_HADR_ADR_LBN

#define FCN_EE_SPI_HADR_ADR_LBN   0

Definition at line 475 of file etherfabric.c.

◆ FCN_EE_SPI_HADR_ADR_WIDTH

#define FCN_EE_SPI_HADR_ADR_WIDTH   24

Definition at line 476 of file etherfabric.c.

◆ FCN_EE_SPI_HDATA_REG

#define FCN_EE_SPI_HDATA_REG   0x0120

Definition at line 479 of file etherfabric.c.

Referenced by falcon_spi_rw().

◆ FCN_EE_SPI_HDATA3_LBN

#define FCN_EE_SPI_HDATA3_LBN   96

Definition at line 480 of file etherfabric.c.

◆ FCN_EE_SPI_HDATA3_WIDTH

#define FCN_EE_SPI_HDATA3_WIDTH   32

Definition at line 481 of file etherfabric.c.

◆ FCN_EE_SPI_HDATA2_LBN

#define FCN_EE_SPI_HDATA2_LBN   64

Definition at line 482 of file etherfabric.c.

◆ FCN_EE_SPI_HDATA2_WIDTH

#define FCN_EE_SPI_HDATA2_WIDTH   32

Definition at line 483 of file etherfabric.c.

◆ FCN_EE_SPI_HDATA1_LBN

#define FCN_EE_SPI_HDATA1_LBN   32

Definition at line 484 of file etherfabric.c.

◆ FCN_EE_SPI_HDATA1_WIDTH

#define FCN_EE_SPI_HDATA1_WIDTH   32

Definition at line 485 of file etherfabric.c.

◆ FCN_EE_SPI_HDATA0_LBN

#define FCN_EE_SPI_HDATA0_LBN   0

Definition at line 486 of file etherfabric.c.

◆ FCN_EE_SPI_HDATA0_WIDTH

#define FCN_EE_SPI_HDATA0_WIDTH   32

Definition at line 487 of file etherfabric.c.

◆ FCN_EE_VPD_CFG_REG

#define FCN_EE_VPD_CFG_REG   0x0140

Definition at line 490 of file etherfabric.c.

Referenced by falcon_probe_spi().

◆ FCN_EE_VPD_EN_LBN

#define FCN_EE_VPD_EN_LBN   0

Definition at line 491 of file etherfabric.c.

◆ FCN_EE_VPD_EN_WIDTH

#define FCN_EE_VPD_EN_WIDTH   1

Definition at line 492 of file etherfabric.c.

◆ FCN_EE_VPD_EN_AD9_MODE_LBN

#define FCN_EE_VPD_EN_AD9_MODE_LBN   1

Definition at line 493 of file etherfabric.c.

◆ FCN_EE_VPD_EN_AD9_MODE_WIDTH

#define FCN_EE_VPD_EN_AD9_MODE_WIDTH   1

Definition at line 494 of file etherfabric.c.

◆ FCN_EE_EE_CLOCK_DIV_LBN

#define FCN_EE_EE_CLOCK_DIV_LBN   112

Definition at line 495 of file etherfabric.c.

◆ FCN_EE_EE_CLOCK_DIV_WIDTH

#define FCN_EE_EE_CLOCK_DIV_WIDTH   7

Definition at line 496 of file etherfabric.c.

◆ FCN_EE_SF_CLOCK_DIV_LBN

#define FCN_EE_SF_CLOCK_DIV_LBN   120

Definition at line 497 of file etherfabric.c.

◆ FCN_EE_SF_CLOCK_DIV_WIDTH

#define FCN_EE_SF_CLOCK_DIV_WIDTH   7

Definition at line 498 of file etherfabric.c.

◆ FCN_NIC_STAT_REG

#define FCN_NIC_STAT_REG   0x0200

Definition at line 502 of file etherfabric.c.

Referenced by falcon_init_sram(), falcon_probe_nic_variant(), and falcon_probe_spi().

◆ FCN_ONCHIP_SRAM_LBN

#define FCN_ONCHIP_SRAM_LBN   16

Definition at line 503 of file etherfabric.c.

◆ FCN_ONCHIP_SRAM_WIDTH

#define FCN_ONCHIP_SRAM_WIDTH   1

Definition at line 504 of file etherfabric.c.

◆ FCN_SF_PRST_LBN

#define FCN_SF_PRST_LBN   9

Definition at line 505 of file etherfabric.c.

◆ FCN_SF_PRST_WIDTH

#define FCN_SF_PRST_WIDTH   1

Definition at line 506 of file etherfabric.c.

◆ FCN_EE_PRST_LBN

#define FCN_EE_PRST_LBN   8

Definition at line 507 of file etherfabric.c.

◆ FCN_EE_PRST_WIDTH

#define FCN_EE_PRST_WIDTH   1

Definition at line 508 of file etherfabric.c.

◆ FCN_EE_STRAP_LBN

#define FCN_EE_STRAP_LBN   7

Definition at line 509 of file etherfabric.c.

◆ FCN_EE_STRAP_WIDTH

#define FCN_EE_STRAP_WIDTH   1

Definition at line 510 of file etherfabric.c.

◆ FCN_PCI_PCIX_MODE_LBN

#define FCN_PCI_PCIX_MODE_LBN   4

Definition at line 511 of file etherfabric.c.

◆ FCN_PCI_PCIX_MODE_WIDTH

#define FCN_PCI_PCIX_MODE_WIDTH   3

Definition at line 512 of file etherfabric.c.

◆ FCN_PCI_PCIX_MODE_PCI33_DECODE

#define FCN_PCI_PCIX_MODE_PCI33_DECODE   0

Definition at line 513 of file etherfabric.c.

◆ FCN_PCI_PCIX_MODE_PCI66_DECODE

#define FCN_PCI_PCIX_MODE_PCI66_DECODE   1

Definition at line 514 of file etherfabric.c.

◆ FCN_PCI_PCIX_MODE_PCIX66_DECODE

#define FCN_PCI_PCIX_MODE_PCIX66_DECODE   5

Definition at line 515 of file etherfabric.c.

◆ FCN_PCI_PCIX_MODE_PCIX100_DECODE

#define FCN_PCI_PCIX_MODE_PCIX100_DECODE   6

Definition at line 516 of file etherfabric.c.

◆ FCN_PCI_PCIX_MODE_PCIX133_DECODE

#define FCN_PCI_PCIX_MODE_PCIX133_DECODE   7

Definition at line 517 of file etherfabric.c.

◆ FCN_STRAP_ISCSI_EN_LBN

#define FCN_STRAP_ISCSI_EN_LBN   3

Definition at line 518 of file etherfabric.c.

◆ FCN_STRAP_ISCSI_EN_WIDTH

#define FCN_STRAP_ISCSI_EN_WIDTH   1

Definition at line 519 of file etherfabric.c.

◆ FCN_STRAP_PINS_LBN

#define FCN_STRAP_PINS_LBN   0

Definition at line 520 of file etherfabric.c.

◆ FCN_STRAP_PINS_WIDTH

#define FCN_STRAP_PINS_WIDTH   3

Definition at line 521 of file etherfabric.c.

◆ FCN_STRAP_10G_LBN

#define FCN_STRAP_10G_LBN   2

Definition at line 522 of file etherfabric.c.

◆ FCN_STRAP_10G_WIDTH

#define FCN_STRAP_10G_WIDTH   1

Definition at line 523 of file etherfabric.c.

◆ FCN_STRAP_DUAL_PORT_LBN

#define FCN_STRAP_DUAL_PORT_LBN   1

Definition at line 524 of file etherfabric.c.

◆ FCN_STRAP_DUAL_PORT_WIDTH

#define FCN_STRAP_DUAL_PORT_WIDTH   1

Definition at line 525 of file etherfabric.c.

◆ FCN_STRAP_PCIE_LBN

#define FCN_STRAP_PCIE_LBN   0

Definition at line 526 of file etherfabric.c.

◆ FCN_STRAP_PCIE_WIDTH

#define FCN_STRAP_PCIE_WIDTH   1

Definition at line 527 of file etherfabric.c.

◆ FALCON_REV_A0

#define FALCON_REV_A0   0

Definition at line 530 of file etherfabric.c.

◆ FALCON_REV_A1

#define FALCON_REV_A1   1

Definition at line 531 of file etherfabric.c.

◆ FALCON_REV_B0

◆ FCN_GPIO_CTL_REG_KER [1/2]

#define FCN_GPIO_CTL_REG_KER   0x0210

◆ FCN_GPIO_CTL_REG_KER [2/2]

#define FCN_GPIO_CTL_REG_KER   0x0210

Definition at line 535 of file etherfabric.c.

◆ FCN_GPIO3_OEN_LBN

#define FCN_GPIO3_OEN_LBN   27

Definition at line 538 of file etherfabric.c.

◆ FCN_GPIO3_OEN_WIDTH

#define FCN_GPIO3_OEN_WIDTH   1

Definition at line 539 of file etherfabric.c.

◆ FCN_GPIO2_OEN_LBN

#define FCN_GPIO2_OEN_LBN   26

Definition at line 540 of file etherfabric.c.

◆ FCN_GPIO2_OEN_WIDTH

#define FCN_GPIO2_OEN_WIDTH   1

Definition at line 541 of file etherfabric.c.

◆ FCN_GPIO1_OEN_LBN

#define FCN_GPIO1_OEN_LBN   25

Definition at line 542 of file etherfabric.c.

◆ FCN_GPIO1_OEN_WIDTH

#define FCN_GPIO1_OEN_WIDTH   1

Definition at line 543 of file etherfabric.c.

◆ FCN_GPIO0_OEN_LBN

#define FCN_GPIO0_OEN_LBN   24

Definition at line 544 of file etherfabric.c.

◆ FCN_GPIO0_OEN_WIDTH

#define FCN_GPIO0_OEN_WIDTH   1

Definition at line 545 of file etherfabric.c.

◆ FCN_GPIO3_OUT_LBN

#define FCN_GPIO3_OUT_LBN   19

Definition at line 547 of file etherfabric.c.

◆ FCN_GPIO3_OUT_WIDTH

#define FCN_GPIO3_OUT_WIDTH   1

Definition at line 548 of file etherfabric.c.

◆ FCN_GPIO2_OUT_LBN

#define FCN_GPIO2_OUT_LBN   18

Definition at line 549 of file etherfabric.c.

◆ FCN_GPIO2_OUT_WIDTH

#define FCN_GPIO2_OUT_WIDTH   1

Definition at line 550 of file etherfabric.c.

◆ FCN_GPIO1_OUT_LBN

#define FCN_GPIO1_OUT_LBN   17

Definition at line 551 of file etherfabric.c.

◆ FCN_GPIO1_OUT_WIDTH

#define FCN_GPIO1_OUT_WIDTH   1

Definition at line 552 of file etherfabric.c.

◆ FCN_GPIO0_OUT_LBN

#define FCN_GPIO0_OUT_LBN   16

Definition at line 553 of file etherfabric.c.

◆ FCN_GPIO0_OUT_WIDTH

#define FCN_GPIO0_OUT_WIDTH   1

Definition at line 554 of file etherfabric.c.

◆ FCN_GPIO3_IN_LBN

#define FCN_GPIO3_IN_LBN   11

Definition at line 556 of file etherfabric.c.

◆ FCN_GPIO3_IN_WIDTH

#define FCN_GPIO3_IN_WIDTH   1

Definition at line 557 of file etherfabric.c.

◆ FCN_GPIO2_IN_LBN

#define FCN_GPIO2_IN_LBN   10

Definition at line 558 of file etherfabric.c.

◆ FCN_GPIO2_IN_WIDTH

#define FCN_GPIO2_IN_WIDTH   1

Definition at line 559 of file etherfabric.c.

◆ FCN_GPIO1_IN_LBN

#define FCN_GPIO1_IN_LBN   9

Definition at line 560 of file etherfabric.c.

◆ FCN_GPIO1_IN_WIDTH

#define FCN_GPIO1_IN_WIDTH   1

Definition at line 561 of file etherfabric.c.

◆ FCN_GPIO0_IN_LBN

#define FCN_GPIO0_IN_LBN   8

Definition at line 562 of file etherfabric.c.

◆ FCN_GPIO0_IN_WIDTH

#define FCN_GPIO0_IN_WIDTH   1

Definition at line 563 of file etherfabric.c.

◆ FCN_FLASH_PRESENT_LBN

#define FCN_FLASH_PRESENT_LBN   7

Definition at line 565 of file etherfabric.c.

◆ FCN_FLASH_PRESENT_WIDTH

#define FCN_FLASH_PRESENT_WIDTH   1

Definition at line 566 of file etherfabric.c.

◆ FCN_EEPROM_PRESENT_LBN

#define FCN_EEPROM_PRESENT_LBN   6

Definition at line 567 of file etherfabric.c.

◆ FCN_EEPROM_PRESENT_WIDTH

#define FCN_EEPROM_PRESENT_WIDTH   1

Definition at line 568 of file etherfabric.c.

◆ FCN_BOOTED_USING_NVDEVICE_LBN

#define FCN_BOOTED_USING_NVDEVICE_LBN   3

Definition at line 569 of file etherfabric.c.

◆ FCN_BOOTED_USING_NVDEVICE_WIDTH

#define FCN_BOOTED_USING_NVDEVICE_WIDTH   1

Definition at line 570 of file etherfabric.c.

◆ FCN_NV_MAGIC_NUMBER

#define FCN_NV_MAGIC_NUMBER   0xFA1C

Definition at line 573 of file etherfabric.c.

Referenced by falcon_probe_nvram().

◆ FCN_GLB_CTL_REG_KER

#define FCN_GLB_CTL_REG_KER   0x0220

Definition at line 576 of file etherfabric.c.

Referenced by falcon_reset().

◆ FCN_EXT_PHY_RST_CTL_LBN

#define FCN_EXT_PHY_RST_CTL_LBN   63

Definition at line 577 of file etherfabric.c.

◆ FCN_EXT_PHY_RST_CTL_WIDTH

#define FCN_EXT_PHY_RST_CTL_WIDTH   1

Definition at line 578 of file etherfabric.c.

◆ FCN_PCIE_SD_RST_CTL_LBN

#define FCN_PCIE_SD_RST_CTL_LBN   61

Definition at line 579 of file etherfabric.c.

◆ FCN_PCIE_SD_RST_CTL_WIDTH

#define FCN_PCIE_SD_RST_CTL_WIDTH   1

Definition at line 580 of file etherfabric.c.

◆ FCN_PCIE_STCK_RST_CTL_LBN

#define FCN_PCIE_STCK_RST_CTL_LBN   59

Definition at line 581 of file etherfabric.c.

◆ FCN_PCIE_STCK_RST_CTL_WIDTH

#define FCN_PCIE_STCK_RST_CTL_WIDTH   1

Definition at line 582 of file etherfabric.c.

◆ FCN_PCIE_NSTCK_RST_CTL_LBN

#define FCN_PCIE_NSTCK_RST_CTL_LBN   58

Definition at line 583 of file etherfabric.c.

◆ FCN_PCIE_NSTCK_RST_CTL_WIDTH

#define FCN_PCIE_NSTCK_RST_CTL_WIDTH   1

Definition at line 584 of file etherfabric.c.

◆ FCN_PCIE_CORE_RST_CTL_LBN

#define FCN_PCIE_CORE_RST_CTL_LBN   57

Definition at line 585 of file etherfabric.c.

◆ FCN_PCIE_CORE_RST_CTL_WIDTH

#define FCN_PCIE_CORE_RST_CTL_WIDTH   1

Definition at line 586 of file etherfabric.c.

◆ FCN_EE_RST_CTL_LBN

#define FCN_EE_RST_CTL_LBN   49

Definition at line 587 of file etherfabric.c.

◆ FCN_EE_RST_CTL_WIDTH

#define FCN_EE_RST_CTL_WIDTH   1

Definition at line 588 of file etherfabric.c.

◆ FCN_RST_EXT_PHY_LBN

#define FCN_RST_EXT_PHY_LBN   31

Definition at line 589 of file etherfabric.c.

◆ FCN_RST_EXT_PHY_WIDTH

#define FCN_RST_EXT_PHY_WIDTH   1

Definition at line 590 of file etherfabric.c.

◆ FCN_EXT_PHY_RST_DUR_LBN

#define FCN_EXT_PHY_RST_DUR_LBN   1

Definition at line 591 of file etherfabric.c.

◆ FCN_EXT_PHY_RST_DUR_WIDTH

#define FCN_EXT_PHY_RST_DUR_WIDTH   3

Definition at line 592 of file etherfabric.c.

◆ FCN_SWRST_LBN

#define FCN_SWRST_LBN   0

Definition at line 593 of file etherfabric.c.

◆ FCN_SWRST_WIDTH

#define FCN_SWRST_WIDTH   1

Definition at line 594 of file etherfabric.c.

◆ INCLUDE_IN_RESET

#define INCLUDE_IN_RESET   0

Definition at line 595 of file etherfabric.c.

◆ EXCLUDE_FROM_RESET

#define EXCLUDE_FROM_RESET   1

Definition at line 596 of file etherfabric.c.

Referenced by falcon_reset().

◆ FCN_ALTERA_BUILD_REG_KER

#define FCN_ALTERA_BUILD_REG_KER   0x0300

Definition at line 599 of file etherfabric.c.

Referenced by falcon_probe_nic_variant().

◆ FCN_VER_MAJOR_LBN

#define FCN_VER_MAJOR_LBN   24

Definition at line 600 of file etherfabric.c.

◆ FCN_VER_MAJOR_WIDTH

#define FCN_VER_MAJOR_WIDTH   8

Definition at line 601 of file etherfabric.c.

◆ FCN_VER_MINOR_LBN

#define FCN_VER_MINOR_LBN   16

Definition at line 602 of file etherfabric.c.

◆ FCN_VER_MINOR_WIDTH

#define FCN_VER_MINOR_WIDTH   8

Definition at line 603 of file etherfabric.c.

◆ FCN_VER_BUILD_LBN

#define FCN_VER_BUILD_LBN   0

Definition at line 604 of file etherfabric.c.

◆ FCN_VER_BUILD_WIDTH

#define FCN_VER_BUILD_WIDTH   16

Definition at line 605 of file etherfabric.c.

◆ FCN_VER_ALL_LBN

#define FCN_VER_ALL_LBN   0

Definition at line 606 of file etherfabric.c.

◆ FCN_VER_ALL_WIDTH

#define FCN_VER_ALL_WIDTH   32

Definition at line 607 of file etherfabric.c.

◆ FCN_SPARE_REG_KER

#define FCN_SPARE_REG_KER   0x310

Definition at line 610 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_MEM_PERR_EN_TX_DATA_LBN

#define FCN_MEM_PERR_EN_TX_DATA_LBN   72

Definition at line 611 of file etherfabric.c.

◆ FCN_MEM_PERR_EN_TX_DATA_WIDTH

#define FCN_MEM_PERR_EN_TX_DATA_WIDTH   2

Definition at line 612 of file etherfabric.c.

◆ FCN_TIMER_CMD_REG_KER

#define FCN_TIMER_CMD_REG_KER   0x420

Definition at line 615 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_TIMER_MODE_LBN

#define FCN_TIMER_MODE_LBN   12

Definition at line 616 of file etherfabric.c.

◆ FCN_TIMER_MODE_WIDTH

#define FCN_TIMER_MODE_WIDTH   2

Definition at line 617 of file etherfabric.c.

◆ FCN_TIMER_MODE_DIS

#define FCN_TIMER_MODE_DIS   0

Definition at line 618 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_TIMER_MODE_INT_HLDOFF

#define FCN_TIMER_MODE_INT_HLDOFF   1

Definition at line 619 of file etherfabric.c.

◆ FCN_TIMER_VAL_LBN

#define FCN_TIMER_VAL_LBN   0

Definition at line 620 of file etherfabric.c.

◆ FCN_TIMER_VAL_WIDTH

#define FCN_TIMER_VAL_WIDTH   12

Definition at line 621 of file etherfabric.c.

◆ FCN_RX_CFG_REG_KER [1/2]

#define FCN_RX_CFG_REG_KER   0x800

Definition at line 624 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_RX_XOFF_EN_LBN

#define FCN_RX_XOFF_EN_LBN   0

Definition at line 625 of file etherfabric.c.

◆ FCN_RX_XOFF_EN_WIDTH

#define FCN_RX_XOFF_EN_WIDTH   1

Definition at line 626 of file etherfabric.c.

◆ FCN_SRM_RX_DC_CFG_REG_KER

#define FCN_SRM_RX_DC_CFG_REG_KER   0x610

Definition at line 629 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_SRM_RX_DC_BASE_ADR_LBN

#define FCN_SRM_RX_DC_BASE_ADR_LBN   0

Definition at line 630 of file etherfabric.c.

◆ FCN_SRM_RX_DC_BASE_ADR_WIDTH

#define FCN_SRM_RX_DC_BASE_ADR_WIDTH   21

Definition at line 631 of file etherfabric.c.

◆ FCN_SRM_TX_DC_CFG_REG_KER

#define FCN_SRM_TX_DC_CFG_REG_KER   0x620

Definition at line 634 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_SRM_TX_DC_BASE_ADR_LBN

#define FCN_SRM_TX_DC_BASE_ADR_LBN   0

Definition at line 635 of file etherfabric.c.

◆ FCN_SRM_TX_DC_BASE_ADR_WIDTH

#define FCN_SRM_TX_DC_BASE_ADR_WIDTH   21

Definition at line 636 of file etherfabric.c.

◆ FCN_SRM_CFG_REG_KER

#define FCN_SRM_CFG_REG_KER   0x630

Definition at line 639 of file etherfabric.c.

Referenced by falcon_init_sram().

◆ FCN_SRAM_OOB_ADR_INTEN_LBN

#define FCN_SRAM_OOB_ADR_INTEN_LBN   5

Definition at line 640 of file etherfabric.c.

◆ FCN_SRAM_OOB_ADR_INTEN_WIDTH

#define FCN_SRAM_OOB_ADR_INTEN_WIDTH   1

Definition at line 641 of file etherfabric.c.

◆ FCN_SRAM_OOB_BUF_INTEN_LBN

#define FCN_SRAM_OOB_BUF_INTEN_LBN   4

Definition at line 642 of file etherfabric.c.

◆ FCN_SRAM_OOB_BUF_INTEN_WIDTH

#define FCN_SRAM_OOB_BUF_INTEN_WIDTH   1

Definition at line 643 of file etherfabric.c.

◆ FCN_SRAM_OOB_BT_INIT_EN_LBN

#define FCN_SRAM_OOB_BT_INIT_EN_LBN   3

Definition at line 644 of file etherfabric.c.

◆ FCN_SRAM_OOB_BT_INIT_EN_WIDTH

#define FCN_SRAM_OOB_BT_INIT_EN_WIDTH   1

Definition at line 645 of file etherfabric.c.

◆ FCN_SRM_NUM_BANK_LBN

#define FCN_SRM_NUM_BANK_LBN   2

Definition at line 646 of file etherfabric.c.

◆ FCN_SRM_NUM_BANK_WIDTH

#define FCN_SRM_NUM_BANK_WIDTH   1

Definition at line 647 of file etherfabric.c.

◆ FCN_SRM_BANK_SIZE_LBN

#define FCN_SRM_BANK_SIZE_LBN   0

Definition at line 648 of file etherfabric.c.

◆ FCN_SRM_BANK_SIZE_WIDTH

#define FCN_SRM_BANK_SIZE_WIDTH   2

Definition at line 649 of file etherfabric.c.

◆ FCN_SRM_NUM_BANKS_AND_BANK_SIZE_LBN

#define FCN_SRM_NUM_BANKS_AND_BANK_SIZE_LBN   0

Definition at line 650 of file etherfabric.c.

◆ FCN_SRM_NUM_BANKS_AND_BANK_SIZE_WIDTH

#define FCN_SRM_NUM_BANKS_AND_BANK_SIZE_WIDTH   3

Definition at line 651 of file etherfabric.c.

◆ FCN_RX_CFG_REG_KER [2/2]

#define FCN_RX_CFG_REG_KER   0x800

Definition at line 624 of file etherfabric.c.

◆ FCN_RX_INGR_EN_B0_LBN

#define FCN_RX_INGR_EN_B0_LBN   47

Definition at line 654 of file etherfabric.c.

◆ FCN_RX_INGR_EN_B0_WIDTH

#define FCN_RX_INGR_EN_B0_WIDTH   1

Definition at line 655 of file etherfabric.c.

◆ FCN_RX_USR_BUF_SIZE_B0_LBN

#define FCN_RX_USR_BUF_SIZE_B0_LBN   19

Definition at line 656 of file etherfabric.c.

◆ FCN_RX_USR_BUF_SIZE_B0_WIDTH

#define FCN_RX_USR_BUF_SIZE_B0_WIDTH   9

Definition at line 657 of file etherfabric.c.

◆ FCN_RX_XON_MAC_TH_B0_LBN

#define FCN_RX_XON_MAC_TH_B0_LBN   10

Definition at line 658 of file etherfabric.c.

◆ FCN_RX_XON_MAC_TH_B0_WIDTH

#define FCN_RX_XON_MAC_TH_B0_WIDTH   9

Definition at line 659 of file etherfabric.c.

◆ FCN_RX_XOFF_MAC_TH_B0_LBN

#define FCN_RX_XOFF_MAC_TH_B0_LBN   1

Definition at line 660 of file etherfabric.c.

◆ FCN_RX_XOFF_MAC_TH_B0_WIDTH

#define FCN_RX_XOFF_MAC_TH_B0_WIDTH   9

Definition at line 661 of file etherfabric.c.

◆ FCN_RX_XOFF_MAC_EN_B0_LBN

#define FCN_RX_XOFF_MAC_EN_B0_LBN   0

Definition at line 662 of file etherfabric.c.

◆ FCN_RX_XOFF_MAC_EN_B0_WIDTH

#define FCN_RX_XOFF_MAC_EN_B0_WIDTH   1

Definition at line 663 of file etherfabric.c.

◆ FCN_RX_USR_BUF_SIZE_A1_LBN [1/2]

#define FCN_RX_USR_BUF_SIZE_A1_LBN   11

Definition at line 664 of file etherfabric.c.

◆ FCN_RX_USR_BUF_SIZE_A1_WIDTH [1/2]

#define FCN_RX_USR_BUF_SIZE_A1_WIDTH   9

Definition at line 665 of file etherfabric.c.

◆ FCN_RX_XON_MAC_TH_A1_LBN

#define FCN_RX_XON_MAC_TH_A1_LBN   6

Definition at line 666 of file etherfabric.c.

◆ FCN_RX_XON_MAC_TH_A1_WIDTH

#define FCN_RX_XON_MAC_TH_A1_WIDTH   5

Definition at line 667 of file etherfabric.c.

◆ FCN_RX_XOFF_MAC_TH_A1_LBN

#define FCN_RX_XOFF_MAC_TH_A1_LBN   1

Definition at line 668 of file etherfabric.c.

◆ FCN_RX_XOFF_MAC_TH_A1_WIDTH

#define FCN_RX_XOFF_MAC_TH_A1_WIDTH   5

Definition at line 669 of file etherfabric.c.

◆ FCN_RX_XOFF_MAC_EN_A1_LBN [1/2]

#define FCN_RX_XOFF_MAC_EN_A1_LBN   0

Definition at line 670 of file etherfabric.c.

◆ FCN_RX_XOFF_MAC_EN_A1_WIDTH [1/2]

#define FCN_RX_XOFF_MAC_EN_A1_WIDTH   1

Definition at line 671 of file etherfabric.c.

◆ FCN_RX_USR_BUF_SIZE_A1_LBN [2/2]

#define FCN_RX_USR_BUF_SIZE_A1_LBN   11

Definition at line 664 of file etherfabric.c.

◆ FCN_RX_USR_BUF_SIZE_A1_WIDTH [2/2]

#define FCN_RX_USR_BUF_SIZE_A1_WIDTH   9

Definition at line 665 of file etherfabric.c.

◆ FCN_RX_XOFF_MAC_EN_A1_LBN [2/2]

#define FCN_RX_XOFF_MAC_EN_A1_LBN   0

Definition at line 670 of file etherfabric.c.

◆ FCN_RX_XOFF_MAC_EN_A1_WIDTH [2/2]

#define FCN_RX_XOFF_MAC_EN_A1_WIDTH   1

Definition at line 671 of file etherfabric.c.

◆ FCN_RX_FILTER_CTL_REG_KER

#define FCN_RX_FILTER_CTL_REG_KER   0x810

Definition at line 679 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_UDP_FULL_SRCH_LIMIT_LBN

#define FCN_UDP_FULL_SRCH_LIMIT_LBN   32

Definition at line 680 of file etherfabric.c.

◆ FCN_UDP_FULL_SRCH_LIMIT_WIDTH

#define FCN_UDP_FULL_SRCH_LIMIT_WIDTH   8

Definition at line 681 of file etherfabric.c.

◆ FCN_NUM_KER_LBN

#define FCN_NUM_KER_LBN   24

Definition at line 682 of file etherfabric.c.

◆ FCN_NUM_KER_WIDTH

#define FCN_NUM_KER_WIDTH   2

Definition at line 683 of file etherfabric.c.

◆ FCN_UDP_WILD_SRCH_LIMIT_LBN

#define FCN_UDP_WILD_SRCH_LIMIT_LBN   16

Definition at line 684 of file etherfabric.c.

◆ FCN_UDP_WILD_SRCH_LIMIT_WIDTH

#define FCN_UDP_WILD_SRCH_LIMIT_WIDTH   8

Definition at line 685 of file etherfabric.c.

◆ FCN_TCP_WILD_SRCH_LIMIT_LBN

#define FCN_TCP_WILD_SRCH_LIMIT_LBN   8

Definition at line 686 of file etherfabric.c.

◆ FCN_TCP_WILD_SRCH_LIMIT_WIDTH

#define FCN_TCP_WILD_SRCH_LIMIT_WIDTH   8

Definition at line 687 of file etherfabric.c.

◆ FCN_TCP_FULL_SRCH_LIMIT_LBN

#define FCN_TCP_FULL_SRCH_LIMIT_LBN   0

Definition at line 688 of file etherfabric.c.

◆ FCN_TCP_FULL_SRCH_LIMIT_WIDTH

#define FCN_TCP_FULL_SRCH_LIMIT_WIDTH   8

Definition at line 689 of file etherfabric.c.

◆ FCN_RX_FLUSH_DESCQ_REG_KER

#define FCN_RX_FLUSH_DESCQ_REG_KER   0x0820

Definition at line 692 of file etherfabric.c.

◆ FCN_RX_FLUSH_DESCQ_CMD_LBN

#define FCN_RX_FLUSH_DESCQ_CMD_LBN   24

Definition at line 693 of file etherfabric.c.

◆ FCN_RX_FLUSH_DESCQ_CMD_WIDTH

#define FCN_RX_FLUSH_DESCQ_CMD_WIDTH   1

Definition at line 694 of file etherfabric.c.

◆ FCN_RX_FLUSH_DESCQ_LBN

#define FCN_RX_FLUSH_DESCQ_LBN   0

Definition at line 695 of file etherfabric.c.

◆ FCN_RX_FLUSH_DESCQ_WIDTH

#define FCN_RX_FLUSH_DESCQ_WIDTH   12

Definition at line 696 of file etherfabric.c.

◆ FCN_RX_DESC_UPD_REG_KER

#define FCN_RX_DESC_UPD_REG_KER   0x0830

Definition at line 699 of file etherfabric.c.

◆ FCN_RX_DESC_WPTR_LBN

#define FCN_RX_DESC_WPTR_LBN   96

Definition at line 700 of file etherfabric.c.

◆ FCN_RX_DESC_WPTR_WIDTH

#define FCN_RX_DESC_WPTR_WIDTH   12

Definition at line 701 of file etherfabric.c.

◆ FCN_RX_DESC_UPD_REG_KER_DWORD

#define FCN_RX_DESC_UPD_REG_KER_DWORD   ( FCN_RX_DESC_UPD_REG_KER + 12 )

Definition at line 702 of file etherfabric.c.

Referenced by falcon_notify_rx_desc().

◆ FCN_RX_DESC_WPTR_DWORD_LBN

#define FCN_RX_DESC_WPTR_DWORD_LBN   0

Definition at line 703 of file etherfabric.c.

◆ FCN_RX_DESC_WPTR_DWORD_WIDTH

#define FCN_RX_DESC_WPTR_DWORD_WIDTH   12

Definition at line 704 of file etherfabric.c.

◆ FCN_RX_DC_CFG_REG_KER

#define FCN_RX_DC_CFG_REG_KER   0x840

Definition at line 707 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_RX_DC_SIZE_LBN

#define FCN_RX_DC_SIZE_LBN   0

Definition at line 708 of file etherfabric.c.

◆ FCN_RX_DC_SIZE_WIDTH

#define FCN_RX_DC_SIZE_WIDTH   2

Definition at line 709 of file etherfabric.c.

◆ FCN_RX_SELF_RST_REG_KER

#define FCN_RX_SELF_RST_REG_KER   0x890

Definition at line 711 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_RX_ISCSI_DIS_LBN

#define FCN_RX_ISCSI_DIS_LBN   17

Definition at line 712 of file etherfabric.c.

◆ FCN_RX_ISCSI_DIS_WIDTH

#define FCN_RX_ISCSI_DIS_WIDTH   1

Definition at line 713 of file etherfabric.c.

◆ FCN_RX_NODESC_WAIT_DIS_LBN

#define FCN_RX_NODESC_WAIT_DIS_LBN   9

Definition at line 714 of file etherfabric.c.

◆ FCN_RX_NODESC_WAIT_DIS_WIDTH

#define FCN_RX_NODESC_WAIT_DIS_WIDTH   1

Definition at line 715 of file etherfabric.c.

◆ FCN_RX_RECOVERY_EN_LBN

#define FCN_RX_RECOVERY_EN_LBN   8

Definition at line 716 of file etherfabric.c.

◆ FCN_RX_RECOVERY_EN_WIDTH

#define FCN_RX_RECOVERY_EN_WIDTH   1

Definition at line 717 of file etherfabric.c.

◆ FCN_TX_FLUSH_DESCQ_REG_KER

#define FCN_TX_FLUSH_DESCQ_REG_KER   0x0a00

Definition at line 720 of file etherfabric.c.

◆ FCN_TX_FLUSH_DESCQ_CMD_LBN

#define FCN_TX_FLUSH_DESCQ_CMD_LBN   12

Definition at line 721 of file etherfabric.c.

◆ FCN_TX_FLUSH_DESCQ_CMD_WIDTH

#define FCN_TX_FLUSH_DESCQ_CMD_WIDTH   1

Definition at line 722 of file etherfabric.c.

◆ FCN_TX_FLUSH_DESCQ_LBN

#define FCN_TX_FLUSH_DESCQ_LBN   0

Definition at line 723 of file etherfabric.c.

◆ FCN_TX_FLUSH_DESCQ_WIDTH

#define FCN_TX_FLUSH_DESCQ_WIDTH   12

Definition at line 724 of file etherfabric.c.

◆ FCN_TX_CFG2_REG_KER

#define FCN_TX_CFG2_REG_KER   0xa80

Definition at line 727 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_TX_DIS_NON_IP_EV_LBN

#define FCN_TX_DIS_NON_IP_EV_LBN   17

Definition at line 728 of file etherfabric.c.

◆ FCN_TX_DIS_NON_IP_EV_WIDTH

#define FCN_TX_DIS_NON_IP_EV_WIDTH   1

Definition at line 729 of file etherfabric.c.

◆ FCN_TX_DESC_UPD_REG_KER

#define FCN_TX_DESC_UPD_REG_KER   0x0a10

Definition at line 732 of file etherfabric.c.

◆ FCN_TX_DESC_WPTR_LBN

#define FCN_TX_DESC_WPTR_LBN   96

Definition at line 733 of file etherfabric.c.

◆ FCN_TX_DESC_WPTR_WIDTH

#define FCN_TX_DESC_WPTR_WIDTH   12

Definition at line 734 of file etherfabric.c.

◆ FCN_TX_DESC_UPD_REG_KER_DWORD

#define FCN_TX_DESC_UPD_REG_KER_DWORD   ( FCN_TX_DESC_UPD_REG_KER + 12 )

Definition at line 735 of file etherfabric.c.

Referenced by falcon_notify_tx_desc().

◆ FCN_TX_DESC_WPTR_DWORD_LBN

#define FCN_TX_DESC_WPTR_DWORD_LBN   0

Definition at line 736 of file etherfabric.c.

◆ FCN_TX_DESC_WPTR_DWORD_WIDTH

#define FCN_TX_DESC_WPTR_DWORD_WIDTH   12

Definition at line 737 of file etherfabric.c.

◆ FCN_TX_DC_CFG_REG_KER

#define FCN_TX_DC_CFG_REG_KER   0xa20

Definition at line 740 of file etherfabric.c.

Referenced by falcon_setup_nic().

◆ FCN_TX_DC_SIZE_LBN

#define FCN_TX_DC_SIZE_LBN   0

Definition at line 741 of file etherfabric.c.

◆ FCN_TX_DC_SIZE_WIDTH

#define FCN_TX_DC_SIZE_WIDTH   2

Definition at line 742 of file etherfabric.c.

◆ FCN_MD_TXD_REG_KER

#define FCN_MD_TXD_REG_KER   0xc00

Definition at line 745 of file etherfabric.c.

Referenced by falcon_mdio_write().

◆ FCN_MD_TXD_LBN

#define FCN_MD_TXD_LBN   0

Definition at line 746 of file etherfabric.c.

◆ FCN_MD_TXD_WIDTH

#define FCN_MD_TXD_WIDTH   16

Definition at line 747 of file etherfabric.c.

◆ FCN_MD_RXD_REG_KER

#define FCN_MD_RXD_REG_KER   0xc10

Definition at line 750 of file etherfabric.c.

Referenced by falcon_mdio_read().

◆ FCN_MD_RXD_LBN

#define FCN_MD_RXD_LBN   0

Definition at line 751 of file etherfabric.c.

◆ FCN_MD_RXD_WIDTH

#define FCN_MD_RXD_WIDTH   16

Definition at line 752 of file etherfabric.c.

◆ FCN_MD_CS_REG_KER

#define FCN_MD_CS_REG_KER   0xc20

Definition at line 755 of file etherfabric.c.

Referenced by falcon_mdio_read(), and falcon_mdio_write().

◆ FCN_MD_GC_LBN

#define FCN_MD_GC_LBN   4

Definition at line 756 of file etherfabric.c.

◆ FCN_MD_GC_WIDTH

#define FCN_MD_GC_WIDTH   1

Definition at line 757 of file etherfabric.c.

◆ FCN_MD_RIC_LBN

#define FCN_MD_RIC_LBN   2

Definition at line 758 of file etherfabric.c.

◆ FCN_MD_RIC_WIDTH

#define FCN_MD_RIC_WIDTH   1

Definition at line 759 of file etherfabric.c.

◆ FCN_MD_RDC_LBN

#define FCN_MD_RDC_LBN   1

Definition at line 760 of file etherfabric.c.

◆ FCN_MD_RDC_WIDTH

#define FCN_MD_RDC_WIDTH   1

Definition at line 761 of file etherfabric.c.

◆ FCN_MD_WRC_LBN

#define FCN_MD_WRC_LBN   0

Definition at line 762 of file etherfabric.c.

◆ FCN_MD_WRC_WIDTH

#define FCN_MD_WRC_WIDTH   1

Definition at line 763 of file etherfabric.c.

◆ FCN_MD_PHY_ADR_REG_KER

#define FCN_MD_PHY_ADR_REG_KER   0xc30

Definition at line 766 of file etherfabric.c.

Referenced by falcon_mdio_read(), and falcon_mdio_write().

◆ FCN_MD_PHY_ADR_LBN

#define FCN_MD_PHY_ADR_LBN   0

Definition at line 767 of file etherfabric.c.

◆ FCN_MD_PHY_ADR_WIDTH

#define FCN_MD_PHY_ADR_WIDTH   16

Definition at line 768 of file etherfabric.c.

◆ FCN_MD_ID_REG_KER

#define FCN_MD_ID_REG_KER   0xc40

Definition at line 771 of file etherfabric.c.

Referenced by falcon_mdio_read(), and falcon_mdio_write().

◆ FCN_MD_PRT_ADR_LBN

#define FCN_MD_PRT_ADR_LBN   11

Definition at line 772 of file etherfabric.c.

◆ FCN_MD_PRT_ADR_WIDTH

#define FCN_MD_PRT_ADR_WIDTH   5

Definition at line 773 of file etherfabric.c.

◆ FCN_MD_DEV_ADR_LBN

#define FCN_MD_DEV_ADR_LBN   6

Definition at line 774 of file etherfabric.c.

◆ FCN_MD_DEV_ADR_WIDTH

#define FCN_MD_DEV_ADR_WIDTH   5

Definition at line 775 of file etherfabric.c.

◆ FCN_MD_STAT_REG_KER

#define FCN_MD_STAT_REG_KER   0xc50

Definition at line 778 of file etherfabric.c.

Referenced by falcon_gmii_wait().

◆ FCN_MD_PINT_LBN

#define FCN_MD_PINT_LBN   4

Definition at line 779 of file etherfabric.c.

◆ FCN_MD_PINT_WIDTH

#define FCN_MD_PINT_WIDTH   1

Definition at line 780 of file etherfabric.c.

◆ FCN_MD_DONE_LBN

#define FCN_MD_DONE_LBN   3

Definition at line 781 of file etherfabric.c.

◆ FCN_MD_DONE_WIDTH

#define FCN_MD_DONE_WIDTH   1

Definition at line 782 of file etherfabric.c.

◆ FCN_MD_BSERR_LBN

#define FCN_MD_BSERR_LBN   2

Definition at line 783 of file etherfabric.c.

◆ FCN_MD_BSERR_WIDTH

#define FCN_MD_BSERR_WIDTH   1

Definition at line 784 of file etherfabric.c.

◆ FCN_MD_LNFL_LBN

#define FCN_MD_LNFL_LBN   1

Definition at line 785 of file etherfabric.c.

◆ FCN_MD_LNFL_WIDTH

#define FCN_MD_LNFL_WIDTH   1

Definition at line 786 of file etherfabric.c.

◆ FCN_MD_BSY_LBN

#define FCN_MD_BSY_LBN   0

Definition at line 787 of file etherfabric.c.

◆ FCN_MD_BSY_WIDTH

#define FCN_MD_BSY_WIDTH   1

Definition at line 788 of file etherfabric.c.

◆ FCN_MAC0_CTRL_REG_KER

#define FCN_MAC0_CTRL_REG_KER   0xc80

Definition at line 791 of file etherfabric.c.

Referenced by falcon_reconfigure_mac_wrapper().

◆ FCN_MAC1_CTRL_REG_KER

#define FCN_MAC1_CTRL_REG_KER   0xc90

Definition at line 792 of file etherfabric.c.

◆ FCN_MAC_XOFF_VAL_LBN

#define FCN_MAC_XOFF_VAL_LBN   16

Definition at line 793 of file etherfabric.c.

◆ FCN_MAC_XOFF_VAL_WIDTH

#define FCN_MAC_XOFF_VAL_WIDTH   16

Definition at line 794 of file etherfabric.c.

◆ FCN_MAC_BCAD_ACPT_LBN

#define FCN_MAC_BCAD_ACPT_LBN   4

Definition at line 795 of file etherfabric.c.

◆ FCN_MAC_BCAD_ACPT_WIDTH

#define FCN_MAC_BCAD_ACPT_WIDTH   1

Definition at line 796 of file etherfabric.c.

◆ FCN_MAC_UC_PROM_LBN

#define FCN_MAC_UC_PROM_LBN   3

Definition at line 797 of file etherfabric.c.

◆ FCN_MAC_UC_PROM_WIDTH

#define FCN_MAC_UC_PROM_WIDTH   1

Definition at line 798 of file etherfabric.c.

◆ FCN_MAC_LINK_STATUS_LBN

#define FCN_MAC_LINK_STATUS_LBN   2

Definition at line 799 of file etherfabric.c.

◆ FCN_MAC_LINK_STATUS_WIDTH

#define FCN_MAC_LINK_STATUS_WIDTH   1

Definition at line 800 of file etherfabric.c.

◆ FCN_MAC_SPEED_LBN

#define FCN_MAC_SPEED_LBN   0

Definition at line 801 of file etherfabric.c.

◆ FCN_MAC_SPEED_WIDTH

#define FCN_MAC_SPEED_WIDTH   2

Definition at line 802 of file etherfabric.c.

◆ XX_TXDRV_DEQ_DEFAULT

#define XX_TXDRV_DEQ_DEFAULT   0xe /* deq=.6 */

Definition at line 805 of file etherfabric.c.

Referenced by falcon_setup_xaui().

◆ XX_TXDRV_DTX_DEFAULT

#define XX_TXDRV_DTX_DEFAULT   0x5 /* 1.25 */

Definition at line 806 of file etherfabric.c.

Referenced by falcon_setup_xaui().

◆ XX_SD_CTL_DRV_DEFAULT

#define XX_SD_CTL_DRV_DEFAULT   0 /* 20mA */

Definition at line 807 of file etherfabric.c.

Referenced by falcon_setup_xaui().

◆ FALCON_GMAC_REGBANK

#define FALCON_GMAC_REGBANK   0xe00

Definition at line 810 of file etherfabric.c.

◆ FALCON_GMAC_REGBANK_SIZE

#define FALCON_GMAC_REGBANK_SIZE   0x200

Definition at line 811 of file etherfabric.c.

◆ FALCON_GMAC_REG_SIZE

#define FALCON_GMAC_REG_SIZE   0x10

Definition at line 812 of file etherfabric.c.

◆ FALCON_XMAC_REGBANK

#define FALCON_XMAC_REGBANK   0x1200

Definition at line 815 of file etherfabric.c.

◆ FALCON_XMAC_REGBANK_SIZE

#define FALCON_XMAC_REGBANK_SIZE   0x200

Definition at line 816 of file etherfabric.c.

◆ FALCON_XMAC_REG_SIZE

#define FALCON_XMAC_REG_SIZE   0x10

Definition at line 817 of file etherfabric.c.

◆ FCN_XM_ADR_LO_REG_MAC

#define FCN_XM_ADR_LO_REG_MAC   0x00

Definition at line 820 of file etherfabric.c.

Referenced by falcon_reconfigure_xmac().

◆ FCN_XM_ADR_3_LBN

#define FCN_XM_ADR_3_LBN   24

Definition at line 821 of file etherfabric.c.

◆ FCN_XM_ADR_3_WIDTH

#define FCN_XM_ADR_3_WIDTH   8

Definition at line 822 of file etherfabric.c.

◆ FCN_XM_ADR_2_LBN

#define FCN_XM_ADR_2_LBN   16

Definition at line 823 of file etherfabric.c.

◆ FCN_XM_ADR_2_WIDTH

#define FCN_XM_ADR_2_WIDTH   8

Definition at line 824 of file etherfabric.c.

◆ FCN_XM_ADR_1_LBN

#define FCN_XM_ADR_1_LBN   8

Definition at line 825 of file etherfabric.c.

◆ FCN_XM_ADR_1_WIDTH

#define FCN_XM_ADR_1_WIDTH   8

Definition at line 826 of file etherfabric.c.

◆ FCN_XM_ADR_0_LBN

#define FCN_XM_ADR_0_LBN   0

Definition at line 827 of file etherfabric.c.

◆ FCN_XM_ADR_0_WIDTH

#define FCN_XM_ADR_0_WIDTH   8

Definition at line 828 of file etherfabric.c.

◆ FCN_XM_ADR_HI_REG_MAC

#define FCN_XM_ADR_HI_REG_MAC   0x01

Definition at line 831 of file etherfabric.c.

Referenced by falcon_reconfigure_xmac().

◆ FCN_XM_ADR_5_LBN

#define FCN_XM_ADR_5_LBN   8

Definition at line 832 of file etherfabric.c.

◆ FCN_XM_ADR_5_WIDTH

#define FCN_XM_ADR_5_WIDTH   8

Definition at line 833 of file etherfabric.c.

◆ FCN_XM_ADR_4_LBN

#define FCN_XM_ADR_4_LBN   0

Definition at line 834 of file etherfabric.c.

◆ FCN_XM_ADR_4_WIDTH

#define FCN_XM_ADR_4_WIDTH   8

Definition at line 835 of file etherfabric.c.

◆ FCN_XM_GLB_CFG_REG_MAC

#define FCN_XM_GLB_CFG_REG_MAC   0x02

Definition at line 838 of file etherfabric.c.

Referenced by falcon_reconfigure_xmac(), and falcon_reset_xmac().

◆ FCN_XM_RX_STAT_EN_LBN

#define FCN_XM_RX_STAT_EN_LBN   11

Definition at line 839 of file etherfabric.c.

◆ FCN_XM_RX_STAT_EN_WIDTH

#define FCN_XM_RX_STAT_EN_WIDTH   1

Definition at line 840 of file etherfabric.c.

◆ FCN_XM_TX_STAT_EN_LBN

#define FCN_XM_TX_STAT_EN_LBN   10

Definition at line 841 of file etherfabric.c.

◆ FCN_XM_TX_STAT_EN_WIDTH

#define FCN_XM_TX_STAT_EN_WIDTH   1

Definition at line 842 of file etherfabric.c.

◆ FCN_XM_RX_JUMBO_MODE_LBN

#define FCN_XM_RX_JUMBO_MODE_LBN   6

Definition at line 843 of file etherfabric.c.

◆ FCN_XM_RX_JUMBO_MODE_WIDTH

#define FCN_XM_RX_JUMBO_MODE_WIDTH   1

Definition at line 844 of file etherfabric.c.

◆ FCN_XM_CORE_RST_LBN

#define FCN_XM_CORE_RST_LBN   0

Definition at line 845 of file etherfabric.c.

◆ FCN_XM_CORE_RST_WIDTH

#define FCN_XM_CORE_RST_WIDTH   1

Definition at line 846 of file etherfabric.c.

◆ FCN_XM_TX_CFG_REG_MAC

#define FCN_XM_TX_CFG_REG_MAC   0x03

Definition at line 849 of file etherfabric.c.

Referenced by falcon_reconfigure_xmac().

◆ FCN_XM_IPG_LBN

#define FCN_XM_IPG_LBN   16

Definition at line 850 of file etherfabric.c.

◆ FCN_XM_IPG_WIDTH

#define FCN_XM_IPG_WIDTH   4

Definition at line 851 of file etherfabric.c.

◆ FCN_XM_FCNTL_LBN

#define FCN_XM_FCNTL_LBN   10

Definition at line 852 of file etherfabric.c.

◆ FCN_XM_FCNTL_WIDTH

#define FCN_XM_FCNTL_WIDTH   1

Definition at line 853 of file etherfabric.c.

◆ FCN_XM_TXCRC_LBN

#define FCN_XM_TXCRC_LBN   8

Definition at line 854 of file etherfabric.c.

◆ FCN_XM_TXCRC_WIDTH

#define FCN_XM_TXCRC_WIDTH   1

Definition at line 855 of file etherfabric.c.

◆ FCN_XM_AUTO_PAD_LBN

#define FCN_XM_AUTO_PAD_LBN   5

Definition at line 856 of file etherfabric.c.

◆ FCN_XM_AUTO_PAD_WIDTH

#define FCN_XM_AUTO_PAD_WIDTH   1

Definition at line 857 of file etherfabric.c.

◆ FCN_XM_TX_PRMBL_LBN

#define FCN_XM_TX_PRMBL_LBN   2

Definition at line 858 of file etherfabric.c.

◆ FCN_XM_TX_PRMBL_WIDTH

#define FCN_XM_TX_PRMBL_WIDTH   1

Definition at line 859 of file etherfabric.c.

◆ FCN_XM_TXEN_LBN

#define FCN_XM_TXEN_LBN   1

Definition at line 860 of file etherfabric.c.

◆ FCN_XM_TXEN_WIDTH

#define FCN_XM_TXEN_WIDTH   1

Definition at line 861 of file etherfabric.c.

◆ FCN_XM_RX_CFG_REG_MAC

#define FCN_XM_RX_CFG_REG_MAC   0x04

Definition at line 864 of file etherfabric.c.

Referenced by falcon_reconfigure_xmac().

◆ FCN_XM_PASS_CRC_ERR_LBN

#define FCN_XM_PASS_CRC_ERR_LBN   25

Definition at line 865 of file etherfabric.c.

◆ FCN_XM_PASS_CRC_ERR_WIDTH

#define FCN_XM_PASS_CRC_ERR_WIDTH   1

Definition at line 866 of file etherfabric.c.

◆ FCN_XM_AUTO_DEPAD_LBN

#define FCN_XM_AUTO_DEPAD_LBN   8

Definition at line 867 of file etherfabric.c.

◆ FCN_XM_AUTO_DEPAD_WIDTH

#define FCN_XM_AUTO_DEPAD_WIDTH   1

Definition at line 868 of file etherfabric.c.

◆ FCN_XM_RXEN_LBN

#define FCN_XM_RXEN_LBN   1

Definition at line 869 of file etherfabric.c.

◆ FCN_XM_RXEN_WIDTH

#define FCN_XM_RXEN_WIDTH   1

Definition at line 870 of file etherfabric.c.

◆ FCN_XM_MGT_INT_MSK_REG_MAC_B0

#define FCN_XM_MGT_INT_MSK_REG_MAC_B0   0x5

Definition at line 873 of file etherfabric.c.

Referenced by falcon_mask_status_intr().

◆ FCN_XM_MSK_PRMBLE_ERR_LBN

#define FCN_XM_MSK_PRMBLE_ERR_LBN   2

Definition at line 874 of file etherfabric.c.

◆ FCN_XM_MSK_PRMBLE_ERR_WIDTH

#define FCN_XM_MSK_PRMBLE_ERR_WIDTH   1

Definition at line 875 of file etherfabric.c.

◆ FCN_XM_MSK_RMTFLT_LBN

#define FCN_XM_MSK_RMTFLT_LBN   1

Definition at line 876 of file etherfabric.c.

◆ FCN_XM_MSK_RMTFLT_WIDTH

#define FCN_XM_MSK_RMTFLT_WIDTH   1

Definition at line 877 of file etherfabric.c.

◆ FCN_XM_MSK_LCLFLT_LBN

#define FCN_XM_MSK_LCLFLT_LBN   0

Definition at line 878 of file etherfabric.c.

◆ FCN_XM_MSK_LCLFLT_WIDTH

#define FCN_XM_MSK_LCLFLT_WIDTH   1

Definition at line 879 of file etherfabric.c.

◆ FCN_XM_FC_REG_MAC

#define FCN_XM_FC_REG_MAC   0x7

Definition at line 882 of file etherfabric.c.

Referenced by falcon_reconfigure_xmac().

◆ FCN_XM_PAUSE_TIME_LBN

#define FCN_XM_PAUSE_TIME_LBN   16

Definition at line 883 of file etherfabric.c.

◆ FCN_XM_PAUSE_TIME_WIDTH

#define FCN_XM_PAUSE_TIME_WIDTH   16

Definition at line 884 of file etherfabric.c.

◆ FCN_XM_DIS_FCNTL_LBN

#define FCN_XM_DIS_FCNTL_LBN   0

Definition at line 885 of file etherfabric.c.

◆ FCN_XM_DIS_FCNTL_WIDTH

#define FCN_XM_DIS_FCNTL_WIDTH   1

Definition at line 886 of file etherfabric.c.

◆ FCN_XM_TX_PARAM_REG_MAC

#define FCN_XM_TX_PARAM_REG_MAC   0x0d

Definition at line 889 of file etherfabric.c.

Referenced by falcon_reconfigure_xmac().

◆ FCN_XM_TX_JUMBO_MODE_LBN

#define FCN_XM_TX_JUMBO_MODE_LBN   31

Definition at line 890 of file etherfabric.c.

◆ FCN_XM_TX_JUMBO_MODE_WIDTH

#define FCN_XM_TX_JUMBO_MODE_WIDTH   1

Definition at line 891 of file etherfabric.c.

◆ FCN_XM_MAX_TX_FRM_SIZE_LBN

#define FCN_XM_MAX_TX_FRM_SIZE_LBN   16

Definition at line 892 of file etherfabric.c.

◆ FCN_XM_MAX_TX_FRM_SIZE_WIDTH

#define FCN_XM_MAX_TX_FRM_SIZE_WIDTH   14

Definition at line 893 of file etherfabric.c.

◆ FCN_XM_ACPT_ALL_MCAST_LBN

#define FCN_XM_ACPT_ALL_MCAST_LBN   11

Definition at line 894 of file etherfabric.c.

◆ FCN_XM_ACPT_ALL_MCAST_WIDTH

#define FCN_XM_ACPT_ALL_MCAST_WIDTH   1

Definition at line 895 of file etherfabric.c.

◆ FCN_XM_RX_PARAM_REG_MAC

#define FCN_XM_RX_PARAM_REG_MAC   0x0e

Definition at line 898 of file etherfabric.c.

Referenced by falcon_reconfigure_xmac().

◆ FCN_XM_MAX_RX_FRM_SIZE_LBN

#define FCN_XM_MAX_RX_FRM_SIZE_LBN   0

Definition at line 899 of file etherfabric.c.

◆ FCN_XM_MAX_RX_FRM_SIZE_WIDTH

#define FCN_XM_MAX_RX_FRM_SIZE_WIDTH   14

Definition at line 900 of file etherfabric.c.

◆ FCN_XM_MGT_INT_REG_MAC_B0

#define FCN_XM_MGT_INT_REG_MAC_B0   0x0f

Definition at line 903 of file etherfabric.c.

Referenced by falcon_mask_status_intr(), and falcon_xgmii_status().

◆ FCN_XM_PRMBLE_ERR

#define FCN_XM_PRMBLE_ERR   2

Definition at line 904 of file etherfabric.c.

◆ FCN_XM_PRMBLE_WIDTH

#define FCN_XM_PRMBLE_WIDTH   1

Definition at line 905 of file etherfabric.c.

◆ FCN_XM_RMTFLT_LBN

#define FCN_XM_RMTFLT_LBN   1

Definition at line 906 of file etherfabric.c.

◆ FCN_XM_RMTFLT_WIDTH

#define FCN_XM_RMTFLT_WIDTH   1

Definition at line 907 of file etherfabric.c.

◆ FCN_XM_LCLFLT_LBN

#define FCN_XM_LCLFLT_LBN   0

Definition at line 908 of file etherfabric.c.

◆ FCN_XM_LCLFLT_WIDTH

#define FCN_XM_LCLFLT_WIDTH   1

Definition at line 909 of file etherfabric.c.

◆ FCN_XX_ALIGN_DONE_LBN

#define FCN_XX_ALIGN_DONE_LBN   20

Definition at line 912 of file etherfabric.c.

◆ FCN_XX_ALIGN_DONE_WIDTH

#define FCN_XX_ALIGN_DONE_WIDTH   1

Definition at line 913 of file etherfabric.c.

◆ FCN_XX_CORE_STAT_REG_MAC

#define FCN_XX_CORE_STAT_REG_MAC   0x16

Definition at line 914 of file etherfabric.c.

Referenced by falcon_xaui_link_ok().

◆ FCN_XX_SYNC_STAT_LBN

#define FCN_XX_SYNC_STAT_LBN   16

Definition at line 915 of file etherfabric.c.

◆ FCN_XX_SYNC_STAT_WIDTH

#define FCN_XX_SYNC_STAT_WIDTH   4

Definition at line 916 of file etherfabric.c.

◆ FCN_XX_SYNC_STAT_DECODE_SYNCED

#define FCN_XX_SYNC_STAT_DECODE_SYNCED   0xf

Definition at line 917 of file etherfabric.c.

Referenced by falcon_xaui_link_ok().

◆ FCN_XX_COMMA_DET_LBN

#define FCN_XX_COMMA_DET_LBN   12

Definition at line 918 of file etherfabric.c.

◆ FCN_XX_COMMA_DET_WIDTH

#define FCN_XX_COMMA_DET_WIDTH   4

Definition at line 919 of file etherfabric.c.

◆ FCN_XX_COMMA_DET_RESET

#define FCN_XX_COMMA_DET_RESET   0xf

Definition at line 920 of file etherfabric.c.

Referenced by falcon_xaui_link_ok().

◆ FCN_XX_CHARERR_LBN

#define FCN_XX_CHARERR_LBN   4

Definition at line 921 of file etherfabric.c.

◆ FCN_XX_CHARERR_WIDTH

#define FCN_XX_CHARERR_WIDTH   4

Definition at line 922 of file etherfabric.c.

◆ FCN_XX_CHARERR_RESET

#define FCN_XX_CHARERR_RESET   0xf

Definition at line 923 of file etherfabric.c.

Referenced by falcon_xaui_link_ok().

◆ FCN_XX_DISPERR_LBN

#define FCN_XX_DISPERR_LBN   0

Definition at line 924 of file etherfabric.c.

◆ FCN_XX_DISPERR_WIDTH

#define FCN_XX_DISPERR_WIDTH   4

Definition at line 925 of file etherfabric.c.

◆ FCN_XX_DISPERR_RESET

#define FCN_XX_DISPERR_RESET   0xf

Definition at line 926 of file etherfabric.c.

Referenced by falcon_xaui_link_ok().

◆ FCN_XX_PWR_RST_REG_MAC

#define FCN_XX_PWR_RST_REG_MAC   0x10

Definition at line 929 of file etherfabric.c.

Referenced by falcon_reset_xaui(), and sfe4001_init().

◆ FCN_XX_PWRDND_EN_LBN

#define FCN_XX_PWRDND_EN_LBN   15

Definition at line 930 of file etherfabric.c.

◆ FCN_XX_PWRDND_EN_WIDTH

#define FCN_XX_PWRDND_EN_WIDTH   1

Definition at line 931 of file etherfabric.c.

◆ FCN_XX_PWRDNC_EN_LBN

#define FCN_XX_PWRDNC_EN_LBN   14

Definition at line 932 of file etherfabric.c.

◆ FCN_XX_PWRDNC_EN_WIDTH

#define FCN_XX_PWRDNC_EN_WIDTH   1

Definition at line 933 of file etherfabric.c.

◆ FCN_XX_PWRDNB_EN_LBN

#define FCN_XX_PWRDNB_EN_LBN   13

Definition at line 934 of file etherfabric.c.

◆ FCN_XX_PWRDNB_EN_WIDTH

#define FCN_XX_PWRDNB_EN_WIDTH   1

Definition at line 935 of file etherfabric.c.

◆ FCN_XX_PWRDNA_EN_LBN

#define FCN_XX_PWRDNA_EN_LBN   12

Definition at line 936 of file etherfabric.c.

◆ FCN_XX_PWRDNA_EN_WIDTH

#define FCN_XX_PWRDNA_EN_WIDTH   1

Definition at line 937 of file etherfabric.c.

◆ FCN_XX_RSTPLLCD_EN_LBN

#define FCN_XX_RSTPLLCD_EN_LBN   9

Definition at line 938 of file etherfabric.c.

◆ FCN_XX_RSTPLLCD_EN_WIDTH

#define FCN_XX_RSTPLLCD_EN_WIDTH   1

Definition at line 939 of file etherfabric.c.

◆ FCN_XX_RSTPLLAB_EN_LBN

#define FCN_XX_RSTPLLAB_EN_LBN   8

Definition at line 940 of file etherfabric.c.

◆ FCN_XX_RSTPLLAB_EN_WIDTH

#define FCN_XX_RSTPLLAB_EN_WIDTH   1

Definition at line 941 of file etherfabric.c.

◆ FCN_XX_RESETD_EN_LBN

#define FCN_XX_RESETD_EN_LBN   7

Definition at line 942 of file etherfabric.c.

◆ FCN_XX_RESETD_EN_WIDTH

#define FCN_XX_RESETD_EN_WIDTH   1

Definition at line 943 of file etherfabric.c.

◆ FCN_XX_RESETC_EN_LBN

#define FCN_XX_RESETC_EN_LBN   6

Definition at line 944 of file etherfabric.c.

◆ FCN_XX_RESETC_EN_WIDTH

#define FCN_XX_RESETC_EN_WIDTH   1

Definition at line 945 of file etherfabric.c.

◆ FCN_XX_RESETB_EN_LBN

#define FCN_XX_RESETB_EN_LBN   5

Definition at line 946 of file etherfabric.c.

◆ FCN_XX_RESETB_EN_WIDTH

#define FCN_XX_RESETB_EN_WIDTH   1

Definition at line 947 of file etherfabric.c.

◆ FCN_XX_RESETA_EN_LBN

#define FCN_XX_RESETA_EN_LBN   4

Definition at line 948 of file etherfabric.c.

◆ FCN_XX_RESETA_EN_WIDTH

#define FCN_XX_RESETA_EN_WIDTH   1

Definition at line 949 of file etherfabric.c.

◆ FCN_XX_RSTXGXSRX_EN_LBN

#define FCN_XX_RSTXGXSRX_EN_LBN   2

Definition at line 950 of file etherfabric.c.

◆ FCN_XX_RSTXGXSRX_EN_WIDTH

#define FCN_XX_RSTXGXSRX_EN_WIDTH   1

Definition at line 951 of file etherfabric.c.

◆ FCN_XX_RSTXGXSTX_EN_LBN

#define FCN_XX_RSTXGXSTX_EN_LBN   1

Definition at line 952 of file etherfabric.c.

◆ FCN_XX_RSTXGXSTX_EN_WIDTH

#define FCN_XX_RSTXGXSTX_EN_WIDTH   1

Definition at line 953 of file etherfabric.c.

◆ FCN_XX_RST_XX_EN_LBN

#define FCN_XX_RST_XX_EN_LBN   0

Definition at line 954 of file etherfabric.c.

◆ FCN_XX_RST_XX_EN_WIDTH

#define FCN_XX_RST_XX_EN_WIDTH   1

Definition at line 955 of file etherfabric.c.

◆ FCN_XX_SD_CTL_REG_MAC

#define FCN_XX_SD_CTL_REG_MAC   0x11

Definition at line 959 of file etherfabric.c.

Referenced by falcon_setup_xaui().

◆ FCN_XX_TERMADJ1_LBN

#define FCN_XX_TERMADJ1_LBN   17

Definition at line 960 of file etherfabric.c.

◆ FCN_XX_TERMADJ1_WIDTH

#define FCN_XX_TERMADJ1_WIDTH   1

Definition at line 961 of file etherfabric.c.

◆ FCN_XX_TERMADJ0_LBN

#define FCN_XX_TERMADJ0_LBN   16

Definition at line 962 of file etherfabric.c.

◆ FCN_XX_TERMADJ0_WIDTH

#define FCN_XX_TERMADJ0_WIDTH   1

Definition at line 963 of file etherfabric.c.

◆ FCN_XX_HIDRVD_LBN

#define FCN_XX_HIDRVD_LBN   15

Definition at line 964 of file etherfabric.c.

◆ FCN_XX_HIDRVD_WIDTH

#define FCN_XX_HIDRVD_WIDTH   1

Definition at line 965 of file etherfabric.c.

◆ FCN_XX_LODRVD_LBN

#define FCN_XX_LODRVD_LBN   14

Definition at line 966 of file etherfabric.c.

◆ FCN_XX_LODRVD_WIDTH

#define FCN_XX_LODRVD_WIDTH   1

Definition at line 967 of file etherfabric.c.

◆ FCN_XX_HIDRVC_LBN

#define FCN_XX_HIDRVC_LBN   13

Definition at line 968 of file etherfabric.c.

◆ FCN_XX_HIDRVC_WIDTH

#define FCN_XX_HIDRVC_WIDTH   1

Definition at line 969 of file etherfabric.c.

◆ FCN_XX_LODRVC_LBN

#define FCN_XX_LODRVC_LBN   12

Definition at line 970 of file etherfabric.c.

◆ FCN_XX_LODRVC_WIDTH

#define FCN_XX_LODRVC_WIDTH   1

Definition at line 971 of file etherfabric.c.

◆ FCN_XX_HIDRVB_LBN

#define FCN_XX_HIDRVB_LBN   11

Definition at line 972 of file etherfabric.c.

◆ FCN_XX_HIDRVB_WIDTH

#define FCN_XX_HIDRVB_WIDTH   1

Definition at line 973 of file etherfabric.c.

◆ FCN_XX_LODRVB_LBN

#define FCN_XX_LODRVB_LBN   10

Definition at line 974 of file etherfabric.c.

◆ FCN_XX_LODRVB_WIDTH

#define FCN_XX_LODRVB_WIDTH   1

Definition at line 975 of file etherfabric.c.

◆ FCN_XX_HIDRVA_LBN

#define FCN_XX_HIDRVA_LBN   9

Definition at line 976 of file etherfabric.c.

◆ FCN_XX_HIDRVA_WIDTH

#define FCN_XX_HIDRVA_WIDTH   1

Definition at line 977 of file etherfabric.c.

◆ FCN_XX_LODRVA_LBN

#define FCN_XX_LODRVA_LBN   8

Definition at line 978 of file etherfabric.c.

◆ FCN_XX_LODRVA_WIDTH

#define FCN_XX_LODRVA_WIDTH   1

Definition at line 979 of file etherfabric.c.

◆ FCN_XX_LPBKD_LBN

#define FCN_XX_LPBKD_LBN   3

Definition at line 980 of file etherfabric.c.

◆ FCN_XX_LPBKD_WIDTH

#define FCN_XX_LPBKD_WIDTH   1

Definition at line 981 of file etherfabric.c.

◆ FCN_XX_LPBKC_LBN

#define FCN_XX_LPBKC_LBN   2

Definition at line 982 of file etherfabric.c.

◆ FCN_XX_LPBKC_WIDTH

#define FCN_XX_LPBKC_WIDTH   1

Definition at line 983 of file etherfabric.c.

◆ FCN_XX_LPBKB_LBN

#define FCN_XX_LPBKB_LBN   1

Definition at line 984 of file etherfabric.c.

◆ FCN_XX_LPBKB_WIDTH

#define FCN_XX_LPBKB_WIDTH   1

Definition at line 985 of file etherfabric.c.

◆ FCN_XX_LPBKA_LBN

#define FCN_XX_LPBKA_LBN   0

Definition at line 986 of file etherfabric.c.

◆ FCN_XX_LPBKA_WIDTH

#define FCN_XX_LPBKA_WIDTH   1

Definition at line 987 of file etherfabric.c.

◆ FCN_XX_TXDRV_CTL_REG_MAC

#define FCN_XX_TXDRV_CTL_REG_MAC   0x12

Definition at line 989 of file etherfabric.c.

Referenced by falcon_setup_xaui().

◆ FCN_XX_DEQD_LBN

#define FCN_XX_DEQD_LBN   28

Definition at line 990 of file etherfabric.c.

◆ FCN_XX_DEQD_WIDTH

#define FCN_XX_DEQD_WIDTH   4

Definition at line 991 of file etherfabric.c.

◆ FCN_XX_DEQC_LBN

#define FCN_XX_DEQC_LBN   24

Definition at line 992 of file etherfabric.c.

◆ FCN_XX_DEQC_WIDTH

#define FCN_XX_DEQC_WIDTH   4

Definition at line 993 of file etherfabric.c.

◆ FCN_XX_DEQB_LBN

#define FCN_XX_DEQB_LBN   20

Definition at line 994 of file etherfabric.c.

◆ FCN_XX_DEQB_WIDTH

#define FCN_XX_DEQB_WIDTH   4

Definition at line 995 of file etherfabric.c.

◆ FCN_XX_DEQA_LBN

#define FCN_XX_DEQA_LBN   16

Definition at line 996 of file etherfabric.c.

◆ FCN_XX_DEQA_WIDTH

#define FCN_XX_DEQA_WIDTH   4

Definition at line 997 of file etherfabric.c.

◆ FCN_XX_DTXD_LBN

#define FCN_XX_DTXD_LBN   12

Definition at line 998 of file etherfabric.c.

◆ FCN_XX_DTXD_WIDTH

#define FCN_XX_DTXD_WIDTH   4

Definition at line 999 of file etherfabric.c.

◆ FCN_XX_DTXC_LBN

#define FCN_XX_DTXC_LBN   8

Definition at line 1000 of file etherfabric.c.

◆ FCN_XX_DTXC_WIDTH

#define FCN_XX_DTXC_WIDTH   4

Definition at line 1001 of file etherfabric.c.

◆ FCN_XX_DTXB_LBN

#define FCN_XX_DTXB_LBN   4

Definition at line 1002 of file etherfabric.c.

◆ FCN_XX_DTXB_WIDTH

#define FCN_XX_DTXB_WIDTH   4

Definition at line 1003 of file etherfabric.c.

◆ FCN_XX_DTXA_LBN

#define FCN_XX_DTXA_LBN   0

Definition at line 1004 of file etherfabric.c.

◆ FCN_XX_DTXA_WIDTH

#define FCN_XX_DTXA_WIDTH   4

Definition at line 1005 of file etherfabric.c.

◆ FCN_RX_FILTER_TBL0

#define FCN_RX_FILTER_TBL0   0xF00000

Definition at line 1008 of file etherfabric.c.

Referenced by clear_b0_fpga_memories().

◆ FCN_RX_DESC_PTR_TBL_KER_A1

#define FCN_RX_DESC_PTR_TBL_KER_A1   0x11800

Definition at line 1011 of file etherfabric.c.

◆ FCN_RX_DESC_PTR_TBL_KER_B0

#define FCN_RX_DESC_PTR_TBL_KER_B0   0xF40000

Definition at line 1012 of file etherfabric.c.

◆ FCN_RX_ISCSI_DDIG_EN_LBN

#define FCN_RX_ISCSI_DDIG_EN_LBN   88

Definition at line 1013 of file etherfabric.c.

◆ FCN_RX_ISCSI_DDIG_EN_WIDTH

#define FCN_RX_ISCSI_DDIG_EN_WIDTH   1

Definition at line 1014 of file etherfabric.c.

◆ FCN_RX_ISCSI_HDIG_EN_LBN

#define FCN_RX_ISCSI_HDIG_EN_LBN   87

Definition at line 1015 of file etherfabric.c.

◆ FCN_RX_ISCSI_HDIG_EN_WIDTH

#define FCN_RX_ISCSI_HDIG_EN_WIDTH   1

Definition at line 1016 of file etherfabric.c.

◆ FCN_RX_DESCQ_BUF_BASE_ID_LBN

#define FCN_RX_DESCQ_BUF_BASE_ID_LBN   36

Definition at line 1017 of file etherfabric.c.

◆ FCN_RX_DESCQ_BUF_BASE_ID_WIDTH

#define FCN_RX_DESCQ_BUF_BASE_ID_WIDTH   20

Definition at line 1018 of file etherfabric.c.

◆ FCN_RX_DESCQ_EVQ_ID_LBN

#define FCN_RX_DESCQ_EVQ_ID_LBN   24

Definition at line 1019 of file etherfabric.c.

◆ FCN_RX_DESCQ_EVQ_ID_WIDTH

#define FCN_RX_DESCQ_EVQ_ID_WIDTH   12

Definition at line 1020 of file etherfabric.c.

◆ FCN_RX_DESCQ_OWNER_ID_LBN

#define FCN_RX_DESCQ_OWNER_ID_LBN   10

Definition at line 1021 of file etherfabric.c.

◆ FCN_RX_DESCQ_OWNER_ID_WIDTH

#define FCN_RX_DESCQ_OWNER_ID_WIDTH   14

Definition at line 1022 of file etherfabric.c.

◆ FCN_RX_DESCQ_SIZE_LBN

#define FCN_RX_DESCQ_SIZE_LBN   3

Definition at line 1023 of file etherfabric.c.

◆ FCN_RX_DESCQ_SIZE_WIDTH

#define FCN_RX_DESCQ_SIZE_WIDTH   2

Definition at line 1024 of file etherfabric.c.

◆ FCN_RX_DESCQ_SIZE_4K

#define FCN_RX_DESCQ_SIZE_4K   3

Definition at line 1025 of file etherfabric.c.

◆ FCN_RX_DESCQ_SIZE_2K

#define FCN_RX_DESCQ_SIZE_2K   2

Definition at line 1026 of file etherfabric.c.

◆ FCN_RX_DESCQ_SIZE_1K

#define FCN_RX_DESCQ_SIZE_1K   1

Definition at line 1027 of file etherfabric.c.

◆ FCN_RX_DESCQ_SIZE_512

#define FCN_RX_DESCQ_SIZE_512   0

Definition at line 1028 of file etherfabric.c.

◆ FCN_RX_DESCQ_TYPE_LBN

#define FCN_RX_DESCQ_TYPE_LBN   2

Definition at line 1029 of file etherfabric.c.

◆ FCN_RX_DESCQ_TYPE_WIDTH

#define FCN_RX_DESCQ_TYPE_WIDTH   1

Definition at line 1030 of file etherfabric.c.

◆ FCN_RX_DESCQ_JUMBO_LBN

#define FCN_RX_DESCQ_JUMBO_LBN   1

Definition at line 1031 of file etherfabric.c.

◆ FCN_RX_DESCQ_JUMBO_WIDTH

#define FCN_RX_DESCQ_JUMBO_WIDTH   1

Definition at line 1032 of file etherfabric.c.

◆ FCN_RX_DESCQ_EN_LBN

#define FCN_RX_DESCQ_EN_LBN   0

Definition at line 1033 of file etherfabric.c.

◆ FCN_RX_DESCQ_EN_WIDTH

#define FCN_RX_DESCQ_EN_WIDTH   1

Definition at line 1034 of file etherfabric.c.

◆ FCN_TX_DESC_PTR_TBL_KER_A1

#define FCN_TX_DESC_PTR_TBL_KER_A1   0x11900

Definition at line 1037 of file etherfabric.c.

◆ FCN_TX_DESC_PTR_TBL_KER_B0

#define FCN_TX_DESC_PTR_TBL_KER_B0   0xF50000

Definition at line 1038 of file etherfabric.c.

◆ FCN_TX_NON_IP_DROP_DIS_B0_LBN

#define FCN_TX_NON_IP_DROP_DIS_B0_LBN   91

Definition at line 1039 of file etherfabric.c.

◆ FCN_TX_NON_IP_DROP_DIS_B0_WIDTH

#define FCN_TX_NON_IP_DROP_DIS_B0_WIDTH   1

Definition at line 1040 of file etherfabric.c.

◆ FCN_TX_DESCQ_EN_LBN

#define FCN_TX_DESCQ_EN_LBN   88

Definition at line 1041 of file etherfabric.c.

◆ FCN_TX_DESCQ_EN_WIDTH

#define FCN_TX_DESCQ_EN_WIDTH   1

Definition at line 1042 of file etherfabric.c.

◆ FCN_TX_ISCSI_DDIG_EN_LBN

#define FCN_TX_ISCSI_DDIG_EN_LBN   87

Definition at line 1043 of file etherfabric.c.

◆ FCN_TX_ISCSI_DDIG_EN_WIDTH

#define FCN_TX_ISCSI_DDIG_EN_WIDTH   1

Definition at line 1044 of file etherfabric.c.

◆ FCN_TX_ISCSI_HDIG_EN_LBN

#define FCN_TX_ISCSI_HDIG_EN_LBN   86

Definition at line 1045 of file etherfabric.c.

◆ FCN_TX_ISCSI_HDIG_EN_WIDTH

#define FCN_TX_ISCSI_HDIG_EN_WIDTH   1

Definition at line 1046 of file etherfabric.c.

◆ FCN_TX_DESCQ_BUF_BASE_ID_LBN

#define FCN_TX_DESCQ_BUF_BASE_ID_LBN   36

Definition at line 1047 of file etherfabric.c.

◆ FCN_TX_DESCQ_BUF_BASE_ID_WIDTH

#define FCN_TX_DESCQ_BUF_BASE_ID_WIDTH   20

Definition at line 1048 of file etherfabric.c.

◆ FCN_TX_DESCQ_EVQ_ID_LBN

#define FCN_TX_DESCQ_EVQ_ID_LBN   24

Definition at line 1049 of file etherfabric.c.

◆ FCN_TX_DESCQ_EVQ_ID_WIDTH

#define FCN_TX_DESCQ_EVQ_ID_WIDTH   12

Definition at line 1050 of file etherfabric.c.

◆ FCN_TX_DESCQ_OWNER_ID_LBN

#define FCN_TX_DESCQ_OWNER_ID_LBN   10

Definition at line 1051 of file etherfabric.c.

◆ FCN_TX_DESCQ_OWNER_ID_WIDTH

#define FCN_TX_DESCQ_OWNER_ID_WIDTH   14

Definition at line 1052 of file etherfabric.c.

◆ FCN_TX_DESCQ_SIZE_LBN

#define FCN_TX_DESCQ_SIZE_LBN   3

Definition at line 1053 of file etherfabric.c.

◆ FCN_TX_DESCQ_SIZE_WIDTH

#define FCN_TX_DESCQ_SIZE_WIDTH   2

Definition at line 1054 of file etherfabric.c.

◆ FCN_TX_DESCQ_SIZE_4K

#define FCN_TX_DESCQ_SIZE_4K   3

Definition at line 1055 of file etherfabric.c.

◆ FCN_TX_DESCQ_SIZE_2K

#define FCN_TX_DESCQ_SIZE_2K   2

Definition at line 1056 of file etherfabric.c.

◆ FCN_TX_DESCQ_SIZE_1K

#define FCN_TX_DESCQ_SIZE_1K   1

Definition at line 1057 of file etherfabric.c.

◆ FCN_TX_DESCQ_SIZE_512

#define FCN_TX_DESCQ_SIZE_512   0

Definition at line 1058 of file etherfabric.c.

◆ FCN_TX_DESCQ_TYPE_LBN

#define FCN_TX_DESCQ_TYPE_LBN   1

Definition at line 1059 of file etherfabric.c.

◆ FCN_TX_DESCQ_TYPE_WIDTH

#define FCN_TX_DESCQ_TYPE_WIDTH   2

Definition at line 1060 of file etherfabric.c.

◆ FCN_TX_DESCQ_FLUSH_LBN

#define FCN_TX_DESCQ_FLUSH_LBN   0

Definition at line 1061 of file etherfabric.c.

◆ FCN_TX_DESCQ_FLUSH_WIDTH

#define FCN_TX_DESCQ_FLUSH_WIDTH   1

Definition at line 1062 of file etherfabric.c.

◆ FCN_EVQ_PTR_TBL_KER_A1

#define FCN_EVQ_PTR_TBL_KER_A1   0x11a00

Definition at line 1065 of file etherfabric.c.

◆ FCN_EVQ_PTR_TBL_KER_B0

#define FCN_EVQ_PTR_TBL_KER_B0   0xf60000

Definition at line 1066 of file etherfabric.c.

◆ FCN_EVQ_EN_LBN

#define FCN_EVQ_EN_LBN   23

Definition at line 1067 of file etherfabric.c.

◆ FCN_EVQ_EN_WIDTH

#define FCN_EVQ_EN_WIDTH   1

Definition at line 1068 of file etherfabric.c.

◆ FCN_EVQ_SIZE_LBN

#define FCN_EVQ_SIZE_LBN   20

Definition at line 1069 of file etherfabric.c.

◆ FCN_EVQ_SIZE_WIDTH

#define FCN_EVQ_SIZE_WIDTH   3

Definition at line 1070 of file etherfabric.c.

◆ FCN_EVQ_SIZE_32K

#define FCN_EVQ_SIZE_32K   6

Definition at line 1071 of file etherfabric.c.

◆ FCN_EVQ_SIZE_16K

#define FCN_EVQ_SIZE_16K   5

Definition at line 1072 of file etherfabric.c.

◆ FCN_EVQ_SIZE_8K

#define FCN_EVQ_SIZE_8K   4

Definition at line 1073 of file etherfabric.c.

◆ FCN_EVQ_SIZE_4K

#define FCN_EVQ_SIZE_4K   3

Definition at line 1074 of file etherfabric.c.

◆ FCN_EVQ_SIZE_2K

#define FCN_EVQ_SIZE_2K   2

Definition at line 1075 of file etherfabric.c.

◆ FCN_EVQ_SIZE_1K

#define FCN_EVQ_SIZE_1K   1

Definition at line 1076 of file etherfabric.c.

◆ FCN_EVQ_SIZE_512

#define FCN_EVQ_SIZE_512   0

Definition at line 1077 of file etherfabric.c.

◆ FCN_EVQ_BUF_BASE_ID_LBN

#define FCN_EVQ_BUF_BASE_ID_LBN   0

Definition at line 1078 of file etherfabric.c.

◆ FCN_EVQ_BUF_BASE_ID_WIDTH

#define FCN_EVQ_BUF_BASE_ID_WIDTH   20

Definition at line 1079 of file etherfabric.c.

◆ FCN_RX_RSS_INDIR_TBL_B0

#define FCN_RX_RSS_INDIR_TBL_B0   0xFB0000

Definition at line 1082 of file etherfabric.c.

Referenced by clear_b0_fpga_memories().

◆ FCN_EVQ_RPTR_REG_KER_A1

#define FCN_EVQ_RPTR_REG_KER_A1   0x11b00

Definition at line 1085 of file etherfabric.c.

◆ FCN_EVQ_RPTR_REG_KER_B0

#define FCN_EVQ_RPTR_REG_KER_B0   0xfa0000

Definition at line 1086 of file etherfabric.c.

◆ FCN_EVQ_RPTR_LBN

#define FCN_EVQ_RPTR_LBN   0

Definition at line 1087 of file etherfabric.c.

◆ FCN_EVQ_RPTR_WIDTH

#define FCN_EVQ_RPTR_WIDTH   14

Definition at line 1088 of file etherfabric.c.

◆ FCN_EVQ_RPTR_REG_KER_DWORD_A1

#define FCN_EVQ_RPTR_REG_KER_DWORD_A1   ( FCN_EVQ_RPTR_REG_KER_A1 + 0 )

Definition at line 1089 of file etherfabric.c.

◆ FCN_EVQ_RPTR_REG_KER_DWORD_B0

#define FCN_EVQ_RPTR_REG_KER_DWORD_B0   ( FCN_EVQ_RPTR_REG_KER_B0 + 0 )

Definition at line 1090 of file etherfabric.c.

◆ FCN_EVQ_RPTR_DWORD_LBN

#define FCN_EVQ_RPTR_DWORD_LBN   0

Definition at line 1091 of file etherfabric.c.

◆ FCN_EVQ_RPTR_DWORD_WIDTH

#define FCN_EVQ_RPTR_DWORD_WIDTH   14

Definition at line 1092 of file etherfabric.c.

◆ FCN_BUF_FULL_TBL_KER_A1

#define FCN_BUF_FULL_TBL_KER_A1   0x18000

Definition at line 1095 of file etherfabric.c.

◆ FCN_BUF_FULL_TBL_KER_B0

#define FCN_BUF_FULL_TBL_KER_B0   0x800000

Definition at line 1096 of file etherfabric.c.

◆ FCN_IP_DAT_BUF_SIZE_LBN

#define FCN_IP_DAT_BUF_SIZE_LBN   50

Definition at line 1097 of file etherfabric.c.

◆ FCN_IP_DAT_BUF_SIZE_WIDTH

#define FCN_IP_DAT_BUF_SIZE_WIDTH   1

Definition at line 1098 of file etherfabric.c.

◆ FCN_IP_DAT_BUF_SIZE_8K

#define FCN_IP_DAT_BUF_SIZE_8K   1

Definition at line 1099 of file etherfabric.c.

◆ FCN_IP_DAT_BUF_SIZE_4K

#define FCN_IP_DAT_BUF_SIZE_4K   0

Definition at line 1100 of file etherfabric.c.

Referenced by falcon_alloc_special_buffer().

◆ FCN_BUF_ADR_FBUF_LBN

#define FCN_BUF_ADR_FBUF_LBN   14

Definition at line 1101 of file etherfabric.c.

◆ FCN_BUF_ADR_FBUF_WIDTH

#define FCN_BUF_ADR_FBUF_WIDTH   34

Definition at line 1102 of file etherfabric.c.

◆ FCN_BUF_OWNER_ID_FBUF_LBN

#define FCN_BUF_OWNER_ID_FBUF_LBN   0

Definition at line 1103 of file etherfabric.c.

◆ FCN_BUF_OWNER_ID_FBUF_WIDTH

#define FCN_BUF_OWNER_ID_FBUF_WIDTH   14

Definition at line 1104 of file etherfabric.c.

◆ FALCON_GMAC_REG

#define FALCON_GMAC_REG ( efab,
mac_reg )
Value:
( (mac_reg) * FALCON_GMAC_REG_SIZE ) )
#define FALCON_GMAC_REGBANK
#define FALCON_GMAC_REG_SIZE

Offset of a GMAC register within Falcon.

Definition at line 1107 of file etherfabric.c.

1107#define FALCON_GMAC_REG( efab, mac_reg ) \
1108 ( FALCON_GMAC_REGBANK + \
1109 ( (mac_reg) * FALCON_GMAC_REG_SIZE ) )

Referenced by falcon_gmac_readl(), and falcon_gmac_writel().

◆ FALCON_XMAC_REG

#define FALCON_XMAC_REG ( efab_port,
mac_reg )
Value:
( (mac_reg) * FALCON_XMAC_REG_SIZE ) )
#define FALCON_XMAC_REGBANK
#define FALCON_XMAC_REG_SIZE

Offset of an XMAC register within Falcon.

Definition at line 1112 of file etherfabric.c.

1112#define FALCON_XMAC_REG( efab_port, mac_reg ) \
1113 ( FALCON_XMAC_REGBANK + \
1114 ( (mac_reg) * FALCON_XMAC_REG_SIZE ) )

Referenced by falcon_xmac_readl(), and falcon_xmac_writel().

◆ FCN_MAC_DATA_LBN

#define FCN_MAC_DATA_LBN   0

Definition at line 1116 of file etherfabric.c.

◆ FCN_MAC_DATA_WIDTH

#define FCN_MAC_DATA_WIDTH   32

Definition at line 1117 of file etherfabric.c.

◆ FCN_TX_KER_PORT_LBN

#define FCN_TX_KER_PORT_LBN   63

Definition at line 1120 of file etherfabric.c.

◆ FCN_TX_KER_PORT_WIDTH

#define FCN_TX_KER_PORT_WIDTH   1

Definition at line 1121 of file etherfabric.c.

◆ FCN_TX_KER_BYTE_CNT_LBN

#define FCN_TX_KER_BYTE_CNT_LBN   48

Definition at line 1122 of file etherfabric.c.

◆ FCN_TX_KER_BYTE_CNT_WIDTH

#define FCN_TX_KER_BYTE_CNT_WIDTH   14

Definition at line 1123 of file etherfabric.c.

◆ FCN_TX_KER_BUF_ADR_LBN

#define FCN_TX_KER_BUF_ADR_LBN   0

Definition at line 1124 of file etherfabric.c.

◆ FCN_TX_KER_BUF_ADR_WIDTH

#define FCN_TX_KER_BUF_ADR_WIDTH   EFAB_DMA_TYPE_WIDTH ( 46 )

Definition at line 1125 of file etherfabric.c.

◆ FCN_RX_KER_BUF_SIZE_LBN

#define FCN_RX_KER_BUF_SIZE_LBN   48

Definition at line 1129 of file etherfabric.c.

◆ FCN_RX_KER_BUF_SIZE_WIDTH

#define FCN_RX_KER_BUF_SIZE_WIDTH   14

Definition at line 1130 of file etherfabric.c.

◆ FCN_RX_KER_BUF_ADR_LBN

#define FCN_RX_KER_BUF_ADR_LBN   0

Definition at line 1131 of file etherfabric.c.

◆ FCN_RX_KER_BUF_ADR_WIDTH

#define FCN_RX_KER_BUF_ADR_WIDTH   EFAB_DMA_TYPE_WIDTH ( 46 )

Definition at line 1132 of file etherfabric.c.

◆ FCN_EV_CODE_LBN

#define FCN_EV_CODE_LBN   60

Definition at line 1135 of file etherfabric.c.

◆ FCN_EV_CODE_WIDTH

#define FCN_EV_CODE_WIDTH   4

Definition at line 1136 of file etherfabric.c.

◆ FCN_RX_IP_EV_DECODE

#define FCN_RX_IP_EV_DECODE   0

Definition at line 1137 of file etherfabric.c.

Referenced by falcon_handle_event().

◆ FCN_TX_IP_EV_DECODE

#define FCN_TX_IP_EV_DECODE   2

Definition at line 1138 of file etherfabric.c.

Referenced by falcon_handle_event().

◆ FCN_DRIVER_EV_DECODE

#define FCN_DRIVER_EV_DECODE   5

Definition at line 1139 of file etherfabric.c.

◆ FCN_RX_EV_PKT_OK_LBN

#define FCN_RX_EV_PKT_OK_LBN   56

Definition at line 1142 of file etherfabric.c.

◆ FCN_RX_EV_PKT_OK_WIDTH

#define FCN_RX_EV_PKT_OK_WIDTH   1

Definition at line 1143 of file etherfabric.c.

◆ FCN_RX_PORT_LBN

#define FCN_RX_PORT_LBN   30

Definition at line 1144 of file etherfabric.c.

◆ FCN_RX_PORT_WIDTH

#define FCN_RX_PORT_WIDTH   1

Definition at line 1145 of file etherfabric.c.

◆ FCN_RX_EV_BYTE_CNT_LBN

#define FCN_RX_EV_BYTE_CNT_LBN   16

Definition at line 1146 of file etherfabric.c.

◆ FCN_RX_EV_BYTE_CNT_WIDTH

#define FCN_RX_EV_BYTE_CNT_WIDTH   14

Definition at line 1147 of file etherfabric.c.

◆ FCN_RX_EV_DESC_PTR_LBN

#define FCN_RX_EV_DESC_PTR_LBN   0

Definition at line 1148 of file etherfabric.c.

◆ FCN_RX_EV_DESC_PTR_WIDTH

#define FCN_RX_EV_DESC_PTR_WIDTH   12

Definition at line 1149 of file etherfabric.c.

◆ FCN_TX_EV_DESC_PTR_LBN

#define FCN_TX_EV_DESC_PTR_LBN   0

Definition at line 1152 of file etherfabric.c.

◆ FCN_TX_EV_DESC_PTR_WIDTH

#define FCN_TX_EV_DESC_PTR_WIDTH   12

Definition at line 1153 of file etherfabric.c.

◆ FCN_REVISION_REG

#define FCN_REVISION_REG ( efab,
reg )
Value:
( ( efab->pci_revision == FALCON_REV_B0 ) ? reg ## _B0 : reg ## _A1 )
#define FALCON_REV_B0
static unsigned int unsigned int reg
Definition myson.h:162

Definition at line 1163 of file etherfabric.c.

1163#define FCN_REVISION_REG(efab, reg) \
1164 ( ( efab->pci_revision == FALCON_REV_B0 ) ? reg ## _B0 : reg ## _A1 )

Referenced by falcon_eventq_read_ack(), falcon_fini_resources(), falcon_init_resources(), falcon_read_sram(), and falcon_write_sram().

◆ EFAB_SET_OWORD_FIELD_VER

#define EFAB_SET_OWORD_FIELD_VER ( efab,
reg,
field,
val )
Value:
if ( efab->pci_revision == FALCON_REV_B0 ) \
EFAB_SET_OWORD_FIELD ( reg, field ## _B0, val ); \
else \
EFAB_SET_OWORD_FIELD ( reg, field ## _A1, val );
void __asmcall int val
Definition setjmp.h:12

Definition at line 1166 of file etherfabric.c.

1166#define EFAB_SET_OWORD_FIELD_VER(efab, reg, field, val) \
1167 if ( efab->pci_revision == FALCON_REV_B0 ) \
1168 EFAB_SET_OWORD_FIELD ( reg, field ## _B0, val ); \
1169 else \
1170 EFAB_SET_OWORD_FIELD ( reg, field ## _A1, val );

Referenced by falcon_setup_nic().

◆ _falcon_writel

#define _falcon_writel ( efab,
value,
reg )
Value:
writel ( (value), (efab)->membase + (reg) )
pseudo_bit_t value[0x00020]
Definition arbel.h:2
#define writel
Definition w89c840.c:160

Definition at line 1190 of file etherfabric.c.

1190#define _falcon_writel( efab, value, reg ) \
1191 writel ( (value), (efab)->membase + (reg) )

Referenced by clear_b0_fpga_memories(), falcon_write(), falcon_write_sram(), and falcon_writel().

◆ _falcon_readl

#define _falcon_readl ( efab,
reg )
Value:
readl ( (efab)->membase + (reg) )
#define readl
Definition w89c840.c:157

Definition at line 1192 of file etherfabric.c.

Referenced by falcon_read(), falcon_read_sram(), and falcon_readl().

◆ FCN_DUMP_REG

#define FCN_DUMP_REG ( efab,
_reg )
Value:
do { \
falcon_read ( efab, &reg, _reg ); \
EFAB_LOG ( #_reg " = " EFAB_OWORD_FMT "\n", \
} while ( 0 );
#define EFAB_OWORD_FMT
Format string for printing an efab_oword_t.
#define EFAB_OWORD_VAL(oword)
printk parameters for printing an efab_oword_t
union efab_oword efab_oword_t
An octword (eight-word, i.e.

Definition at line 1292 of file etherfabric.c.

1292#define FCN_DUMP_REG( efab, _reg ) do { \
1293 efab_oword_t reg; \
1294 falcon_read ( efab, &reg, _reg ); \
1295 EFAB_LOG ( #_reg " = " EFAB_OWORD_FMT "\n", \
1296 EFAB_OWORD_VAL ( reg ) ); \
1297 } while ( 0 );

◆ FCN_DUMP_MAC_REG

#define FCN_DUMP_MAC_REG ( efab,
_mac_reg )
Value:
do { \
efab->mac_op->mac_readl ( efab, &reg, _mac_reg ); \
EFAB_LOG ( #_mac_reg " = " EFAB_DWORD_FMT "\n", \
} while ( 0 );
union efab_dword efab_dword_t
A doubleword (i.e.
#define EFAB_DWORD_VAL(dword)
printk parameters for printing an efab_dword_t
#define EFAB_DWORD_FMT
Format string for printing an efab_dword_t.

Definition at line 1299 of file etherfabric.c.

1299#define FCN_DUMP_MAC_REG( efab, _mac_reg ) do { \
1300 efab_dword_t reg; \
1301 efab->mac_op->mac_readl ( efab, &reg, _mac_reg ); \
1302 EFAB_LOG ( #_mac_reg " = " EFAB_DWORD_FMT "\n", \
1303 EFAB_DWORD_VAL ( reg ) ); \
1304 } while ( 0 );

◆ FALCON_SPI_MAX_LEN

#define FALCON_SPI_MAX_LEN   16

Maximum length for a single SPI transaction.

Definition at line 1398 of file etherfabric.c.

Referenced by falcon_init_spi_device(), and falcon_spi_rw().

◆ GM_CFG1_REG_MAC

#define GM_CFG1_REG_MAC   0x00

Definition at line 1750 of file etherfabric.c.

Referenced by mentormac_init(), and mentormac_reset().

◆ GM_SW_RST_LBN

#define GM_SW_RST_LBN   31

Definition at line 1751 of file etherfabric.c.

◆ GM_SW_RST_WIDTH

#define GM_SW_RST_WIDTH   1

Definition at line 1752 of file etherfabric.c.

◆ GM_RX_FC_EN_LBN

#define GM_RX_FC_EN_LBN   5

Definition at line 1753 of file etherfabric.c.

◆ GM_RX_FC_EN_WIDTH

#define GM_RX_FC_EN_WIDTH   1

Definition at line 1754 of file etherfabric.c.

◆ GM_TX_FC_EN_LBN

#define GM_TX_FC_EN_LBN   4

Definition at line 1755 of file etherfabric.c.

◆ GM_TX_FC_EN_WIDTH

#define GM_TX_FC_EN_WIDTH   1

Definition at line 1756 of file etherfabric.c.

◆ GM_RX_EN_LBN

#define GM_RX_EN_LBN   2

Definition at line 1757 of file etherfabric.c.

◆ GM_RX_EN_WIDTH

#define GM_RX_EN_WIDTH   1

Definition at line 1758 of file etherfabric.c.

◆ GM_TX_EN_LBN

#define GM_TX_EN_LBN   0

Definition at line 1759 of file etherfabric.c.

◆ GM_TX_EN_WIDTH

#define GM_TX_EN_WIDTH   1

Definition at line 1760 of file etherfabric.c.

◆ GM_CFG2_REG_MAC

#define GM_CFG2_REG_MAC   0x01

Definition at line 1763 of file etherfabric.c.

Referenced by mentormac_init().

◆ GM_PAMBL_LEN_LBN

#define GM_PAMBL_LEN_LBN   12

Definition at line 1764 of file etherfabric.c.

◆ GM_PAMBL_LEN_WIDTH

#define GM_PAMBL_LEN_WIDTH   4

Definition at line 1765 of file etherfabric.c.

◆ GM_IF_MODE_LBN

#define GM_IF_MODE_LBN   8

Definition at line 1766 of file etherfabric.c.

◆ GM_IF_MODE_WIDTH

#define GM_IF_MODE_WIDTH   2

Definition at line 1767 of file etherfabric.c.

◆ GM_PAD_CRC_EN_LBN

#define GM_PAD_CRC_EN_LBN   2

Definition at line 1768 of file etherfabric.c.

◆ GM_PAD_CRC_EN_WIDTH

#define GM_PAD_CRC_EN_WIDTH   1

Definition at line 1769 of file etherfabric.c.

◆ GM_FD_LBN

#define GM_FD_LBN   0

Definition at line 1770 of file etherfabric.c.

◆ GM_FD_WIDTH

#define GM_FD_WIDTH   1

Definition at line 1771 of file etherfabric.c.

◆ GM_MAX_FLEN_REG_MAC

#define GM_MAX_FLEN_REG_MAC   0x04

Definition at line 1774 of file etherfabric.c.

Referenced by mentormac_init().

◆ GM_MAX_FLEN_LBN

#define GM_MAX_FLEN_LBN   0

Definition at line 1775 of file etherfabric.c.

◆ GM_MAX_FLEN_WIDTH

#define GM_MAX_FLEN_WIDTH   16

Definition at line 1776 of file etherfabric.c.

◆ GM_MII_MGMT_CFG_REG_MAC

#define GM_MII_MGMT_CFG_REG_MAC   0x08

Definition at line 1779 of file etherfabric.c.

Referenced by mentormac_reset().

◆ GM_MGMT_CLK_SEL_LBN

#define GM_MGMT_CLK_SEL_LBN   0

Definition at line 1780 of file etherfabric.c.

◆ GM_MGMT_CLK_SEL_WIDTH

#define GM_MGMT_CLK_SEL_WIDTH   3

Definition at line 1781 of file etherfabric.c.

◆ GM_MII_MGMT_CMD_REG_MAC

#define GM_MII_MGMT_CMD_REG_MAC   0x09

Definition at line 1784 of file etherfabric.c.

◆ GM_MGMT_SCAN_CYC_LBN

#define GM_MGMT_SCAN_CYC_LBN   1

Definition at line 1785 of file etherfabric.c.

◆ GM_MGMT_SCAN_CYC_WIDTH

#define GM_MGMT_SCAN_CYC_WIDTH   1

Definition at line 1786 of file etherfabric.c.

◆ GM_MGMT_RD_CYC_LBN

#define GM_MGMT_RD_CYC_LBN   0

Definition at line 1787 of file etherfabric.c.

◆ GM_MGMT_RD_CYC_WIDTH

#define GM_MGMT_RD_CYC_WIDTH   1

Definition at line 1788 of file etherfabric.c.

◆ GM_MII_MGMT_ADR_REG_MAC

#define GM_MII_MGMT_ADR_REG_MAC   0x0a

Definition at line 1791 of file etherfabric.c.

◆ GM_MGMT_PHY_ADDR_LBN

#define GM_MGMT_PHY_ADDR_LBN   8

Definition at line 1792 of file etherfabric.c.

◆ GM_MGMT_PHY_ADDR_WIDTH

#define GM_MGMT_PHY_ADDR_WIDTH   5

Definition at line 1793 of file etherfabric.c.

◆ GM_MGMT_REG_ADDR_LBN

#define GM_MGMT_REG_ADDR_LBN   0

Definition at line 1794 of file etherfabric.c.

◆ GM_MGMT_REG_ADDR_WIDTH

#define GM_MGMT_REG_ADDR_WIDTH   5

Definition at line 1795 of file etherfabric.c.

◆ GM_MII_MGMT_CTL_REG_MAC

#define GM_MII_MGMT_CTL_REG_MAC   0x0b

Definition at line 1798 of file etherfabric.c.

◆ GM_MGMT_CTL_LBN

#define GM_MGMT_CTL_LBN   0

Definition at line 1799 of file etherfabric.c.

◆ GM_MGMT_CTL_WIDTH

#define GM_MGMT_CTL_WIDTH   16

Definition at line 1800 of file etherfabric.c.

◆ GM_MII_MGMT_STAT_REG_MAC

#define GM_MII_MGMT_STAT_REG_MAC   0x0c

Definition at line 1803 of file etherfabric.c.

◆ GM_MGMT_STAT_LBN

#define GM_MGMT_STAT_LBN   0

Definition at line 1804 of file etherfabric.c.

◆ GM_MGMT_STAT_WIDTH

#define GM_MGMT_STAT_WIDTH   16

Definition at line 1805 of file etherfabric.c.

◆ GM_MII_MGMT_IND_REG_MAC

#define GM_MII_MGMT_IND_REG_MAC   0x0d

Definition at line 1808 of file etherfabric.c.

◆ GM_MGMT_BUSY_LBN

#define GM_MGMT_BUSY_LBN   0

Definition at line 1809 of file etherfabric.c.

◆ GM_MGMT_BUSY_WIDTH

#define GM_MGMT_BUSY_WIDTH   1

Definition at line 1810 of file etherfabric.c.

◆ GM_ADR1_REG_MAC

#define GM_ADR1_REG_MAC   0x10

Definition at line 1813 of file etherfabric.c.

Referenced by mentormac_init().

◆ GM_HWADDR_5_LBN

#define GM_HWADDR_5_LBN   24

Definition at line 1814 of file etherfabric.c.

◆ GM_HWADDR_5_WIDTH

#define GM_HWADDR_5_WIDTH   8

Definition at line 1815 of file etherfabric.c.

◆ GM_HWADDR_4_LBN

#define GM_HWADDR_4_LBN   16

Definition at line 1816 of file etherfabric.c.

◆ GM_HWADDR_4_WIDTH

#define GM_HWADDR_4_WIDTH   8

Definition at line 1817 of file etherfabric.c.

◆ GM_HWADDR_3_LBN

#define GM_HWADDR_3_LBN   8

Definition at line 1818 of file etherfabric.c.

◆ GM_HWADDR_3_WIDTH

#define GM_HWADDR_3_WIDTH   8

Definition at line 1819 of file etherfabric.c.

◆ GM_HWADDR_2_LBN

#define GM_HWADDR_2_LBN   0

Definition at line 1820 of file etherfabric.c.

◆ GM_HWADDR_2_WIDTH

#define GM_HWADDR_2_WIDTH   8

Definition at line 1821 of file etherfabric.c.

◆ GM_ADR2_REG_MAC

#define GM_ADR2_REG_MAC   0x11

Definition at line 1824 of file etherfabric.c.

Referenced by mentormac_init().

◆ GM_HWADDR_1_LBN

#define GM_HWADDR_1_LBN   24

Definition at line 1825 of file etherfabric.c.

◆ GM_HWADDR_1_WIDTH

#define GM_HWADDR_1_WIDTH   8

Definition at line 1826 of file etherfabric.c.

◆ GM_HWADDR_0_LBN

#define GM_HWADDR_0_LBN   16

Definition at line 1827 of file etherfabric.c.

◆ GM_HWADDR_0_WIDTH

#define GM_HWADDR_0_WIDTH   8

Definition at line 1828 of file etherfabric.c.

◆ GMF_CFG0_REG_MAC

#define GMF_CFG0_REG_MAC   0x12

Definition at line 1831 of file etherfabric.c.

Referenced by mentormac_init().

◆ GMF_FTFENREQ_LBN

#define GMF_FTFENREQ_LBN   12

Definition at line 1832 of file etherfabric.c.

◆ GMF_FTFENREQ_WIDTH

#define GMF_FTFENREQ_WIDTH   1

Definition at line 1833 of file etherfabric.c.

◆ GMF_STFENREQ_LBN

#define GMF_STFENREQ_LBN   11

Definition at line 1834 of file etherfabric.c.

◆ GMF_STFENREQ_WIDTH

#define GMF_STFENREQ_WIDTH   1

Definition at line 1835 of file etherfabric.c.

◆ GMF_FRFENREQ_LBN

#define GMF_FRFENREQ_LBN   10

Definition at line 1836 of file etherfabric.c.

◆ GMF_FRFENREQ_WIDTH

#define GMF_FRFENREQ_WIDTH   1

Definition at line 1837 of file etherfabric.c.

◆ GMF_SRFENREQ_LBN

#define GMF_SRFENREQ_LBN   9

Definition at line 1838 of file etherfabric.c.

◆ GMF_SRFENREQ_WIDTH

#define GMF_SRFENREQ_WIDTH   1

Definition at line 1839 of file etherfabric.c.

◆ GMF_WTMENREQ_LBN

#define GMF_WTMENREQ_LBN   8

Definition at line 1840 of file etherfabric.c.

◆ GMF_WTMENREQ_WIDTH

#define GMF_WTMENREQ_WIDTH   1

Definition at line 1841 of file etherfabric.c.

◆ GMF_CFG1_REG_MAC

#define GMF_CFG1_REG_MAC   0x13

Definition at line 1844 of file etherfabric.c.

Referenced by mentormac_init().

◆ GMF_CFGFRTH_LBN

#define GMF_CFGFRTH_LBN   16

Definition at line 1845 of file etherfabric.c.

◆ GMF_CFGFRTH_WIDTH

#define GMF_CFGFRTH_WIDTH   5

Definition at line 1846 of file etherfabric.c.

◆ GMF_CFGXOFFRTX_LBN

#define GMF_CFGXOFFRTX_LBN   0

Definition at line 1847 of file etherfabric.c.

◆ GMF_CFGXOFFRTX_WIDTH

#define GMF_CFGXOFFRTX_WIDTH   16

Definition at line 1848 of file etherfabric.c.

◆ GMF_CFG2_REG_MAC

#define GMF_CFG2_REG_MAC   0x14

Definition at line 1851 of file etherfabric.c.

Referenced by mentormac_init().

◆ GMF_CFGHWM_LBN

#define GMF_CFGHWM_LBN   16

Definition at line 1852 of file etherfabric.c.

◆ GMF_CFGHWM_WIDTH

#define GMF_CFGHWM_WIDTH   6

Definition at line 1853 of file etherfabric.c.

◆ GMF_CFGLWM_LBN

#define GMF_CFGLWM_LBN   0

Definition at line 1854 of file etherfabric.c.

◆ GMF_CFGLWM_WIDTH

#define GMF_CFGLWM_WIDTH   6

Definition at line 1855 of file etherfabric.c.

◆ GMF_CFG3_REG_MAC

#define GMF_CFG3_REG_MAC   0x15

Definition at line 1858 of file etherfabric.c.

Referenced by mentormac_init().

◆ GMF_CFGHWMFT_LBN

#define GMF_CFGHWMFT_LBN   16

Definition at line 1859 of file etherfabric.c.

◆ GMF_CFGHWMFT_WIDTH

#define GMF_CFGHWMFT_WIDTH   6

Definition at line 1860 of file etherfabric.c.

◆ GMF_CFGFTTH_LBN

#define GMF_CFGFTTH_LBN   0

Definition at line 1861 of file etherfabric.c.

◆ GMF_CFGFTTH_WIDTH

#define GMF_CFGFTTH_WIDTH   6

Definition at line 1862 of file etherfabric.c.

◆ GMF_CFG4_REG_MAC

#define GMF_CFG4_REG_MAC   0x16

Definition at line 1865 of file etherfabric.c.

Referenced by mentormac_init().

◆ GMF_HSTFLTRFRM_PAUSE_LBN

#define GMF_HSTFLTRFRM_PAUSE_LBN   12

Definition at line 1866 of file etherfabric.c.

◆ GMF_HSTFLTRFRM_PAUSE_WIDTH

#define GMF_HSTFLTRFRM_PAUSE_WIDTH   12

Definition at line 1867 of file etherfabric.c.

◆ GMF_CFG5_REG_MAC

#define GMF_CFG5_REG_MAC   0x17

Definition at line 1870 of file etherfabric.c.

Referenced by mentormac_init().

◆ GMF_CFGHDPLX_LBN

#define GMF_CFGHDPLX_LBN   22

Definition at line 1871 of file etherfabric.c.

◆ GMF_CFGHDPLX_WIDTH

#define GMF_CFGHDPLX_WIDTH   1

Definition at line 1872 of file etherfabric.c.

◆ GMF_CFGBYTMODE_LBN

#define GMF_CFGBYTMODE_LBN   19

Definition at line 1873 of file etherfabric.c.

◆ GMF_CFGBYTMODE_WIDTH

#define GMF_CFGBYTMODE_WIDTH   1

Definition at line 1874 of file etherfabric.c.

◆ GMF_HSTDRPLT64_LBN

#define GMF_HSTDRPLT64_LBN   18

Definition at line 1875 of file etherfabric.c.

◆ GMF_HSTDRPLT64_WIDTH

#define GMF_HSTDRPLT64_WIDTH   1

Definition at line 1876 of file etherfabric.c.

◆ GMF_HSTFLTRFRMDC_PAUSE_LBN

#define GMF_HSTFLTRFRMDC_PAUSE_LBN   12

Definition at line 1877 of file etherfabric.c.

◆ GMF_HSTFLTRFRMDC_PAUSE_WIDTH

#define GMF_HSTFLTRFRMDC_PAUSE_WIDTH   1

Definition at line 1878 of file etherfabric.c.

◆ XFP_REQUIRED_DEVS

#define XFP_REQUIRED_DEVS
Value:
#define MDIO_MMDREG_DEVS0_PMAPMD
#define MDIO_MMDREG_DEVS0_PCS
#define MDIO_MMDREG_DEVS0_PHYXS

Definition at line 2455 of file etherfabric.c.

2455#define XFP_REQUIRED_DEVS ( MDIO_MMDREG_DEVS0_PCS | \
2456 MDIO_MMDREG_DEVS0_PMAPMD | \
2457 MDIO_MMDREG_DEVS0_PHYXS )

◆ TXC_GLRGS_GLCMD

#define TXC_GLRGS_GLCMD   (0xc004)

Definition at line 2489 of file etherfabric.c.

Referenced by falcon_txc_logic_reset().

◆ TXC_GLCMD_LMTSWRST_LBN

#define TXC_GLCMD_LMTSWRST_LBN   (14)

Definition at line 2490 of file etherfabric.c.

Referenced by falcon_txc_logic_reset().

◆ TXC_ALRGS_ATXAMP0

#define TXC_ALRGS_ATXAMP0   (0xc041)

Definition at line 2493 of file etherfabric.c.

Referenced by falcon_txc_phy_init().

◆ TXC_ALRGS_ATXAMP1

#define TXC_ALRGS_ATXAMP1   (0xc042)

Definition at line 2494 of file etherfabric.c.

Referenced by falcon_txc_phy_init().

◆ TXC_ATXAMP_LANE02_LBN

#define TXC_ATXAMP_LANE02_LBN   (3)

Definition at line 2496 of file etherfabric.c.

◆ TXC_ATXAMP_LANE13_LBN

#define TXC_ATXAMP_LANE13_LBN   (11)

Definition at line 2497 of file etherfabric.c.

◆ TXC_ATXAMP_1280_mV

#define TXC_ATXAMP_1280_mV   (0)

Definition at line 2499 of file etherfabric.c.

◆ TXC_ATXAMP_1200_mV

#define TXC_ATXAMP_1200_mV   (8)

Definition at line 2500 of file etherfabric.c.

◆ TXC_ATXAMP_1120_mV

#define TXC_ATXAMP_1120_mV   (12)

Definition at line 2501 of file etherfabric.c.

◆ TXC_ATXAMP_1060_mV

#define TXC_ATXAMP_1060_mV   (14)

Definition at line 2502 of file etherfabric.c.

◆ TXC_ATXAMP_0820_mV

#define TXC_ATXAMP_0820_mV   (25)

Definition at line 2503 of file etherfabric.c.

◆ TXC_ATXAMP_0720_mV

#define TXC_ATXAMP_0720_mV   (26)

Definition at line 2504 of file etherfabric.c.

◆ TXC_ATXAMP_0580_mV

#define TXC_ATXAMP_0580_mV   (27)

Definition at line 2505 of file etherfabric.c.

◆ TXC_ATXAMP_0440_mV

#define TXC_ATXAMP_0440_mV   (28)

Definition at line 2506 of file etherfabric.c.

◆ TXC_ATXAMP_0820_BOTH

#define TXC_ATXAMP_0820_BOTH
Value:
#define TXC_ATXAMP_LANE13_LBN
#define TXC_ATXAMP_LANE02_LBN
#define TXC_ATXAMP_0820_mV

Definition at line 2508 of file etherfabric.c.

2508#define TXC_ATXAMP_0820_BOTH ( (TXC_ATXAMP_0820_mV << TXC_ATXAMP_LANE02_LBN) | \
2509 (TXC_ATXAMP_0820_mV << TXC_ATXAMP_LANE13_LBN) )

Referenced by falcon_txc_phy_init().

◆ TXC_ATXAMP_DEFAULT

#define TXC_ATXAMP_DEFAULT   (0x6060) /* From databook */

Definition at line 2511 of file etherfabric.c.

Referenced by falcon_txc_phy_init().

◆ TXC_ALRGS_ATXPRE0

#define TXC_ALRGS_ATXPRE0   (0xc043)

Definition at line 2514 of file etherfabric.c.

Referenced by falcon_txc_phy_init().

◆ TXC_ALRGS_ATXPRE1

#define TXC_ALRGS_ATXPRE1   (0xc044)

Definition at line 2515 of file etherfabric.c.

Referenced by falcon_txc_phy_init().

◆ TXC_ATXPRE_NONE

#define TXC_ATXPRE_NONE   (0)

Definition at line 2517 of file etherfabric.c.

Referenced by falcon_txc_phy_init().

◆ TXC_ATXPRE_DEFAULT

#define TXC_ATXPRE_DEFAULT   (0x1010) /* From databook */

Definition at line 2518 of file etherfabric.c.

Referenced by falcon_txc_phy_init().

◆ TXC_REQUIRED_DEVS

#define TXC_REQUIRED_DEVS
Value:

Definition at line 2520 of file etherfabric.c.

2520#define TXC_REQUIRED_DEVS ( MDIO_MMDREG_DEVS0_PCS | \
2521 MDIO_MMDREG_DEVS0_PMAPMD | \
2522 MDIO_MMDREG_DEVS0_PHYXS )

◆ TENXPRESS_REQUIRED_DEVS

#define TENXPRESS_REQUIRED_DEVS
Value:

Definition at line 2618 of file etherfabric.c.

2618#define TENXPRESS_REQUIRED_DEVS ( MDIO_MMDREG_DEVS0_PMAPMD | \
2619 MDIO_MMDREG_DEVS0_PCS | \
2620 MDIO_MMDREG_DEVS0_PHYXS )

◆ PCS_TEST_SELECT_REG

#define PCS_TEST_SELECT_REG   0xd807 /* PRM 10.5.8 */

Definition at line 2622 of file etherfabric.c.

Referenced by falcon_tenxpress_phy_init().

◆ CLK312_EN_LBN

#define CLK312_EN_LBN   3

Definition at line 2623 of file etherfabric.c.

Referenced by falcon_tenxpress_phy_init().

◆ CLK312_EN_WIDTH

#define CLK312_EN_WIDTH   1

Definition at line 2624 of file etherfabric.c.

◆ PCS_CLOCK_CTRL_REG

#define PCS_CLOCK_CTRL_REG   0xd801

Definition at line 2626 of file etherfabric.c.

◆ PLL312_RST_N_LBN

#define PLL312_RST_N_LBN   2

Definition at line 2627 of file etherfabric.c.

◆ PMA_PMD_EXT_CTRL_REG

#define PMA_PMD_EXT_CTRL_REG   49152

Definition at line 2630 of file etherfabric.c.

◆ PMA_PMD_EXT_SSR_LBN

#define PMA_PMD_EXT_SSR_LBN   15

Definition at line 2631 of file etherfabric.c.

◆ PCS_BOOT_STATUS_REG

#define PCS_BOOT_STATUS_REG   0xd000

Definition at line 2634 of file etherfabric.c.

Referenced by falcon_tenxpress_check_c11().

◆ PCS_BOOT_FATAL_ERR_LBN

#define PCS_BOOT_FATAL_ERR_LBN   0

Definition at line 2635 of file etherfabric.c.

◆ PCS_BOOT_PROGRESS_LBN

#define PCS_BOOT_PROGRESS_LBN   1

Definition at line 2636 of file etherfabric.c.

◆ PCS_BOOT_PROGRESS_WIDTH

#define PCS_BOOT_PROGRESS_WIDTH   2

Definition at line 2637 of file etherfabric.c.

◆ PCS_BOOT_COMPLETE_LBN

#define PCS_BOOT_COMPLETE_LBN   3

Definition at line 2638 of file etherfabric.c.

Referenced by falcon_tenxpress_check_c11().

◆ PCS_SOFT_RST2_REG

#define PCS_SOFT_RST2_REG   0xd806

Definition at line 2640 of file etherfabric.c.

◆ SERDES_RST_N_LBN

#define SERDES_RST_N_LBN   13

Definition at line 2641 of file etherfabric.c.

◆ XGXS_RST_N_LBN

#define XGXS_RST_N_LBN   12

Definition at line 2642 of file etherfabric.c.

◆ PM8358_REQUIRED_DEVS

#define PM8358_REQUIRED_DEVS   (MDIO_MMDREG_DEVS0_DTEXS)

Definition at line 2714 of file etherfabric.c.

◆ PMC_MASTER_REG

#define PMC_MASTER_REG   (0xd000)

Definition at line 2718 of file etherfabric.c.

Referenced by falcon_pm8358_phy_init().

◆ PMC_MASTER_ANLG_CTRL

#define PMC_MASTER_ANLG_CTRL   (1<< 11)

Definition at line 2720 of file etherfabric.c.

Referenced by falcon_pm8358_phy_init().

◆ PMC_MCONF2_REG

#define PMC_MCONF2_REG   (0xd002)

Definition at line 2723 of file etherfabric.c.

Referenced by falcon_pm8358_phy_init().

◆ PMC_MCONF2_TEDGE

#define PMC_MCONF2_TEDGE   (1 << 2)

Definition at line 2725 of file etherfabric.c.

Referenced by falcon_pm8358_phy_init().

◆ PMC_MCONF2_REDGE

#define PMC_MCONF2_REDGE   (1 << 3)

Definition at line 2727 of file etherfabric.c.

Referenced by falcon_pm8358_phy_init().

◆ PMC_ANALOG_RX_CFG0

#define PMC_ANALOG_RX_CFG0   (0xd025)

Definition at line 2730 of file etherfabric.c.

Referenced by falcon_pm8358_phy_init().

◆ PMC_ANALOG_RX_CFG1

#define PMC_ANALOG_RX_CFG1   (0xd02d)

Definition at line 2731 of file etherfabric.c.

◆ PMC_ANALOG_RX_CFG2

#define PMC_ANALOG_RX_CFG2   (0xd035)

Definition at line 2732 of file etherfabric.c.

◆ PMC_ANALOG_RX_CFG3

#define PMC_ANALOG_RX_CFG3   (0xd03d)

Definition at line 2733 of file etherfabric.c.

◆ PMC_ANALOG_RX_TERM

#define PMC_ANALOG_RX_TERM
Value:
(1 << 15) /* Bit 15 of RX CFG: 0 for 100 ohms float,
1 for 50 to 1.2V */

Definition at line 2736 of file etherfabric.c.

◆ PMC_ANALOG_RX_EQ_MASK

#define PMC_ANALOG_RX_EQ_MASK   (3 << 8)

Definition at line 2737 of file etherfabric.c.

Referenced by falcon_pm8358_phy_init().

◆ PMC_ANALOG_RX_EQ_NONE

#define PMC_ANALOG_RX_EQ_NONE   (0 << 8)

Definition at line 2738 of file etherfabric.c.

◆ PMC_ANALOG_RX_EQ_HALF

#define PMC_ANALOG_RX_EQ_HALF   (1 << 8)

Definition at line 2739 of file etherfabric.c.

◆ PMC_ANALOG_RX_EQ_FULL

#define PMC_ANALOG_RX_EQ_FULL   (2 << 8)

Definition at line 2740 of file etherfabric.c.

Referenced by falcon_pm8358_phy_init().

◆ PMC_ANALOG_RX_EQ_RSVD

#define PMC_ANALOG_RX_EQ_RSVD   (3 << 8)

Definition at line 2741 of file etherfabric.c.

◆ MAX_TEMP_THRESH

#define MAX_TEMP_THRESH   90

Definition at line 2790 of file etherfabric.c.

Referenced by sfe4001_init().

◆ PCA9539

#define PCA9539   0x74

Definition at line 2793 of file etherfabric.c.

◆ P0_IN

#define P0_IN   0x00

Definition at line 2795 of file etherfabric.c.

◆ P0_OUT

#define P0_OUT   0x02

Definition at line 2796 of file etherfabric.c.

Referenced by sfe4001_fini(), and sfe4001_init().

◆ P0_CONFIG

#define P0_CONFIG   0x06

Definition at line 2797 of file etherfabric.c.

Referenced by sfe4001_fini(), and sfe4001_init().

◆ P0_EN_1V0X_LBN

#define P0_EN_1V0X_LBN   0

Definition at line 2799 of file etherfabric.c.

Referenced by sfe4001_init().

◆ P0_EN_1V0X_WIDTH

#define P0_EN_1V0X_WIDTH   1

Definition at line 2800 of file etherfabric.c.

◆ P0_EN_1V2_LBN

#define P0_EN_1V2_LBN   1

Definition at line 2801 of file etherfabric.c.

Referenced by sfe4001_init().

◆ P0_EN_1V2_WIDTH

#define P0_EN_1V2_WIDTH   1

Definition at line 2802 of file etherfabric.c.

◆ P0_EN_2V5_LBN

#define P0_EN_2V5_LBN   2

Definition at line 2803 of file etherfabric.c.

Referenced by sfe4001_init().

◆ P0_EN_2V5_WIDTH

#define P0_EN_2V5_WIDTH   1

Definition at line 2804 of file etherfabric.c.

◆ P0_EN_3V3X_LBN

#define P0_EN_3V3X_LBN   3

Definition at line 2805 of file etherfabric.c.

Referenced by sfe4001_init().

◆ P0_EN_3V3X_WIDTH

#define P0_EN_3V3X_WIDTH   1

Definition at line 2806 of file etherfabric.c.

◆ P0_EN_5V_LBN

#define P0_EN_5V_LBN   4

Definition at line 2807 of file etherfabric.c.

Referenced by sfe4001_init().

◆ P0_EN_5V_WIDTH

#define P0_EN_5V_WIDTH   1

Definition at line 2808 of file etherfabric.c.

◆ P0_X_TRST_LBN

#define P0_X_TRST_LBN   6

Definition at line 2809 of file etherfabric.c.

Referenced by sfe4001_init().

◆ P0_X_TRST_WIDTH

#define P0_X_TRST_WIDTH   1

Definition at line 2810 of file etherfabric.c.

◆ P1_IN

#define P1_IN   0x01

Definition at line 2812 of file etherfabric.c.

Referenced by sfe4001_init().

◆ P1_CONFIG

#define P1_CONFIG   0x07

Definition at line 2813 of file etherfabric.c.

Referenced by sfe4001_fini(), and sfe4001_init().

◆ P1_AFE_PWD_LBN

#define P1_AFE_PWD_LBN   0

Definition at line 2815 of file etherfabric.c.

Referenced by sfe4001_init().

◆ P1_AFE_PWD_WIDTH

#define P1_AFE_PWD_WIDTH   1

Definition at line 2816 of file etherfabric.c.

◆ P1_DSP_PWD25_LBN

#define P1_DSP_PWD25_LBN   1

Definition at line 2817 of file etherfabric.c.

◆ P1_DSP_PWD25_WIDTH

#define P1_DSP_PWD25_WIDTH   1

Definition at line 2818 of file etherfabric.c.

◆ P1_SPARE_LBN

#define P1_SPARE_LBN   4

Definition at line 2819 of file etherfabric.c.

Referenced by sfe4001_init().

◆ P1_SPARE_WIDTH

#define P1_SPARE_WIDTH   4

Definition at line 2820 of file etherfabric.c.

◆ MAX6647

#define MAX6647   0x4e

Definition at line 2823 of file etherfabric.c.

◆ RSL

#define RSL   0x02

Definition at line 2825 of file etherfabric.c.

Referenced by sfe4001_fini(), and sfe4001_init().

◆ RLHN

#define RLHN   0x05

Definition at line 2826 of file etherfabric.c.

Referenced by sfe4001_init().

◆ WLHO

#define WLHO   0x0b

Definition at line 2827 of file etherfabric.c.

Referenced by sfe4001_init().

◆ FALCON_MAC_ADDRESS_OFFSET

#define FALCON_MAC_ADDRESS_OFFSET   0x310

Offset of MAC address within EEPROM or Flash.

Definition at line 3144 of file etherfabric.c.

Referenced by falcon_probe_nvram().

◆ SF_NV_CONFIG_BASE

#define SF_NV_CONFIG_BASE   0x300

Definition at line 3149 of file etherfabric.c.

Referenced by falcon_probe_nvram().

◆ SF_NV_CONFIG_EXTRA

#define SF_NV_CONFIG_EXTRA   0xA0

Definition at line 3150 of file etherfabric.c.

Referenced by falcon_probe_nvram().

◆ BOARD_TYPE

#define BOARD_TYPE ( _rev)
Value:
(_rev >> 8)

Definition at line 3172 of file etherfabric.c.

Referenced by falcon_probe_nvram().

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL_ANY )

◆ falcon_mdio_write()

void falcon_mdio_write ( struct efab_nic * efab,
int device,
int location,
int value )
static

Definition at line 1591 of file etherfabric.c.

1593{
1595
1596 EFAB_TRACE ( "Writing GMII %d register %02x with %04x\n",
1597 device, location, value );
1598
1599 /* Check MII not currently being accessed */
1600 if ( falcon_gmii_wait ( efab ) )
1601 return;
1602
1603 /* Write the address/ID register */
1604 EFAB_POPULATE_OWORD_1 ( reg, FCN_MD_PHY_ADR, location );
1606
1607 if ( efab->phy_10g ) {
1608 /* clause45 */
1610 FCN_MD_PRT_ADR, efab->phy_addr,
1611 FCN_MD_DEV_ADR, device );
1612 }
1613 else {
1614 /* clause22 */
1615 assert ( device == 0 );
1616
1618 FCN_MD_PRT_ADR, efab->phy_addr,
1619 FCN_MD_DEV_ADR, location );
1620 }
1622
1623
1624 /* Write data */
1625 EFAB_POPULATE_OWORD_1 ( reg, FCN_MD_TXD, value );
1627
1629 FCN_MD_WRC, 1,
1630 FCN_MD_GC, ( efab->phy_10g ? 0 : 1 ) );
1632
1633 /* Wait for data to be written */
1634 if ( falcon_gmii_wait ( efab ) ) {
1635 /* Abort the write operation */
1637 FCN_MD_WRC, 0,
1638 FCN_MD_GC, 1);
1640 udelay(10);
1641 }
1642}
#define assert(condition)
Assert a condition at run-time.
Definition assert.h:50
#define FCN_MD_TXD_REG_KER
#define FCN_MD_ID_REG_KER
#define EFAB_TRACE(...)
Definition etherfabric.c:48
static int falcon_gmii_wait(struct efab_nic *efab)
#define FCN_MD_PHY_ADR_REG_KER
static void falcon_write(struct efab_nic *efab, efab_oword_t *value, unsigned int reg)
Write to a Falcon register.
#define FCN_MD_CS_REG_KER
#define EFAB_POPULATE_OWORD_2(oword,...)
#define EFAB_POPULATE_OWORD_1(oword,...)
A hardware device.
Definition device.h:77
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
Definition timer.c:61

References assert, EFAB_POPULATE_OWORD_1, EFAB_POPULATE_OWORD_2, EFAB_TRACE, falcon_gmii_wait(), falcon_write(), FCN_MD_CS_REG_KER, FCN_MD_ID_REG_KER, FCN_MD_PHY_ADR_REG_KER, FCN_MD_TXD_REG_KER, efab_nic::phy_10g, efab_nic::phy_addr, reg, udelay(), and value.

Referenced by falcon_pm8358_phy_init(), falcon_tenxpress_phy_init(), falcon_txc_logic_reset(), falcon_txc_phy_init(), and mdio_clause45_reset_mmd().

◆ falcon_mdio_read()

int falcon_mdio_read ( struct efab_nic * efab,
int device,
int location )
static

Definition at line 1645 of file etherfabric.c.

1646{
1648 int value;
1649
1650 /* Check MII not currently being accessed */
1651 if ( falcon_gmii_wait ( efab ) )
1652 return -1;
1653
1654 if ( efab->phy_10g ) {
1655 /* clause45 */
1656 EFAB_POPULATE_OWORD_1 ( reg, FCN_MD_PHY_ADR, location );
1658
1660 FCN_MD_PRT_ADR, efab->phy_addr,
1661 FCN_MD_DEV_ADR, device );
1663
1664 /* request data to be read */
1666 FCN_MD_RDC, 1,
1667 FCN_MD_GC, 0 );
1668 }
1669 else {
1670 /* clause22 */
1671 assert ( device == 0 );
1672
1674 FCN_MD_PRT_ADR, efab->phy_addr,
1675 FCN_MD_DEV_ADR, location );
1677
1678 /* Request data to be read */
1680 FCN_MD_RIC, 1,
1681 FCN_MD_GC, 1 );
1682 }
1683
1685
1686 /* Wait for data to become available */
1687 if ( falcon_gmii_wait ( efab ) ) {
1688 /* Abort the read operation */
1690 FCN_MD_RIC, 0,
1691 FCN_MD_GC, 1 );
1693 udelay ( 10 );
1694 value = -1;
1695 }
1696 else {
1697 /* Read the data */
1699 value = EFAB_OWORD_FIELD ( reg, FCN_MD_RXD );
1700 }
1701
1702 EFAB_TRACE ( "Read from GMII %d register %02x, got %04x\n",
1703 device, location, value );
1704
1705 return value;
1706}
static void falcon_read(struct efab_nic *efab, efab_oword_t *value, unsigned int reg)
Read from a Falcon register.
#define FCN_MD_RXD_REG_KER
#define EFAB_OWORD_FIELD

References assert, EFAB_OWORD_FIELD, EFAB_POPULATE_OWORD_1, EFAB_POPULATE_OWORD_2, EFAB_TRACE, falcon_gmii_wait(), falcon_read(), falcon_write(), FCN_MD_CS_REG_KER, FCN_MD_ID_REG_KER, FCN_MD_PHY_ADR_REG_KER, FCN_MD_RXD_REG_KER, efab_nic::phy_10g, efab_nic::phy_addr, reg, udelay(), and value.

Referenced by falcon_pm8358_phy_init(), falcon_tenxpress_check_c11(), falcon_txc_logic_reset(), falcon_xaui_link_ok(), gmii_autoneg_advertised(), gmii_autoneg_lpa(), gmii_link_ok(), mdio_clause45_check_mmds(), mdio_clause45_links_ok(), mdio_clause45_reset_mmd(), and mdio_clause45_wait_reset_mmds().

◆ gmii_autoneg_advertised()

unsigned int gmii_autoneg_advertised ( struct efab_nic * efab)
static

Retrieve GMII autonegotiation advertised abilities.

Definition at line 114 of file etherfabric.c.

115{
116 unsigned int mii_advertise;
117 unsigned int gmii_advertise;
118
119 /* Extended bits are in bits 8 and 9 of MII_CTRL1000 */
120 mii_advertise = falcon_mdio_read ( efab, 0, MII_ADVERTISE );
121 gmii_advertise = ( ( falcon_mdio_read ( efab, 0, MII_CTRL1000 ) >> 8 )
122 & 0x03 );
123 return ( ( gmii_advertise << 16 ) | mii_advertise );
124}
#define MII_ADVERTISE
Definition atl1e.h:875
static int falcon_mdio_read(struct efab_nic *efab, int device, int location)
#define MII_CTRL1000
Definition mii.h:25

References falcon_mdio_read(), MII_ADVERTISE, and MII_CTRL1000.

Referenced by alaska_init().

◆ gmii_autoneg_lpa()

unsigned int gmii_autoneg_lpa ( struct efab_nic * efab)
static

Retrieve GMII autonegotiation link partner abilities.

Definition at line 131 of file etherfabric.c.

132{
133 unsigned int mii_lpa;
134 unsigned int gmii_lpa;
135
136 /* Extended bits are in bits 10 and 11 of MII_STAT1000 */
137 mii_lpa = falcon_mdio_read ( efab, 0, MII_LPA );
138 gmii_lpa = ( falcon_mdio_read ( efab, 0, MII_STAT1000 ) >> 10 ) & 0x03;
139 return ( ( gmii_lpa << 16 ) | mii_lpa );
140}
#define MII_LPA
Definition atl1e.h:876
#define MII_STAT1000
Definition mii.h:26

References falcon_mdio_read(), MII_LPA, and MII_STAT1000.

Referenced by alaska_init().

◆ gmii_nway_result()

unsigned int gmii_nway_result ( unsigned int negotiated)
static

Calculate GMII autonegotiated link technology.

Definition at line 147 of file etherfabric.c.

148{
149 unsigned int other_bits;
150
151 /* Mask out the speed and duplexity bits */
152 other_bits = negotiated & LPA_OTHER;
153
154 if ( negotiated & LPA_EF_1000FULL )
155 return ( other_bits | LPA_EF_1000FULL );
156 else if ( negotiated & LPA_EF_1000HALF )
157 return ( other_bits | LPA_EF_1000HALF );
158 else if ( negotiated & LPA_100FULL )
159 return ( other_bits | LPA_100FULL );
160 else if ( negotiated & LPA_100BASE4 )
161 return ( other_bits | LPA_100BASE4 );
162 else if ( negotiated & LPA_100HALF )
163 return ( other_bits | LPA_100HALF );
164 else if ( negotiated & LPA_10FULL )
165 return ( other_bits | LPA_10FULL );
166 else return ( other_bits | LPA_10HALF );
167}
#define LPA_OTHER
#define LPA_100BASE4
Definition mii.h:106

References LPA_100BASE4, LPA_100FULL, LPA_100HALF, LPA_10FULL, LPA_10HALF, LPA_EF_1000FULL, LPA_EF_1000HALF, and LPA_OTHER.

Referenced by alaska_init().

◆ gmii_link_ok()

int gmii_link_ok ( struct efab_nic * efab)
static

Check GMII PHY link status.

Definition at line 174 of file etherfabric.c.

175{
176 int status;
177 int phy_status;
178
179 /* BMSR is latching - it returns "link down" if the link has
180 * been down at any point since the last read. To get a
181 * real-time status, we therefore read the register twice and
182 * use the result of the second read.
183 */
184 (void) falcon_mdio_read ( efab, 0, MII_BMSR );
185 status = falcon_mdio_read ( efab, 0, MII_BMSR );
186
187 /* Read the PHY-specific Status Register. This is
188 * non-latching, so we need do only a single read.
189 */
190 phy_status = falcon_mdio_read ( efab, 0, GMII_PSSR );
191
192 return ( ( status & BMSR_LSTATUS ) && ( phy_status & PSSR_LSTATUS ) );
193}
#define MII_BMSR
Definition atl1e.h:872
uint8_t status
Status.
Definition ena.h:5
#define GMII_PSSR
Definition etherfabric.c:89
#define PSSR_LSTATUS
#define BMSR_LSTATUS
Definition mii.h:58

References BMSR_LSTATUS, falcon_mdio_read(), GMII_PSSR, MII_BMSR, PSSR_LSTATUS, and status.

Referenced by alaska_init().

◆ mdio_clause45_wait_reset_mmds()

int mdio_clause45_wait_reset_mmds ( struct efab_nic * efab)
static

Definition at line 266 of file etherfabric.c.

267{
268 int tries = MDIO45_RESET_TRIES;
269 int in_reset;
270
271 while(tries) {
272 int mask = efab->phy_op->mmds;
273 int mmd = 0;
274 in_reset = 0;
275 while(mask) {
276 if (mask & 1) {
277 int stat = falcon_mdio_read ( efab, mmd,
279 if (stat < 0) {
280 EFAB_ERR("Failed to read status of MMD %d\n",
281 mmd );
282 in_reset = 1;
283 break;
284 }
286 in_reset |= (1 << mmd);
287 }
288 mask = mask >> 1;
289 mmd++;
290 }
291 if (!in_reset)
292 break;
293 tries--;
295 }
296 if (in_reset != 0) {
297 EFAB_ERR("Not all MMDs came out of reset in time. MMDs "
298 "still in reset: %x\n", in_reset);
299 return -ETIMEDOUT;
300 }
301 return 0;
302}
uint32_t stat
Completion status.
Definition dwmac.h:1
#define EFAB_ERR(...)
Definition etherfabric.c:52
#define MDIO45_RESET_SPINTIME
#define MDIO_MMDREG_CTRL1
#define MDIO45_RESET_TRIES
#define MDIO_MMDREG_CTRL1_RESET_LBN
#define ETIMEDOUT
Connection timed out.
Definition errno.h:670
struct efab_phy_operations * phy_op
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
Definition timer.c:79

References EFAB_ERR, ETIMEDOUT, falcon_mdio_read(), mdelay(), MDIO45_RESET_SPINTIME, MDIO45_RESET_TRIES, MDIO_MMDREG_CTRL1, MDIO_MMDREG_CTRL1_RESET_LBN, efab_phy_operations::mmds, efab_nic::phy_op, and stat.

Referenced by falcon_tenxpress_phy_init().

◆ mdio_clause45_reset_mmd()

int mdio_clause45_reset_mmd ( struct efab_nic * efab,
int mmd )
static

Definition at line 305 of file etherfabric.c.

306{
307 int tries = MDIO45_RESET_TRIES;
308 int ctrl;
309
312
313 /* Wait for the reset bit to clear. */
314 do {
316
317 ctrl = falcon_mdio_read ( efab, mmd, MDIO_MMDREG_CTRL1 );
318 if ( ~ctrl & ( 1 << MDIO_MMDREG_CTRL1_RESET_LBN ) )
319 return 0;
320 } while ( --tries );
321
322 EFAB_ERR ( "Failed to reset mmd %d\n", mmd );
323
324 return -ETIMEDOUT;
325}
uint8_t ctrl
Ring control.
Definition dwmac.h:7
static void falcon_mdio_write(struct efab_nic *efab, int device, int location, int value)

References ctrl, EFAB_ERR, ETIMEDOUT, falcon_mdio_read(), falcon_mdio_write(), mdelay(), MDIO45_RESET_SPINTIME, MDIO45_RESET_TRIES, MDIO_MMDREG_CTRL1, and MDIO_MMDREG_CTRL1_RESET_LBN.

Referenced by falcon_pm8358_phy_init(), falcon_txc_phy_init(), and falcon_xfp_phy_init().

◆ mdio_clause45_links_ok()

int mdio_clause45_links_ok ( struct efab_nic * efab)
static

Definition at line 328 of file etherfabric.c.

329{
330 int status, good;
331 int ok = 1;
332 int mmd = 0;
333 int mmd_mask = efab->phy_op->mmds;
334
335 while (mmd_mask) {
336 if (mmd_mask & 1) {
337 /* Double reads because link state is latched, and a
338 * read moves the current state into the register */
339 status = falcon_mdio_read ( efab, mmd,
341 status = falcon_mdio_read ( efab, mmd,
343
344 good = status & (1 << MDIO_MMDREG_STAT1_LINK_LBN);
345 ok = ok && good;
346 }
347 mmd_mask = (mmd_mask >> 1);
348 mmd++;
349 }
350 return ok;
351}
#define MDIO_MMDREG_STAT1_LINK_LBN
#define MDIO_MMDREG_STAT1
#define ok(success)
Definition test.h:46

References falcon_mdio_read(), MDIO_MMDREG_STAT1, MDIO_MMDREG_STAT1_LINK_LBN, efab_phy_operations::mmds, ok, efab_nic::phy_op, and status.

Referenced by falcon_init_xmac().

◆ mdio_clause45_check_mmds()

int mdio_clause45_check_mmds ( struct efab_nic * efab)
static

Definition at line 354 of file etherfabric.c.

355{
356 int mmd = 0;
357 int devices = falcon_mdio_read ( efab, MDIO_MMD_PHYXS,
359 int mmd_mask = efab->phy_op->mmds;
360
361 /* Check all the expected MMDs are present */
362 if ( devices < 0 ) {
363 EFAB_ERR ( "Failed to read devices present\n" );
364 return -EIO;
365 }
366 if ( ( devices & mmd_mask ) != mmd_mask ) {
367 EFAB_ERR ( "required MMDs not present: got %x, wanted %x\n",
368 devices, mmd_mask );
369 return -EIO;
370 }
371
372 /* Check all required MMDs are responding and happy. */
373 while ( mmd_mask ) {
374 if ( mmd_mask & 1 ) {
376 int status;
377 reg.opaque = falcon_mdio_read ( efab, mmd,
380 MDIO_MMDREG_STAT2_PRESENT );
382
383
384 return -EIO;
385 }
386 }
387 mmd_mask >>= 1;
388 mmd++;
389 }
390
391 return 0;
392}
#define MDIO_MMDREG_STAT2
#define MDIO_MMD_PHYXS
#define MDIO_MMDREG_DEVS0
#define MDIO_MMDREG_STAT2_PRESENT_VAL
#define EFAB_DWORD_FIELD(dword, field)
#define EIO
Input/output error.
Definition errno.h:434

References EFAB_DWORD_FIELD, EFAB_ERR, EIO, falcon_mdio_read(), MDIO_MMD_PHYXS, MDIO_MMDREG_DEVS0, MDIO_MMDREG_STAT2, MDIO_MMDREG_STAT2_PRESENT_VAL, efab_phy_operations::mmds, efab_nic::phy_op, reg, and status.

Referenced by falcon_tenxpress_phy_init(), and falcon_txc_phy_init().

◆ falcon_write()

void falcon_write ( struct efab_nic * efab,
efab_oword_t * value,
unsigned int reg )
inlinestatic

Write to a Falcon register.

Definition at line 1201 of file etherfabric.c.

1202{
1203
1204 EFAB_REGDUMP ( "Writing register %x with " EFAB_OWORD_FMT "\n",
1205 reg, EFAB_OWORD_VAL ( *value ) );
1206
1207 _falcon_writel ( efab, value->u32[0], reg + 0 );
1208 _falcon_writel ( efab, value->u32[1], reg + 4 );
1209 _falcon_writel ( efab, value->u32[2], reg + 8 );
1210 wmb();
1211 _falcon_writel ( efab, value->u32[3], reg + 12 );
1212 wmb();
1213}
#define EFAB_REGDUMP(...)
Definition etherfabric.c:47
#define _falcon_writel(efab, value, reg)
#define wmb()
Definition io.h:546

References _falcon_writel, EFAB_OWORD_FMT, EFAB_OWORD_VAL, EFAB_REGDUMP, reg, value, and wmb.

Referenced by clear_b0_fpga_memories(), falcon_fini_resources(), falcon_gmac_writel(), falcon_i2c_bit_write(), falcon_init_resources(), falcon_init_sram(), falcon_interrupts(), falcon_mdio_read(), falcon_mdio_write(), falcon_reconfigure_mac_wrapper(), falcon_reset(), falcon_setup_nic(), falcon_spi_rw(), and falcon_xmac_writel().

◆ falcon_write_sram()

void falcon_write_sram ( struct efab_nic * efab,
efab_qword_t * value,
unsigned int index )
inlinestatic

Write to Falcon SRAM.

Definition at line 1220 of file etherfabric.c.

1222{
1223 unsigned int reg = ( FCN_REVISION_REG ( efab, FCN_BUF_FULL_TBL_KER ) +
1224 ( index * sizeof ( *value ) ) );
1225
1226 EFAB_REGDUMP ( "Writing SRAM register %x with " EFAB_QWORD_FMT "\n",
1227 reg, EFAB_QWORD_VAL ( *value ) );
1228
1229 _falcon_writel ( efab, value->u32[0], reg + 0 );
1230 _falcon_writel ( efab, value->u32[1], reg + 4 );
1231 wmb();
1232}
long index
Definition bigint.h:65
#define FCN_REVISION_REG(efab, reg)
#define EFAB_QWORD_VAL(qword)
printk parameters for printing an efab_qword_t
#define EFAB_QWORD_FMT
Format string for printing an efab_qword_t.

References _falcon_writel, EFAB_QWORD_FMT, EFAB_QWORD_VAL, EFAB_REGDUMP, FCN_REVISION_REG, index, reg, value, and wmb.

Referenced by falcon_alloc_special_buffer().

◆ falcon_writel()

void falcon_writel ( struct efab_nic * efab,
efab_dword_t * value,
unsigned int reg )
inlinestatic

Write dword to Falcon register that allows partial writes.

Definition at line 1239 of file etherfabric.c.

1240{
1241 EFAB_REGDUMP ( "Writing partial register %x with " EFAB_DWORD_FMT "\n",
1242 reg, EFAB_DWORD_VAL ( *value ) );
1243 _falcon_writel ( efab, value->u32[0], reg );
1244}

References _falcon_writel, EFAB_DWORD_FMT, EFAB_DWORD_VAL, EFAB_REGDUMP, reg, and value.

Referenced by falcon_clear_interrupts(), falcon_eventq_read_ack(), falcon_notify_rx_desc(), falcon_notify_tx_desc(), and falcon_setup_nic().

◆ falcon_read()

void falcon_read ( struct efab_nic * efab,
efab_oword_t * value,
unsigned int reg )
inlinestatic

Read from a Falcon register.

Definition at line 1251 of file etherfabric.c.

1252{
1253 value->u32[0] = _falcon_readl ( efab, reg + 0 );
1254 wmb();
1255 value->u32[1] = _falcon_readl ( efab, reg + 4 );
1256 value->u32[2] = _falcon_readl ( efab, reg + 8 );
1257 value->u32[3] = _falcon_readl ( efab, reg + 12 );
1258
1259 EFAB_REGDUMP ( "Read from register %x, got " EFAB_OWORD_FMT "\n",
1260 reg, EFAB_OWORD_VAL ( *value ) );
1261}
#define _falcon_readl(efab, reg)

References _falcon_readl, EFAB_OWORD_FMT, EFAB_OWORD_VAL, EFAB_REGDUMP, reg, value, and wmb.

Referenced by falcon_gmac_readl(), falcon_i2c_bit_read(), falcon_i2c_bit_write(), falcon_init_sram(), falcon_mdio_read(), falcon_probe_nic_variant(), falcon_probe_spi(), falcon_reset(), falcon_setup_nic(), falcon_spi_rw(), falcon_spi_wait(), and falcon_xmac_readl().

◆ falcon_read_sram()

void falcon_read_sram ( struct efab_nic * efab,
efab_qword_t * value,
unsigned int index )
inlinestatic

Read from Falcon SRAM.

Definition at line 1268 of file etherfabric.c.

1270{
1271 unsigned int reg = ( FCN_REVISION_REG ( efab, FCN_BUF_FULL_TBL_KER ) +
1272 ( index * sizeof ( *value ) ) );
1273
1274 value->u32[0] = _falcon_readl ( efab, reg + 0 );
1275 value->u32[1] = _falcon_readl ( efab, reg + 4 );
1276 EFAB_REGDUMP ( "Read from SRAM register %x, got " EFAB_QWORD_FMT "\n",
1277 reg, EFAB_QWORD_VAL ( *value ) );
1278}

References _falcon_readl, EFAB_QWORD_FMT, EFAB_QWORD_VAL, EFAB_REGDUMP, FCN_REVISION_REG, index, reg, and value.

◆ falcon_readl()

void falcon_readl ( struct efab_nic * efab,
efab_dword_t * value,
unsigned int reg )
inlinestatic

Read dword from a portion of a Falcon register.

Definition at line 1285 of file etherfabric.c.

1286{
1287 value->u32[0] = _falcon_readl ( efab, reg );
1288 EFAB_REGDUMP ( "Read from register %x, got " EFAB_DWORD_FMT "\n",
1289 reg, EFAB_DWORD_VAL ( *value ) );
1290}

References _falcon_readl, EFAB_DWORD_FMT, EFAB_DWORD_VAL, EFAB_REGDUMP, reg, and value.

Referenced by falcon_clear_interrupts(), and falcon_gmii_wait().

◆ falcon_event_present()

int falcon_event_present ( falcon_event_t * event)
inlinestatic

See if an event is present.

Parameters
eventFalcon event structure
Return values
TrueAn event is pending
FalseNo event is pending

We check both the high and low dword of the event for all ones. We wrote all ones when we cleared the event, and no valid event can have all ones in either its high or low dwords. This approach is robust against reordering.

Note that using a single 64-bit comparison is incorrect; even though the CPU read will be atomic, the DMA write may not be.

Definition at line 1322 of file etherfabric.c.

1323{
1324 return ( ! ( EFAB_DWORD_IS_ALL_ONES ( event->dword[0] ) |
1325 EFAB_DWORD_IS_ALL_ONES ( event->dword[1] ) ) );
1326}
#define EFAB_DWORD_IS_ALL_ONES(dword)
efab_dword_t dword[2]

References efab_qword::dword, and EFAB_DWORD_IS_ALL_ONES.

Referenced by efab_poll().

◆ falcon_eventq_read_ack()

void falcon_eventq_read_ack ( struct efab_nic * efab,
struct efab_ev_queue * ev_queue )
static

Definition at line 1329 of file etherfabric.c.

1330{
1332
1333 EFAB_POPULATE_DWORD_1 ( reg, FCN_EVQ_RPTR_DWORD, ev_queue->read_ptr );
1334 falcon_writel ( efab, &reg,
1335 FCN_REVISION_REG ( efab, FCN_EVQ_RPTR_REG_KER_DWORD ) );
1336}
static void falcon_writel(struct efab_nic *efab, efab_dword_t *value, unsigned int reg)
Write dword to Falcon register that allows partial writes.
#define EFAB_POPULATE_DWORD_1(dword,...)
unsigned int read_ptr

References EFAB_POPULATE_DWORD_1, falcon_writel(), FCN_REVISION_REG, efab_ev_queue::read_ptr, and reg.

Referenced by efab_irq(), efab_poll(), and falcon_init_resources().

◆ falcon_interrupts()

void falcon_interrupts ( struct efab_nic * efab,
int enabled,
int force )
static

Definition at line 1378 of file etherfabric.c.

1379{
1380 efab_oword_t int_en_reg_ker;
1381
1382 EFAB_POPULATE_OWORD_2 ( int_en_reg_ker,
1383 FCN_KER_INT_KER, force,
1384 FCN_DRV_INT_EN_KER, enabled );
1385 falcon_write ( efab, &int_en_reg_ker, FCN_INT_EN_REG_KER );
1386}
uint16_t enabled
Single-entry bitmask of the enabled option value.
Definition ena.h:3
#define FCN_INT_EN_REG_KER

References EFAB_POPULATE_OWORD_2, enabled, falcon_write(), and FCN_INT_EN_REG_KER.

Referenced by efab_irq(), and falcon_fini_resources().

◆ falcon_spi_wait()

int falcon_spi_wait ( struct efab_nic * efab)
static

Definition at line 1401 of file etherfabric.c.

1402{
1404 int count;
1405
1406 count = 0;
1407 do {
1408 udelay ( 100 );
1410 if ( EFAB_OWORD_FIELD ( reg, FCN_EE_SPI_HCMD_CMD_EN ) == 0 )
1411 return 0;
1412 } while ( ++count < 1000 );
1413
1414 EFAB_ERR ( "Timed out waiting for SPI\n" );
1415 return -ETIMEDOUT;
1416}
#define FCN_EE_SPI_HCMD_REG
static unsigned int count
Number of entries.
Definition dwmac.h:220

References count, EFAB_ERR, EFAB_OWORD_FIELD, ETIMEDOUT, falcon_read(), FCN_EE_SPI_HCMD_REG, reg, and udelay().

Referenced by falcon_spi_rw().

◆ falcon_spi_rw()

int falcon_spi_rw ( struct spi_bus * bus,
struct spi_device * device,
unsigned int command,
int address,
const void * data_out,
void * data_in,
size_t len )
static

Definition at line 1419 of file etherfabric.c.

1422{
1423 struct efab_nic *efab = container_of ( bus, struct efab_nic, spi_bus );
1426
1427 /* falcon_init_spi_device() should have reduced the block size
1428 * down so this constraint holds */
1430
1431 /* Is this the FLASH or EEPROM device? */
1432 if ( device == &efab->spi_flash )
1434 else if ( device == &efab->spi_eeprom )
1436 else {
1437 EFAB_ERR ( "Unknown device %p\n", device );
1438 return -EINVAL;
1439 }
1440
1441 EFAB_TRACE ( "Executing spi command %d on device %d at %d for %zd bytes\n",
1443
1444 /* The bus must be idle */
1445 rc = falcon_spi_wait ( efab );
1446 if ( rc )
1447 goto fail1;
1448
1449 /* Copy data out */
1450 if ( data_out ) {
1451 memcpy ( &reg, data_out, len );
1453 }
1454
1455 /* Program address register */
1456 if ( address >= 0 ) {
1457 EFAB_POPULATE_OWORD_1 ( reg, FCN_EE_SPI_HADR_ADR, address );
1459 }
1460
1461 /* Issue command */
1462 address_len = ( address >= 0 ) ? device->address_len / 8 : 0;
1463 read_cmd = ( data_in ? FCN_EE_SPI_READ : FCN_EE_SPI_WRITE );
1465 FCN_EE_SPI_HCMD_CMD_EN, 1,
1466 FCN_EE_SPI_HCMD_SF_SEL, device_id,
1467 FCN_EE_SPI_HCMD_DABCNT, len,
1468 FCN_EE_SPI_HCMD_READ, read_cmd,
1469 FCN_EE_SPI_HCMD_DUBCNT, 0,
1470 FCN_EE_SPI_HCMD_ADBCNT, address_len,
1471 FCN_EE_SPI_HCMD_ENC, command );
1473
1474 /* Wait for the command to complete */
1475 rc = falcon_spi_wait ( efab );
1476 if ( rc )
1477 goto fail2;
1478
1479 /* Copy data in */
1480 if ( data_in ) {
1482 memcpy ( data_in, &reg, len );
1483 }
1484
1485 return 0;
1486
1487fail2:
1488fail1:
1489 EFAB_ERR ( "Failed SPI command %d to device %d address 0x%x len 0x%zx\n",
1491
1492 return rc;
1493}
struct arbelprm_rc_send_wqe rc
Definition arbel.h:3
ring len
Length.
Definition dwmac.h:226
uint8_t bus
Bus.
Definition edd.h:1
uint64_t address
Base address.
Definition ena.h:13
#define FCN_EE_SPI_FLASH
#define FCN_EE_SPI_EEPROM
#define FCN_EE_SPI_WRITE
#define FCN_EE_SPI_HADR_REG
#define FCN_EE_SPI_READ
#define FALCON_SPI_MAX_LEN
Maximum length for a single SPI transaction.
#define FCN_EE_SPI_HDATA_REG
static int falcon_spi_wait(struct efab_nic *efab)
#define EFAB_POPULATE_OWORD_7(oword,...)
#define EINVAL
Invalid argument.
Definition errno.h:429
device address_len
Definition threewire.h:74
uint16_t device_id
Definition ib_mad.h:8
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static struct command_descriptor read_cmd
"read" command descriptor
Definition nvo_cmd.c:135
#define container_of(ptr, type, field)
Get containing structure.
Definition stddef.h:36
A command-line command.
Definition command.h:10
struct spi_device spi_eeprom
struct spi_device spi_flash
An SPI bus.
Definition spi.h:127

References address, address_len, assert, bus, container_of, device_id, EFAB_ERR, EFAB_POPULATE_OWORD_1, EFAB_POPULATE_OWORD_7, EFAB_TRACE, EINVAL, falcon_read(), FALCON_SPI_MAX_LEN, falcon_spi_wait(), falcon_write(), FCN_EE_SPI_EEPROM, FCN_EE_SPI_FLASH, FCN_EE_SPI_HADR_REG, FCN_EE_SPI_HCMD_REG, FCN_EE_SPI_HDATA_REG, FCN_EE_SPI_READ, FCN_EE_SPI_WRITE, len, memcpy(), rc, read_cmd, reg, efab_nic::spi_eeprom, and efab_nic::spi_flash.

Referenced by falcon_probe_spi().

◆ falcon_i2c_bit_write()

void falcon_i2c_bit_write ( struct bit_basher * basher,
unsigned int bit_id,
unsigned long data )
static

Definition at line 1504 of file etherfabric.c.

1506{
1507 struct efab_nic *efab = container_of ( basher, struct efab_nic,
1508 i2c_bb.basher );
1510
1512 switch ( bit_id ) {
1513 case I2C_BIT_SCL:
1514 EFAB_SET_OWORD_FIELD ( reg, FCN_GPIO0_OEN, ( data ? 0 : 1 ) );
1515 break;
1516 case I2C_BIT_SDA:
1517 EFAB_SET_OWORD_FIELD ( reg, FCN_GPIO3_OEN, ( data ? 0 : 1 ) );
1518 break;
1519 default:
1520 EFAB_ERR ( "%s bit=%d\n", __func__, bit_id );
1521 break;
1522 }
1523
1525}
uint8_t data[48]
Additional event data.
Definition ena.h:11
#define FCN_GPIO_CTL_REG_KER
#define EFAB_SET_OWORD_FIELD
@ I2C_BIT_SDA
Serial data.
Definition i2c.h:116
@ I2C_BIT_SCL
Serial clock.
Definition i2c.h:114
struct i2c_bit_basher i2c_bb
struct bit_basher basher
Bit-bashing interface.
Definition i2c.h:95

References i2c_bit_basher::basher, container_of, data, EFAB_ERR, EFAB_SET_OWORD_FIELD, falcon_read(), falcon_write(), FCN_GPIO_CTL_REG_KER, efab_nic::i2c_bb, I2C_BIT_SCL, I2C_BIT_SDA, and reg.

◆ falcon_i2c_bit_read()

int falcon_i2c_bit_read ( struct bit_basher * basher,
unsigned int bit_id )
static

Definition at line 1528 of file etherfabric.c.

1529{
1530 struct efab_nic *efab = container_of ( basher, struct efab_nic,
1531 i2c_bb.basher );
1533
1535 switch ( bit_id ) {
1536 case I2C_BIT_SCL:
1537 return EFAB_OWORD_FIELD ( reg, FCN_GPIO0_IN );
1538 break;
1539 case I2C_BIT_SDA:
1540 return EFAB_OWORD_FIELD ( reg, FCN_GPIO3_IN );
1541 break;
1542 default:
1543 EFAB_ERR ( "%s bit=%d\n", __func__, bit_id );
1544 break;
1545 }
1546
1547 return -1;
1548}

References i2c_bit_basher::basher, container_of, EFAB_ERR, EFAB_OWORD_FIELD, falcon_read(), FCN_GPIO_CTL_REG_KER, efab_nic::i2c_bb, I2C_BIT_SCL, I2C_BIT_SDA, and reg.

◆ falcon_gmii_wait()

int falcon_gmii_wait ( struct efab_nic * efab)
static

Definition at line 1565 of file etherfabric.c.

1566{
1567 efab_dword_t md_stat;
1568 int count;
1569
1570 /* wait up to 10ms */
1571 for (count = 0; count < 1000; count++) {
1572 falcon_readl ( efab, &md_stat, FCN_MD_STAT_REG_KER );
1573 if ( EFAB_DWORD_FIELD ( md_stat, FCN_MD_BSY ) == 0 ) {
1574 if ( EFAB_DWORD_FIELD ( md_stat, FCN_MD_LNFL ) != 0 ||
1575 EFAB_DWORD_FIELD ( md_stat, FCN_MD_BSERR ) != 0 ) {
1576 EFAB_ERR ( "Error from GMII access "
1577 EFAB_DWORD_FMT"\n",
1578 EFAB_DWORD_VAL ( md_stat ));
1579 return -EIO;
1580 }
1581 return 0;
1582 }
1583 udelay(10);
1584 }
1585
1586 EFAB_ERR ( "Timed out waiting for GMII\n" );
1587 return -ETIMEDOUT;
1588}
static void falcon_readl(struct efab_nic *efab, efab_dword_t *value, unsigned int reg)
Read dword from a portion of a Falcon register.
#define FCN_MD_STAT_REG_KER

References count, EFAB_DWORD_FIELD, EFAB_DWORD_FMT, EFAB_DWORD_VAL, EFAB_ERR, EIO, ETIMEDOUT, falcon_readl(), FCN_MD_STAT_REG_KER, and udelay().

Referenced by falcon_mdio_read(), and falcon_mdio_write().

◆ falcon_reconfigure_mac_wrapper()

void falcon_reconfigure_mac_wrapper ( struct efab_nic * efab)
static

Definition at line 1717 of file etherfabric.c.

1718{
1720 int link_speed;
1721
1722 if ( efab->link_options & LPA_EF_10000 ) {
1723 link_speed = 0x3;
1724 } else if ( efab->link_options & LPA_EF_1000 ) {
1725 link_speed = 0x2;
1726 } else if ( efab->link_options & LPA_100 ) {
1727 link_speed = 0x1;
1728 } else {
1729 link_speed = 0x0;
1730 }
1732 FCN_MAC_XOFF_VAL, 0xffff /* datasheet */,
1733 FCN_MAC_BCAD_ACPT, 1,
1734 FCN_MAC_UC_PROM, 0,
1735 FCN_MAC_LINK_STATUS, 1,
1736 FCN_MAC_SPEED, link_speed );
1737
1739}
#define FCN_MAC0_CTRL_REG_KER
#define LPA_EF_1000
Definition etherfabric.c:97
#define LPA_EF_10000
Definition etherfabric.c:98
#define EFAB_POPULATE_OWORD_5(oword,...)
#define LPA_100
Definition mii.h:115
unsigned int link_options
GMII link options.

References EFAB_POPULATE_OWORD_5, falcon_write(), FCN_MAC0_CTRL_REG_KER, efab_nic::link_options, LPA_100, LPA_EF_1000, LPA_EF_10000, and reg.

Referenced by falcon_init_gmac(), and falcon_init_xmac().

◆ falcon_gmac_writel()

void falcon_gmac_writel ( struct efab_nic * efab,
efab_dword_t * value,
unsigned int mac_reg )
static

Definition at line 1881 of file etherfabric.c.

1883{
1884 efab_oword_t temp;
1885
1886 EFAB_POPULATE_OWORD_1 ( temp, FCN_MAC_DATA,
1887 EFAB_DWORD_FIELD ( *value, FCN_MAC_DATA ) );
1888 falcon_write ( efab, &temp, FALCON_GMAC_REG ( efab, mac_reg ) );
1889}
#define FALCON_GMAC_REG(efab, mac_reg)
Offset of a GMAC register within Falcon.

References EFAB_DWORD_FIELD, EFAB_POPULATE_OWORD_1, FALCON_GMAC_REG, falcon_write(), and value.

Referenced by mentormac_init(), and mentormac_reset().

◆ falcon_gmac_readl()

void falcon_gmac_readl ( struct efab_nic * efab,
efab_dword_t * value,
unsigned int mac_reg )
static

Definition at line 1892 of file etherfabric.c.

1894{
1895 efab_oword_t temp;
1896
1897 falcon_read ( efab, &temp, FALCON_GMAC_REG ( efab, mac_reg ) );
1898 EFAB_POPULATE_DWORD_1 ( *value, FCN_MAC_DATA,
1899 EFAB_OWORD_FIELD ( temp, FCN_MAC_DATA ) );
1900}

References EFAB_OWORD_FIELD, EFAB_POPULATE_DWORD_1, FALCON_GMAC_REG, falcon_read(), and value.

Referenced by mentormac_init().

◆ mentormac_reset()

void mentormac_reset ( struct efab_nic * efab)
static

Definition at line 1903 of file etherfabric.c.

1904{
1906
1907 /* Take into reset */
1908 EFAB_POPULATE_DWORD_1 ( reg, GM_SW_RST, 1 );
1910 udelay ( 1000 );
1911
1912 /* Take out of reset */
1913 EFAB_POPULATE_DWORD_1 ( reg, GM_SW_RST, 0 );
1915 udelay ( 1000 );
1916
1917 /* Configure GMII interface so PHY is accessible. Note that
1918 * GMII interface is connected only to port 0, and that on
1919 * Falcon this is a no-op.
1920 */
1921 EFAB_POPULATE_DWORD_1 ( reg, GM_MGMT_CLK_SEL, 0x4 );
1923 udelay ( 10 );
1924}
static void falcon_gmac_writel(struct efab_nic *efab, efab_dword_t *value, unsigned int mac_reg)
#define GM_CFG1_REG_MAC
#define GM_MII_MGMT_CFG_REG_MAC

References EFAB_POPULATE_DWORD_1, falcon_gmac_writel(), GM_CFG1_REG_MAC, GM_MII_MGMT_CFG_REG_MAC, reg, and udelay().

Referenced by falcon_init_gmac().

◆ mentormac_init()

void mentormac_init ( struct efab_nic * efab)
static

Definition at line 1927 of file etherfabric.c.

1928{
1929 int pause, if_mode, full_duplex, bytemode, half_duplex;
1931
1932 /* Configuration register 1 */
1933 pause = ( efab->link_options & LPA_PAUSE_CAP ) ? 1 : 0;
1934 if ( ! ( efab->link_options & LPA_EF_DUPLEX ) ) {
1935 /* Half-duplex operation requires TX flow control */
1936 pause = 1;
1937 }
1939 GM_TX_EN, 1,
1940 GM_TX_FC_EN, pause,
1941 GM_RX_EN, 1,
1942 GM_RX_FC_EN, 1 );
1944 udelay ( 10 );
1945
1946 /* Configuration register 2 */
1947 if_mode = ( efab->link_options & LPA_EF_1000 ) ? 2 : 1;
1948 full_duplex = ( efab->link_options & LPA_EF_DUPLEX ) ? 1 : 0;
1950 GM_IF_MODE, if_mode,
1951 GM_PAD_CRC_EN, 1,
1952 GM_FD, full_duplex,
1953 GM_PAMBL_LEN, 0x7 /* ? */ );
1955 udelay ( 10 );
1956
1957 /* Max frame len register */
1958 EFAB_POPULATE_DWORD_1 ( reg, GM_MAX_FLEN,
1961 udelay ( 10 );
1962
1963 /* FIFO configuration register 0 */
1965 GMF_FTFENREQ, 1,
1966 GMF_STFENREQ, 1,
1967 GMF_FRFENREQ, 1,
1968 GMF_SRFENREQ, 1,
1969 GMF_WTMENREQ, 1 );
1971 udelay ( 10 );
1972
1973 /* FIFO configuration register 1 */
1975 GMF_CFGFRTH, 0x12,
1976 GMF_CFGXOFFRTX, 0xffff );
1978 udelay ( 10 );
1979
1980 /* FIFO configuration register 2 */
1982 GMF_CFGHWM, 0x3f,
1983 GMF_CFGLWM, 0xa );
1985 udelay ( 10 );
1986
1987 /* FIFO configuration register 3 */
1989 GMF_CFGHWMFT, 0x1c,
1990 GMF_CFGFTTH, 0x08 );
1992 udelay ( 10 );
1993
1994 /* FIFO configuration register 4 */
1995 EFAB_POPULATE_DWORD_1 ( reg, GMF_HSTFLTRFRM_PAUSE, 1 );
1997 udelay ( 10 );
1998
1999 /* FIFO configuration register 5 */
2000 bytemode = ( efab->link_options & LPA_EF_1000 ) ? 1 : 0;
2001 half_duplex = ( efab->link_options & LPA_EF_DUPLEX ) ? 0 : 1;
2003 EFAB_SET_DWORD_FIELD ( reg, GMF_CFGBYTMODE, bytemode );
2004 EFAB_SET_DWORD_FIELD ( reg, GMF_CFGHDPLX, half_duplex );
2005 EFAB_SET_DWORD_FIELD ( reg, GMF_HSTDRPLT64, half_duplex );
2006 EFAB_SET_DWORD_FIELD ( reg, GMF_HSTFLTRFRMDC_PAUSE, 0 );
2008 udelay ( 10 );
2009
2010 /* MAC address */
2012 GM_HWADDR_5, efab->mac_addr[5],
2013 GM_HWADDR_4, efab->mac_addr[4],
2014 GM_HWADDR_3, efab->mac_addr[3],
2015 GM_HWADDR_2, efab->mac_addr[2] );
2017 udelay ( 10 );
2019 GM_HWADDR_1, efab->mac_addr[1],
2020 GM_HWADDR_0, efab->mac_addr[0] );
2022 udelay ( 10 );
2023}
static void falcon_gmac_readl(struct efab_nic *efab, efab_dword_t *value, unsigned int mac_reg)
#define GMF_CFG1_REG_MAC
#define EFAB_MAX_FRAME_LEN(mtu)
Definition etherfabric.c:74
#define GM_ADR2_REG_MAC
#define GMF_CFG0_REG_MAC
#define GM_ADR1_REG_MAC
#define GM_MAX_FLEN_REG_MAC
#define GMF_CFG4_REG_MAC
#define GMF_CFG5_REG_MAC
#define GM_CFG2_REG_MAC
#define LPA_EF_DUPLEX
Definition etherfabric.c:99
#define GMF_CFG2_REG_MAC
#define GMF_CFG3_REG_MAC
#define EFAB_POPULATE_DWORD_5(dword,...)
#define EFAB_POPULATE_DWORD_2(dword,...)
#define EFAB_POPULATE_DWORD_4(dword,...)
#define EFAB_SET_DWORD_FIELD(dword, field, value)
#define ETH_FRAME_LEN
Definition if_ether.h:12
#define LPA_PAUSE_CAP
Definition mii.h:107
uint8_t mac_addr[ETH_ALEN]
MAC address.

References EFAB_MAX_FRAME_LEN, EFAB_POPULATE_DWORD_1, EFAB_POPULATE_DWORD_2, EFAB_POPULATE_DWORD_4, EFAB_POPULATE_DWORD_5, EFAB_SET_DWORD_FIELD, ETH_FRAME_LEN, falcon_gmac_readl(), falcon_gmac_writel(), GM_ADR1_REG_MAC, GM_ADR2_REG_MAC, GM_CFG1_REG_MAC, GM_CFG2_REG_MAC, GM_MAX_FLEN_REG_MAC, GMF_CFG0_REG_MAC, GMF_CFG1_REG_MAC, GMF_CFG2_REG_MAC, GMF_CFG3_REG_MAC, GMF_CFG4_REG_MAC, GMF_CFG5_REG_MAC, efab_nic::link_options, LPA_EF_1000, LPA_EF_DUPLEX, LPA_PAUSE_CAP, efab_nic::mac_addr, reg, and udelay().

Referenced by falcon_init_gmac().

◆ falcon_init_gmac()

int falcon_init_gmac ( struct efab_nic * efab)
static

Definition at line 2026 of file etherfabric.c.

2027{
2028 /* Reset the MAC */
2029 mentormac_reset ( efab );
2030
2031 /* Initialise PHY */
2032 efab->phy_op->init ( efab );
2033
2034 /* check the link is up */
2035 if ( !efab->link_up )
2036 return -EAGAIN;
2037
2038 /* Initialise MAC */
2039 mentormac_init ( efab );
2040
2041 /* reconfigure the MAC wrapper */
2043
2044 return 0;
2045}
static void falcon_reconfigure_mac_wrapper(struct efab_nic *efab)
static void mentormac_init(struct efab_nic *efab)
static void mentormac_reset(struct efab_nic *efab)
#define EAGAIN
Resource temporarily unavailable.
Definition errno.h:319
int link_up
Link status.
int(* init)(struct efab_nic *efab)

References EAGAIN, falcon_reconfigure_mac_wrapper(), efab_phy_operations::init, efab_nic::link_up, mentormac_init(), mentormac_reset(), and efab_nic::phy_op.

◆ falcon_xmac_writel()

void falcon_xmac_writel ( struct efab_nic * efab,
efab_dword_t * value,
unsigned int mac_reg )
static

Write dword to a Falcon XMAC register.

Definition at line 2065 of file etherfabric.c.

2067{
2068 efab_oword_t temp;
2069
2070 EFAB_POPULATE_OWORD_1 ( temp, FCN_MAC_DATA,
2071 EFAB_DWORD_FIELD ( *value, FCN_MAC_DATA ) );
2072 falcon_write ( efab, &temp,
2073 FALCON_XMAC_REG ( efab, mac_reg ) );
2074}
#define FALCON_XMAC_REG(efab_port, mac_reg)
Offset of an XMAC register within Falcon.

References EFAB_DWORD_FIELD, EFAB_POPULATE_OWORD_1, falcon_write(), FALCON_XMAC_REG, and value.

Referenced by falcon_reconfigure_xmac(), falcon_reset_xaui(), falcon_reset_xmac(), falcon_setup_xaui(), falcon_xaui_link_ok(), and sfe4001_init().

◆ falcon_xmac_readl()

void falcon_xmac_readl ( struct efab_nic * efab,
efab_dword_t * value,
unsigned int mac_reg )
static

Read dword from a Falcon XMAC register.

Definition at line 2081 of file etherfabric.c.

2083{
2084 efab_oword_t temp;
2085
2086 falcon_read ( efab, &temp,
2087 FALCON_XMAC_REG ( efab, mac_reg ) );
2088 EFAB_POPULATE_DWORD_1 ( *value, FCN_MAC_DATA,
2089 EFAB_OWORD_FIELD ( temp, FCN_MAC_DATA ) );
2090}

References EFAB_OWORD_FIELD, EFAB_POPULATE_DWORD_1, falcon_read(), FALCON_XMAC_REG, and value.

Referenced by falcon_mask_status_intr(), falcon_reset_xaui(), falcon_reset_xmac(), falcon_setup_xaui(), falcon_xaui_link_ok(), and falcon_xgmii_status().

◆ falcon_setup_xaui()

void falcon_setup_xaui ( struct efab_nic * efab)
static

Configure Falcon XAUI output.

Definition at line 2096 of file etherfabric.c.

2097{
2098 efab_dword_t sdctl, txdrv;
2099
2100 falcon_xmac_readl ( efab, &sdctl, FCN_XX_SD_CTL_REG_MAC );
2101 EFAB_SET_DWORD_FIELD ( sdctl, FCN_XX_HIDRVD, XX_SD_CTL_DRV_DEFAULT );
2102 EFAB_SET_DWORD_FIELD ( sdctl, FCN_XX_LODRVD, XX_SD_CTL_DRV_DEFAULT );
2103 EFAB_SET_DWORD_FIELD ( sdctl, FCN_XX_HIDRVC, XX_SD_CTL_DRV_DEFAULT );
2104 EFAB_SET_DWORD_FIELD ( sdctl, FCN_XX_LODRVC, XX_SD_CTL_DRV_DEFAULT );
2105 EFAB_SET_DWORD_FIELD ( sdctl, FCN_XX_HIDRVB, XX_SD_CTL_DRV_DEFAULT );
2106 EFAB_SET_DWORD_FIELD ( sdctl, FCN_XX_LODRVB, XX_SD_CTL_DRV_DEFAULT );
2107 EFAB_SET_DWORD_FIELD ( sdctl, FCN_XX_HIDRVA, XX_SD_CTL_DRV_DEFAULT );
2108 EFAB_SET_DWORD_FIELD ( sdctl, FCN_XX_LODRVA, XX_SD_CTL_DRV_DEFAULT );
2109 falcon_xmac_writel ( efab, &sdctl, FCN_XX_SD_CTL_REG_MAC );
2110
2111 EFAB_POPULATE_DWORD_8 ( txdrv,
2112 FCN_XX_DEQD, XX_TXDRV_DEQ_DEFAULT,
2113 FCN_XX_DEQC, XX_TXDRV_DEQ_DEFAULT,
2114 FCN_XX_DEQB, XX_TXDRV_DEQ_DEFAULT,
2115 FCN_XX_DEQA, XX_TXDRV_DEQ_DEFAULT,
2116 FCN_XX_DTXD, XX_TXDRV_DTX_DEFAULT,
2117 FCN_XX_DTXC, XX_TXDRV_DTX_DEFAULT,
2118 FCN_XX_DTXB, XX_TXDRV_DTX_DEFAULT,
2119 FCN_XX_DTXA, XX_TXDRV_DTX_DEFAULT);
2121}
#define FCN_XX_TXDRV_CTL_REG_MAC
#define XX_TXDRV_DTX_DEFAULT
static void falcon_xmac_writel(struct efab_nic *efab, efab_dword_t *value, unsigned int mac_reg)
Write dword to a Falcon XMAC register.
#define FCN_XX_SD_CTL_REG_MAC
#define XX_SD_CTL_DRV_DEFAULT
#define XX_TXDRV_DEQ_DEFAULT
static void falcon_xmac_readl(struct efab_nic *efab, efab_dword_t *value, unsigned int mac_reg)
Read dword from a Falcon XMAC register.
#define EFAB_POPULATE_DWORD_8(dword,...)

References EFAB_POPULATE_DWORD_8, EFAB_SET_DWORD_FIELD, falcon_xmac_readl(), falcon_xmac_writel(), FCN_XX_SD_CTL_REG_MAC, FCN_XX_TXDRV_CTL_REG_MAC, XX_SD_CTL_DRV_DEFAULT, XX_TXDRV_DEQ_DEFAULT, and XX_TXDRV_DTX_DEFAULT.

Referenced by falcon_reset_xaui().

◆ falcon_xgmii_status()

int falcon_xgmii_status ( struct efab_nic * efab)
static

Definition at line 2124 of file etherfabric.c.

2125{
2127
2128 if ( efab->pci_revision < FALCON_REV_B0 )
2129 return 1;
2130 /* The ISR latches, so clear it and re-read */
2133
2134 if ( EFAB_DWORD_FIELD ( reg, FCN_XM_LCLFLT ) ||
2135 EFAB_DWORD_FIELD ( reg, FCN_XM_RMTFLT ) ) {
2136 EFAB_TRACE ( "MGT_INT: "EFAB_DWORD_FMT"\n",
2137 EFAB_DWORD_VAL ( reg ) );
2138 return 0;
2139 }
2140
2141 return 1;
2142}
#define FCN_XM_MGT_INT_REG_MAC_B0

References EFAB_DWORD_FIELD, EFAB_DWORD_FMT, EFAB_DWORD_VAL, EFAB_TRACE, FALCON_REV_B0, falcon_xmac_readl(), FCN_XM_MGT_INT_REG_MAC_B0, efab_nic::pci_revision, and reg.

Referenced by falcon_init_xmac().

◆ falcon_mask_status_intr()

void falcon_mask_status_intr ( struct efab_nic * efab,
int enable )
static

Definition at line 2145 of file etherfabric.c.

2146{
2148
2149 if ( efab->pci_revision < FALCON_REV_B0 )
2150 return;
2151
2152 /* Flush the ISR */
2153 if ( enable )
2155
2157 FCN_XM_MSK_RMTFLT, !enable,
2158 FCN_XM_MSK_LCLFLT, !enable);
2160}
#define FCN_XM_MGT_INT_MSK_REG_MAC_B0

References EFAB_POPULATE_DWORD_2, FALCON_REV_B0, falcon_xmac_readl(), FCN_XM_MGT_INT_MSK_REG_MAC_B0, FCN_XM_MGT_INT_REG_MAC_B0, efab_nic::pci_revision, and reg.

Referenced by falcon_init_xmac().

◆ falcon_reset_xmac()

int falcon_reset_xmac ( struct efab_nic * efab)
static

Reset 10G MAC connected to port.

Definition at line 2167 of file etherfabric.c.

2168{
2170 int count;
2171
2172 EFAB_POPULATE_DWORD_1 ( reg, FCN_XM_CORE_RST, 1 );
2174
2175 for ( count = 0 ; count < 1000 ; count++ ) {
2176 udelay ( 10 );
2177 falcon_xmac_readl ( efab, &reg,
2179 if ( EFAB_DWORD_FIELD ( reg, FCN_XM_CORE_RST ) == 0 )
2180 return 0;
2181 }
2182 return -ETIMEDOUT;
2183}
#define FCN_XM_GLB_CFG_REG_MAC

References count, EFAB_DWORD_FIELD, EFAB_POPULATE_DWORD_1, ETIMEDOUT, falcon_xmac_readl(), falcon_xmac_writel(), FCN_XM_GLB_CFG_REG_MAC, reg, and udelay().

Referenced by falcon_init_xmac().

◆ falcon_reset_xaui()

int falcon_reset_xaui ( struct efab_nic * efab)
static

Definition at line 2187 of file etherfabric.c.

2188{
2190 int count;
2191
2192 if (!efab->is_asic)
2193 return 0;
2194
2195 EFAB_POPULATE_DWORD_1 ( reg, FCN_XX_RST_XX_EN, 1 );
2197
2198 /* Give some time for the link to establish */
2199 for (count = 0; count < 1000; count++) { /* wait up to 10ms */
2201 if ( EFAB_DWORD_FIELD ( reg, FCN_XX_RST_XX_EN ) == 0 ) {
2202 falcon_setup_xaui ( efab );
2203 return 0;
2204 }
2205 udelay(10);
2206 }
2207 EFAB_ERR ( "timed out waiting for XAUI/XGXS reset\n" );
2208 return -ETIMEDOUT;
2209}
static void falcon_setup_xaui(struct efab_nic *efab)
Configure Falcon XAUI output.
#define FCN_XX_PWR_RST_REG_MAC

References count, EFAB_DWORD_FIELD, EFAB_ERR, EFAB_POPULATE_DWORD_1, ETIMEDOUT, falcon_setup_xaui(), falcon_xmac_readl(), falcon_xmac_writel(), FCN_XX_PWR_RST_REG_MAC, efab_nic::is_asic, reg, and udelay().

Referenced by falcon_init_xmac().

◆ falcon_xaui_link_ok()

int falcon_xaui_link_ok ( struct efab_nic * efab)
static

Definition at line 2212 of file etherfabric.c.

2213{
2215 int align_done, lane_status, sync;
2216 int has_phyxs;
2217 int link_ok = 1;
2218
2219 /* Read Falcon XAUI side */
2220 if ( efab->is_asic ) {
2221 /* Read link status */
2223 align_done = EFAB_DWORD_FIELD ( reg, FCN_XX_ALIGN_DONE );
2224
2225 sync = EFAB_DWORD_FIELD ( reg, FCN_XX_SYNC_STAT );
2227
2228 link_ok = align_done && sync;
2229
2230 /* Clear link status ready for next read */
2231 EFAB_SET_DWORD_FIELD ( reg, FCN_XX_COMMA_DET,
2233 EFAB_SET_DWORD_FIELD ( reg, FCN_XX_CHARERR,
2235 EFAB_SET_DWORD_FIELD ( reg, FCN_XX_DISPERR,
2238 }
2239
2240 has_phyxs = ( efab->phy_op->mmds & ( 1 << MDIO_MMD_PHYXS ) );
2241 if ( link_ok && has_phyxs ) {
2242 lane_status = falcon_mdio_read ( efab, MDIO_MMD_PHYXS,
2244 link_ok = ( lane_status & ( 1 << MDIO_PHYXS_LANE_ALIGNED_LBN ) );
2245
2246 if (!link_ok )
2247 EFAB_LOG ( "XGXS lane status: %x\n", lane_status );
2248 }
2249
2250 return link_ok;
2251}
#define EFAB_LOG(...)
Definition etherfabric.c:51
#define FCN_XX_COMMA_DET_RESET
#define MDIO_PHYXS_LANE_ALIGNED_LBN
#define FCN_XX_SYNC_STAT_DECODE_SYNCED
#define MDIO_PHYXS_LANE_STATE
#define FCN_XX_DISPERR_RESET
#define FCN_XX_CHARERR_RESET
#define FCN_XX_CORE_STAT_REG_MAC
int sync(unsigned long timeout)
Wait for pending operations to complete.
Definition sync.c:74

References EFAB_DWORD_FIELD, EFAB_LOG, EFAB_SET_DWORD_FIELD, falcon_mdio_read(), falcon_xmac_readl(), falcon_xmac_writel(), FCN_XX_CHARERR_RESET, FCN_XX_COMMA_DET_RESET, FCN_XX_CORE_STAT_REG_MAC, FCN_XX_DISPERR_RESET, FCN_XX_SYNC_STAT_DECODE_SYNCED, efab_nic::is_asic, MDIO_MMD_PHYXS, MDIO_PHYXS_LANE_ALIGNED_LBN, MDIO_PHYXS_LANE_STATE, efab_phy_operations::mmds, efab_nic::phy_op, reg, and sync().

Referenced by falcon_init_xmac().

◆ falcon_reconfigure_xmac()

void falcon_reconfigure_xmac ( struct efab_nic * efab)
static

Initialise XMAC.

Definition at line 2258 of file etherfabric.c.

2259{
2261 int max_frame_len;
2262
2263 /* Configure MAC - cut-thru mode is hard wired on */
2265 FCN_XM_RX_JUMBO_MODE, 1,
2266 FCN_XM_TX_STAT_EN, 1,
2267 FCN_XM_RX_STAT_EN, 1);
2269
2270 /* Configure TX */
2272 FCN_XM_TXEN, 1,
2273 FCN_XM_TX_PRMBL, 1,
2274 FCN_XM_AUTO_PAD, 1,
2275 FCN_XM_TXCRC, 1,
2276 FCN_XM_FCNTL, 1,
2277 FCN_XM_IPG, 0x3 );
2279
2280 /* Configure RX */
2282 FCN_XM_RXEN, 1,
2283 FCN_XM_AUTO_DEPAD, 0,
2284 FCN_XM_ACPT_ALL_MCAST, 1,
2285 FCN_XM_PASS_CRC_ERR, 1 );
2287
2288 /* Set frame length */
2289 max_frame_len = EFAB_MAX_FRAME_LEN ( ETH_FRAME_LEN );
2291 FCN_XM_MAX_RX_FRM_SIZE, max_frame_len );
2294 FCN_XM_MAX_TX_FRM_SIZE, max_frame_len,
2295 FCN_XM_TX_JUMBO_MODE, 1 );
2297
2298 /* Enable flow control receipt */
2300 FCN_XM_PAUSE_TIME, 0xfffe,
2301 FCN_XM_DIS_FCNTL, 0 );
2303
2304 /* Set MAC address */
2306 FCN_XM_ADR_0, efab->mac_addr[0],
2307 FCN_XM_ADR_1, efab->mac_addr[1],
2308 FCN_XM_ADR_2, efab->mac_addr[2],
2309 FCN_XM_ADR_3, efab->mac_addr[3] );
2312 FCN_XM_ADR_4, efab->mac_addr[4],
2313 FCN_XM_ADR_5, efab->mac_addr[5] );
2315}
#define FCN_XM_RX_PARAM_REG_MAC
#define FCN_XM_ADR_LO_REG_MAC
#define FCN_XM_FC_REG_MAC
#define FCN_XM_TX_PARAM_REG_MAC
#define FCN_XM_ADR_HI_REG_MAC
#define FCN_XM_RX_CFG_REG_MAC
#define FCN_XM_TX_CFG_REG_MAC
#define EFAB_POPULATE_DWORD_3(dword,...)
#define EFAB_POPULATE_DWORD_6(dword,...)

References EFAB_MAX_FRAME_LEN, EFAB_POPULATE_DWORD_1, EFAB_POPULATE_DWORD_2, EFAB_POPULATE_DWORD_3, EFAB_POPULATE_DWORD_4, EFAB_POPULATE_DWORD_6, ETH_FRAME_LEN, falcon_xmac_writel(), FCN_XM_ADR_HI_REG_MAC, FCN_XM_ADR_LO_REG_MAC, FCN_XM_FC_REG_MAC, FCN_XM_GLB_CFG_REG_MAC, FCN_XM_RX_CFG_REG_MAC, FCN_XM_RX_PARAM_REG_MAC, FCN_XM_TX_CFG_REG_MAC, FCN_XM_TX_PARAM_REG_MAC, efab_nic::mac_addr, and reg.

Referenced by falcon_init_xmac().

◆ falcon_init_xmac()

int falcon_init_xmac ( struct efab_nic * efab)
static

Now wait for the link to come up. This may take a while for some slower PHY's.

Definition at line 2318 of file etherfabric.c.

2319{
2320 int count, rc;
2321
2322 /* Mask the PHY management interrupt */
2323 falcon_mask_status_intr ( efab, 0 );
2324
2325 /* Initialise the PHY to instantiate the clock. */
2326 rc = efab->phy_op->init ( efab );
2327 if ( rc ) {
2328 EFAB_ERR ( "unable to initialise PHY\n" );
2329 goto fail1;
2330 }
2331
2332 falcon_reset_xaui ( efab );
2333
2334 /* Give the PHY and MAC time to faff */
2335 mdelay ( 100 );
2336
2337 /* Reset and reconfigure the XMAC */
2338 rc = falcon_reset_xmac ( efab );
2339 if ( rc )
2340 goto fail2;
2341 falcon_reconfigure_xmac ( efab );
2343 /**
2344 * Now wait for the link to come up. This may take a while
2345 * for some slower PHY's.
2346 */
2347 for (count=0; count<50; count++) {
2348 int link_ok = 1;
2349
2350 /* Wait a while for the link to come up. */
2351 mdelay ( 100 );
2352 if ((count % 5) == 0)
2353 putchar ( '.' );
2354
2355 /* Does the PHY think the wire-side link is up? */
2356 link_ok = mdio_clause45_links_ok ( efab );
2357 /* Ensure the XAUI link to the PHY is good */
2358 if ( link_ok ) {
2359 link_ok = falcon_xaui_link_ok ( efab );
2360 if ( !link_ok )
2361 falcon_reset_xaui ( efab );
2362 }
2363
2364 /* Check fault indication */
2365 if ( link_ok )
2366 link_ok = falcon_xgmii_status ( efab );
2367
2368 efab->link_up = link_ok;
2369 if ( link_ok ) {
2370 /* unmask the status interrupt */
2371 falcon_mask_status_intr ( efab, 1 );
2372 return 0;
2373 }
2374 }
2375
2376 /* Link failed to come up, but initialisation was fine. */
2377 rc = -ETIMEDOUT;
2378
2379fail2:
2380fail1:
2381 return rc;
2382}
int putchar(int character)
Write a single character to each console device.
Definition console.c:29
static void falcon_mask_status_intr(struct efab_nic *efab, int enable)
static int falcon_reset_xaui(struct efab_nic *efab)
static int falcon_reset_xmac(struct efab_nic *efab)
Reset 10G MAC connected to port.
static int falcon_xgmii_status(struct efab_nic *efab)
static int falcon_xaui_link_ok(struct efab_nic *efab)
static void falcon_reconfigure_xmac(struct efab_nic *efab)
Initialise XMAC.
static int mdio_clause45_links_ok(struct efab_nic *efab)

References count, EFAB_ERR, ETIMEDOUT, falcon_mask_status_intr(), falcon_reconfigure_mac_wrapper(), falcon_reconfigure_xmac(), falcon_reset_xaui(), falcon_reset_xmac(), falcon_xaui_link_ok(), falcon_xgmii_status(), efab_phy_operations::init, efab_nic::link_up, mdelay(), mdio_clause45_links_ok(), efab_nic::phy_op, putchar(), and rc.

◆ falcon_xaui_phy_init()

int falcon_xaui_phy_init ( struct efab_nic * efab)
static

Definition at line 2397 of file etherfabric.c.

2398{
2399 /* CX4 is always 10000FD only */
2401
2402 /* There is no PHY! */
2403 return 0;
2404}

References efab_nic::link_options, and LPA_EF_10000FULL.

◆ alaska_init()

int alaska_init ( struct efab_nic * efab)
static

Initialise Alaska PHY.

Definition at line 2425 of file etherfabric.c.

2426{
2427 unsigned int advertised, lpa;
2428
2429 /* Read link up status */
2430 efab->link_up = gmii_link_ok ( efab );
2431
2432 if ( ! efab->link_up )
2433 return -EIO;
2434
2435 /* Determine link options from PHY. */
2436 advertised = gmii_autoneg_advertised ( efab );
2437 lpa = gmii_autoneg_lpa ( efab );
2438 efab->link_options = gmii_nway_result ( advertised & lpa );
2439
2440 return 0;
2441}
static int gmii_link_ok(struct efab_nic *efab)
Check GMII PHY link status.
static unsigned int gmii_autoneg_lpa(struct efab_nic *efab)
Retrieve GMII autonegotiation link partner abilities.
static unsigned int gmii_autoneg_advertised(struct efab_nic *efab)
Retrieve GMII autonegotiation advertised abilities.
static unsigned int gmii_nway_result(unsigned int negotiated)
Calculate GMII autonegotiated link technology.

References EIO, gmii_autoneg_advertised(), gmii_autoneg_lpa(), gmii_link_ok(), gmii_nway_result(), efab_nic::link_options, and efab_nic::link_up.

◆ falcon_xfp_phy_init()

int falcon_xfp_phy_init ( struct efab_nic * efab)
static

Definition at line 2460 of file etherfabric.c.

2461{
2462 int rc;
2463
2464 /* Optical link is always 10000FD only */
2466
2467 /* Reset the PHY */
2469 if ( rc )
2470 return rc;
2471
2472 return 0;
2473}
static int mdio_clause45_reset_mmd(struct efab_nic *efab, int mmd)

References efab_nic::link_options, LPA_EF_10000FULL, mdio_clause45_reset_mmd(), MDIO_MMD_PHYXS, and rc.

◆ falcon_txc_logic_reset()

int falcon_txc_logic_reset ( struct efab_nic * efab)
static

Definition at line 2525 of file etherfabric.c.

2526{
2527 int val;
2528 int tries = 50;
2529
2531 val |= (1 << TXC_GLCMD_LMTSWRST_LBN);
2533
2534 while ( tries--) {
2536 if ( ~val & ( 1 << TXC_GLCMD_LMTSWRST_LBN ) )
2537 return 0;
2538 udelay(1);
2539 }
2540
2541 EFAB_ERR ( "logic reset failed\n" );
2542
2543 return -ETIMEDOUT;
2544}
#define TXC_GLCMD_LMTSWRST_LBN
#define MDIO_MMD_PCS
#define TXC_GLRGS_GLCMD

References EFAB_ERR, ETIMEDOUT, falcon_mdio_read(), falcon_mdio_write(), MDIO_MMD_PCS, TXC_GLCMD_LMTSWRST_LBN, TXC_GLRGS_GLCMD, udelay(), and val.

Referenced by falcon_txc_phy_init().

◆ falcon_txc_phy_init()

int falcon_txc_phy_init ( struct efab_nic * efab)
static

Definition at line 2547 of file etherfabric.c.

2548{
2549 int rc;
2550
2551 /* CX4 is always 10000FD only */
2553
2554 /* reset the phy */
2556 if ( rc )
2557 goto fail1;
2558
2559 rc = mdio_clause45_check_mmds ( efab );
2560 if ( rc )
2561 goto fail2;
2562
2563 /* Turn amplitude down and preemphasis off on the host side
2564 * (PHY<->MAC) as this is believed less likely to upset falcon
2565 * and no adverse effects have been noted. It probably also
2566 * saves a picowatt or two */
2567
2568 /* Turn off preemphasis */
2573
2574 /* Turn down the amplitude */
2579
2580 /* Set the line side amplitude and preemphasis to the databook
2581 * defaults as an erratum causes them to be 0 on at least some
2582 * PHY rev.s */
2591
2592 rc = falcon_txc_logic_reset ( efab );
2593 if ( rc )
2594 goto fail3;
2595
2596 return 0;
2597
2598fail3:
2599fail2:
2600fail1:
2601 return rc;
2602}
#define TXC_ATXAMP_0820_BOTH
#define MDIO_MMD_PMAPMD
#define TXC_ATXAMP_DEFAULT
#define TXC_ATXPRE_NONE
static int mdio_clause45_check_mmds(struct efab_nic *efab)
static int falcon_txc_logic_reset(struct efab_nic *efab)
#define TXC_ALRGS_ATXPRE1
#define TXC_ALRGS_ATXAMP0
#define TXC_ALRGS_ATXPRE0
#define TXC_ATXPRE_DEFAULT
#define TXC_ALRGS_ATXAMP1

References falcon_mdio_write(), falcon_txc_logic_reset(), efab_nic::link_options, LPA_EF_10000FULL, mdio_clause45_check_mmds(), mdio_clause45_reset_mmd(), MDIO_MMD_PHYXS, MDIO_MMD_PMAPMD, rc, TXC_ALRGS_ATXAMP0, TXC_ALRGS_ATXAMP1, TXC_ALRGS_ATXPRE0, TXC_ALRGS_ATXPRE1, TXC_ATXAMP_0820_BOTH, TXC_ATXAMP_DEFAULT, TXC_ATXPRE_DEFAULT, and TXC_ATXPRE_NONE.

◆ falcon_tenxpress_check_c11()

int falcon_tenxpress_check_c11 ( struct efab_nic * efab)
static

Definition at line 2645 of file etherfabric.c.

2646{
2647 int count;
2648 uint32_t boot_stat;
2649
2650 /* Check that the C11 CPU has booted */
2651 for (count=0; count<10; count++) {
2652 boot_stat = falcon_mdio_read ( efab, MDIO_MMD_PCS,
2654 if ( boot_stat & ( 1 << PCS_BOOT_COMPLETE_LBN ) )
2655 return 0;
2656
2657 udelay(10);
2658 }
2659
2660 EFAB_ERR ( "C11 failed to boot\n" );
2661 return -ETIMEDOUT;
2662}
unsigned int uint32_t
Definition stdint.h:12
#define PCS_BOOT_STATUS_REG
#define PCS_BOOT_COMPLETE_LBN

References count, EFAB_ERR, ETIMEDOUT, falcon_mdio_read(), MDIO_MMD_PCS, PCS_BOOT_COMPLETE_LBN, PCS_BOOT_STATUS_REG, and udelay().

Referenced by falcon_tenxpress_phy_init().

◆ falcon_tenxpress_phy_init()

int falcon_tenxpress_phy_init ( struct efab_nic * efab)
static

Definition at line 2665 of file etherfabric.c.

2666{
2667 int rc, reg;
2668
2669 /* 10XPRESS is always 10000FD (at the moment) */
2671
2672 /* Wait for the blocks to come out of reset */
2674 if ( rc )
2675 goto fail1;
2676
2677 rc = mdio_clause45_check_mmds ( efab );
2678 if ( rc )
2679 goto fail2;
2680
2681 /* Turn on the clock */
2682 reg = (1 << CLK312_EN_LBN);
2684
2685 /* Wait 200ms for the PHY to boot */
2686 mdelay(200);
2687
2688 rc = falcon_tenxpress_check_c11 ( efab );
2689 if ( rc )
2690 goto fail3;
2691
2692 return 0;
2693
2694fail3:
2695fail2:
2696fail1:
2697 return rc;
2698}
#define PCS_TEST_SELECT_REG
static int falcon_tenxpress_check_c11(struct efab_nic *efab)
static int mdio_clause45_wait_reset_mmds(struct efab_nic *efab)
#define CLK312_EN_LBN

References CLK312_EN_LBN, falcon_mdio_write(), falcon_tenxpress_check_c11(), efab_nic::link_options, LPA_EF_10000FULL, mdelay(), mdio_clause45_check_mmds(), mdio_clause45_wait_reset_mmds(), MDIO_MMD_PCS, PCS_TEST_SELECT_REG, rc, and reg.

◆ falcon_pm8358_phy_init()

int falcon_pm8358_phy_init ( struct efab_nic * efab)
static

Definition at line 2744 of file etherfabric.c.

2746{
2747 int rc, reg, i;
2748
2749 /* This is a XAUI retimer part */
2751
2753 if ( rc )
2754 return rc;
2755
2756 /* Enable software control of analogue settings */
2760
2761 /* Turn rx eq on for all channels */
2762 for (i=0; i< 3; i++) {
2763 /* The analog CFG registers are evenly spaced 8 apart */
2768 }
2769
2770 /* Set TEDGE, clear REDGE */
2774
2775 return 0;
unsigned short uint16_t
Definition stdint.h:11
uint32_t addr
Buffer address.
Definition dwmac.h:9
#define MDIO_MMDREG_DEVS0_DTEXS
#define PMC_MCONF2_REG
#define PMC_ANALOG_RX_EQ_MASK
#define PMC_ANALOG_RX_EQ_FULL
#define PMC_MCONF2_TEDGE
#define PMC_MASTER_REG
#define MDIO_MMD_DTEXS
#define PMC_MCONF2_REDGE
#define PMC_MASTER_ANLG_CTRL
#define PMC_ANALOG_RX_CFG0

References addr, falcon_mdio_read(), falcon_mdio_write(), efab_nic::link_options, LPA_EF_10000FULL, mdio_clause45_reset_mmd(), MDIO_MMD_DTEXS, MDIO_MMDREG_DEVS0_DTEXS, PMC_ANALOG_RX_CFG0, PMC_ANALOG_RX_EQ_FULL, PMC_ANALOG_RX_EQ_MASK, PMC_MASTER_ANLG_CTRL, PMC_MASTER_REG, PMC_MCONF2_REDGE, PMC_MCONF2_REG, PMC_MCONF2_TEDGE, rc, and reg.

◆ sfe4001_init()

int sfe4001_init ( struct efab_nic * efab)
static

Definition at line 2843 of file etherfabric.c.

2845{
2846 struct i2c_interface *i2c = &efab->i2c_bb.i2c;
2848 uint8_t in, cfg, out;
2849 int count, rc;
2850
2851 EFAB_LOG ( "Initialise SFE4001 board\n" );
2852
2853 /* Ensure XGXS and XAUI SerDes are held in reset */
2855 FCN_XX_PWRDNA_EN, 1,
2856 FCN_XX_PWRDNB_EN, 1,
2857 FCN_XX_RSTPLLAB_EN, 1,
2858 FCN_XX_RESETA_EN, 1,
2859 FCN_XX_RESETB_EN, 1,
2860 FCN_XX_RSTXGXSRX_EN, 1,
2861 FCN_XX_RSTXGXSTX_EN, 1 );
2863 udelay(10);
2864
2865 /* Set DSP over-temperature alert threshold */
2867 rc = i2c->write ( i2c, &i2c_max6647, WLHO, &cfg, EFAB_BYTE );
2868 if ( rc )
2869 goto fail1;
2870
2871 /* Read it back and verify */
2872 rc = i2c->read ( i2c, &i2c_max6647, RLHN, &in, EFAB_BYTE );
2873 if ( rc )
2874 goto fail2;
2875
2876 if ( in != MAX_TEMP_THRESH ) {
2877 EFAB_ERR ( "Unable to verify MAX6647 limit (requested=%d "
2878 "confirmed=%d)\n", cfg, in );
2879 rc = -EIO;
2880 goto fail3;
2881 }
2882
2883 /* Clear any previous over-temperature alert */
2884 rc = i2c->read ( i2c, &i2c_max6647, RSL, &in, EFAB_BYTE );
2885 if ( rc )
2886 goto fail4;
2887
2888 /* Enable port 0 and 1 outputs on IO expander */
2889 cfg = 0x00;
2890 rc = i2c->write ( i2c, &i2c_pca9539, P0_CONFIG, &cfg, EFAB_BYTE );
2891 if ( rc )
2892 goto fail5;
2893 cfg = 0xff & ~(1 << P1_SPARE_LBN);
2894 rc = i2c->write ( i2c, &i2c_pca9539, P1_CONFIG, &cfg, EFAB_BYTE );
2895 if ( rc )
2896 goto fail6;
2897
2898 /* Turn all power off then wait 1 sec. This ensures PHY is reset */
2899 out = 0xff & ~((0 << P0_EN_1V2_LBN) | (0 << P0_EN_2V5_LBN) |
2900 (0 << P0_EN_3V3X_LBN) | (0 << P0_EN_5V_LBN) |
2901 (0 << P0_EN_1V0X_LBN));
2902
2903 rc = i2c->write ( i2c, &i2c_pca9539, P0_OUT, &out, EFAB_BYTE );
2904 if ( rc )
2905 goto fail7;
2906
2907 mdelay(1000);
2908
2909 for (count=0; count<20; count++) {
2910 /* Turn on 1.2V, 2.5V, 3.3V and 5V power rails */
2911 out = 0xff & ~( (1 << P0_EN_1V2_LBN) | (1 << P0_EN_2V5_LBN) |
2912 (1 << P0_EN_3V3X_LBN) | (1 << P0_EN_5V_LBN) |
2913 (1 << P0_X_TRST_LBN) );
2914
2915 rc = i2c->write ( i2c, &i2c_pca9539, P0_OUT, &out, EFAB_BYTE );
2916 if ( rc )
2917 goto fail8;
2918
2919 mdelay ( 10 );
2920
2921 /* Turn on the 1V power rail */
2922 out &= ~( 1 << P0_EN_1V0X_LBN );
2923 rc = i2c->write ( i2c, &i2c_pca9539, P0_OUT, &out, EFAB_BYTE );
2924 if ( rc )
2925 goto fail9;
2926
2927 EFAB_LOG ( "Waiting for power...(attempt %d)\n", count);
2928 mdelay ( 1000 );
2929
2930 /* Check DSP is powered */
2931 rc = i2c->read ( i2c, &i2c_pca9539, P1_IN, &in, EFAB_BYTE );
2932 if ( rc )
2933 goto fail10;
2934
2935 if ( in & ( 1 << P1_AFE_PWD_LBN ) )
2936 return 0;
2937 }
2938
2939 rc = -ETIMEDOUT;
2940
2941fail10:
2942fail9:
2943fail8:
2944fail7:
2945 /* Turn off power rails */
2946 out = 0xff;
2947 (void) i2c->write ( i2c, &i2c_pca9539, P0_OUT, &out, EFAB_BYTE );
2948 /* Disable port 1 outputs on IO expander */
2949 out = 0xff;
2950 (void) i2c->write ( i2c, &i2c_pca9539, P1_CONFIG, &out, EFAB_BYTE );
2951fail6:
2952 /* Disable port 0 outputs */
2953 out = 0xff;
2954 (void) i2c->write ( i2c, &i2c_pca9539, P1_CONFIG, &out, EFAB_BYTE );
2955fail5:
2956fail4:
2957fail3:
2958fail2:
2959fail1:
2960 EFAB_ERR ( "Failed initialising SFE4001 board\n" );
2961 return rc;
__be32 in[4]
Definition CIB_PRM.h:7
__be32 out[4]
Definition CIB_PRM.h:8
unsigned char uint8_t
Definition stdint.h:10
#define WLHO
#define P0_EN_5V_LBN
static struct i2c_device i2c_max6647
#define MAX_TEMP_THRESH
#define P0_EN_1V2_LBN
#define RLHN
#define EFAB_BYTE
Definition etherfabric.c:57
#define P1_SPARE_LBN
#define P1_CONFIG
#define P0_CONFIG
#define P0_X_TRST_LBN
static struct i2c_device i2c_pca9539
#define P0_EN_1V0X_LBN
#define P1_IN
#define P0_EN_2V5_LBN
#define RSL
#define P1_AFE_PWD_LBN
#define P0_OUT
#define P0_EN_3V3X_LBN
#define EFAB_POPULATE_DWORD_7(dword,...)
@ cfg
Definition sis900.h:23
struct i2c_interface i2c
I2C interface.
Definition i2c.h:93
An I2C interface.
Definition i2c.h:57
int(* write)(struct i2c_interface *i2c, struct i2c_device *i2cdev, unsigned int offset, const uint8_t *data, unsigned int len)
Write data to I2C device.
Definition i2c.h:81
int(* read)(struct i2c_interface *i2c, struct i2c_device *i2cdev, unsigned int offset, uint8_t *data, unsigned int len)
Read data from I2C device.
Definition i2c.h:68

References cfg, count, EFAB_BYTE, EFAB_ERR, EFAB_LOG, EFAB_POPULATE_DWORD_7, EIO, ETIMEDOUT, falcon_xmac_writel(), FCN_XX_PWR_RST_REG_MAC, i2c_bit_basher::i2c, efab_nic::i2c_bb, i2c_max6647, i2c_pca9539, in, MAX_TEMP_THRESH, mdelay(), out, P0_CONFIG, P0_EN_1V0X_LBN, P0_EN_1V2_LBN, P0_EN_2V5_LBN, P0_EN_3V3X_LBN, P0_EN_5V_LBN, P0_OUT, P0_X_TRST_LBN, P1_AFE_PWD_LBN, P1_CONFIG, P1_IN, P1_SPARE_LBN, rc, i2c_interface::read, reg, RLHN, RSL, udelay(), WLHO, and i2c_interface::write.

◆ sfe4001_fini()

void sfe4001_fini ( struct efab_nic * efab)
static

Definition at line 2964 of file etherfabric.c.

2966{
2967 struct i2c_interface *i2c = &efab->i2c_bb.i2c;
2968 uint8_t in, cfg, out;
2969
2970 EFAB_ERR ( "Turning off SFE4001\n" );
2971
2972 /* Turn off all power rails */
2973 out = 0xff;
2974 (void) i2c->write ( i2c, &i2c_pca9539, P0_OUT, &out, EFAB_BYTE );
2975
2976 /* Disable port 1 outputs on IO expander */
2977 cfg = 0xff;
2978 (void) i2c->write ( i2c, &i2c_pca9539, P1_CONFIG, &cfg, EFAB_BYTE );
2979
2980 /* Disable port 0 outputs on IO expander */
2981 cfg = 0xff;
2982 (void) i2c->write ( i2c, &i2c_pca9539, P0_CONFIG, &cfg, EFAB_BYTE );
2983
2984 /* Clear any over-temperature alert */
2985 (void) i2c->read ( i2c, &i2c_max6647, RSL, &in, EFAB_BYTE );

References cfg, EFAB_BYTE, EFAB_ERR, i2c_bit_basher::i2c, efab_nic::i2c_bb, i2c_max6647, i2c_pca9539, in, out, P0_CONFIG, P0_OUT, P1_CONFIG, i2c_interface::read, RSL, and i2c_interface::write.

◆ sfe4002_init()

int sfe4002_init ( struct efab_nic * efab)
static

Definition at line 2992 of file etherfabric.c.

2994{
2995 return 0;

References unused.

◆ sfe4002_fini()

void sfe4002_fini ( struct efab_nic * efab)
static

Definition at line 2996 of file etherfabric.c.

2998{

◆ sfe4003_init()

int sfe4003_init ( struct efab_nic * efab)
static

Definition at line 3005 of file etherfabric.c.

3007{
3008 return 0;

References unused.

◆ sfe4003_fini()

void sfe4003_fini ( struct efab_nic * efab)
static

Definition at line 3009 of file etherfabric.c.

3011{

◆ falcon_free_special_buffer()

void falcon_free_special_buffer ( void * p)
static

Definition at line 3027 of file etherfabric.c.

3029{
3030 /* We don't bother cleaning up the buffer table entries -
3031 * we're hardly limited */
#define EFAB_BUF_ALIGN
void free_phys(void *ptr, size_t size)
Free memory allocated with malloc_phys()
Definition malloc.c:723

References EFAB_BUF_ALIGN, and free_phys().

Referenced by efab_alloc_resources(), and efab_free_resources().

◆ falcon_alloc_special_buffer()

void * falcon_alloc_special_buffer ( struct efab_nic * efab,
int bytes,
struct efab_special_buffer * entry )
static

Definition at line 3035 of file etherfabric.c.

3038{
3039 void* buffer;
3040 int remaining;
3041 efab_qword_t buf_desc;
3042 unsigned long dma_addr;
3043
3044 /* Allocate the buffer, aligned on a buffer address boundary */
3046 if ( ! buffer )
3047 return NULL;
3048
3049 /* Push buffer table entries to back the buffer */
3050 entry->id = efab->buffer_head;
3051 entry->dma_addr = dma_addr = virt_to_bus ( buffer );
3052 assert ( ( dma_addr & ( EFAB_BUF_ALIGN - 1 ) ) == 0 );
3053
3054 remaining = bytes;
3055 while ( remaining > 0 ) {
3056 EFAB_POPULATE_QWORD_3 ( buf_desc,
3057 FCN_IP_DAT_BUF_SIZE, FCN_IP_DAT_BUF_SIZE_4K,
3058 FCN_BUF_ADR_FBUF, ( dma_addr >> 12 ),
3059 FCN_BUF_OWNER_ID_FBUF, 0 );
3060
3061 falcon_write_sram ( efab, &buf_desc, efab->buffer_head );
3062
3063 ++efab->buffer_head;
3064 dma_addr += EFAB_BUF_ALIGN;
3065 remaining -= EFAB_BUF_ALIGN;
3066 }
3067
3068 EFAB_TRACE ( "Allocated 0x%x bytes at %p backed by buffer table "
3069 "entries 0x%x..0x%x\n", bytes, buffer, entry->id,
3070 efab->buffer_head - 1 );
3071
3072 return buffer;
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
#define FCN_IP_DAT_BUF_SIZE_4K
static void falcon_write_sram(struct efab_nic *efab, efab_qword_t *value, unsigned int index)
Write to Falcon SRAM.
#define EFAB_POPULATE_QWORD_3(qword,...)
union efab_qword efab_qword_t
A quadword (i.e.
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition netvsc.h:5
uint8_t bytes[64]
Definition ib_mad.h:5
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
Definition io.h:184
void * malloc_phys(size_t size, size_t phys_align)
Allocate memory with specified physical alignment.
Definition malloc.c:707

References assert, buffer, efab_nic::buffer_head, bytes, efab_special_buffer::dma_addr, EFAB_BUF_ALIGN, EFAB_POPULATE_QWORD_3, EFAB_TRACE, falcon_write_sram(), FCN_IP_DAT_BUF_SIZE_4K, efab_special_buffer::id, malloc_phys(), NULL, and virt_to_bus().

Referenced by efab_alloc_resources().

◆ clear_b0_fpga_memories()

void clear_b0_fpga_memories ( struct efab_nic * efab)
static

Definition at line 3075 of file etherfabric.c.

3077{
3078 efab_oword_t blanko, temp;
3079 int offset;
3080
3081 EFAB_ZERO_OWORD ( blanko );
3082
3083 /* Clear the address region register */
3084 EFAB_POPULATE_OWORD_4 ( temp,
3085 FCN_ADR_REGION0, 0,
3086 FCN_ADR_REGION1, ( 1 << 16 ),
3087 FCN_ADR_REGION2, ( 2 << 16 ),
3088 FCN_ADR_REGION3, ( 3 << 16 ) );
3089 falcon_write ( efab, &temp, FCN_ADR_REGION_REG_KER );
3090
3091 EFAB_TRACE ( "Clearing filter and RSS tables\n" );
3092
3093 for ( offset = FCN_RX_FILTER_TBL0 ;
3095 offset += 0x10 ) {
3096 falcon_write ( efab, &blanko, offset );
3097 }
3098
3099 EFAB_TRACE ( "Wiping buffer tables\n" );
3100
3101 /* Notice the 8 byte access mode */
3102 for ( offset = 0x2800000 ;
3103 offset < 0x3000000 ;
3104 offset += 0x8) {
3105 _falcon_writel ( efab, 0, offset );
3106 _falcon_writel ( efab, 0, offset + 4 );
3107 wmb();
3108 }
uint16_t offset
Offset to command line.
Definition bzimage.h:3
#define FCN_RX_RSS_INDIR_TBL_B0
#define FCN_RX_FILTER_TBL0
#define FCN_ADR_REGION_REG_KER
#define EFAB_ZERO_OWORD(oword)
#define EFAB_POPULATE_OWORD_4(oword,...)

References _falcon_writel, EFAB_POPULATE_OWORD_4, EFAB_TRACE, EFAB_ZERO_OWORD, falcon_write(), FCN_ADR_REGION_REG_KER, FCN_RX_FILTER_TBL0, FCN_RX_RSS_INDIR_TBL_B0, offset, and wmb.

Referenced by falcon_reset().

◆ falcon_reset()

int falcon_reset ( struct efab_nic * efab)
static

Definition at line 3111 of file etherfabric.c.

3113{
3114 efab_oword_t glb_ctl_reg_ker;
3115
3116 /* Initiate software reset */
3117 EFAB_POPULATE_OWORD_6 ( glb_ctl_reg_ker,
3118 FCN_PCIE_CORE_RST_CTL, EXCLUDE_FROM_RESET,
3119 FCN_PCIE_NSTCK_RST_CTL, EXCLUDE_FROM_RESET,
3120 FCN_PCIE_SD_RST_CTL, EXCLUDE_FROM_RESET,
3121 FCN_EE_RST_CTL, EXCLUDE_FROM_RESET,
3122 FCN_EXT_PHY_RST_DUR, 0x7, /* 10ms */
3123 FCN_SWRST, 1 );
3124
3125 falcon_write ( efab, &glb_ctl_reg_ker, FCN_GLB_CTL_REG_KER );
3126
3127 /* Allow 50ms for reset */
3128 mdelay ( 50 );
3129
3130 /* Check for device reset complete */
3131 falcon_read ( efab, &glb_ctl_reg_ker, FCN_GLB_CTL_REG_KER );
3132 if ( EFAB_OWORD_FIELD ( glb_ctl_reg_ker, FCN_SWRST ) != 0 ) {
3133 EFAB_ERR ( "Reset failed\n" );
3134 return -ETIMEDOUT;
3135 }
3136
3137 if ( ( efab->pci_revision == FALCON_REV_B0 ) && !efab->is_asic ) {
3138 clear_b0_fpga_memories ( efab );
3139 }
3140
3141 return 0;
#define EXCLUDE_FROM_RESET
static void clear_b0_fpga_memories(struct efab_nic *efab)
#define FCN_GLB_CTL_REG_KER
#define EFAB_POPULATE_OWORD_6(oword,...)

References clear_b0_fpga_memories(), EFAB_ERR, EFAB_OWORD_FIELD, EFAB_POPULATE_OWORD_6, ETIMEDOUT, EXCLUDE_FROM_RESET, falcon_read(), FALCON_REV_B0, falcon_write(), FCN_GLB_CTL_REG_KER, efab_nic::is_asic, mdelay(), and efab_nic::pci_revision.

Referenced by efab_close(), efab_open(), and efab_remove().

◆ falcon_probe_nic_variant()

void falcon_probe_nic_variant ( struct efab_nic * efab,
struct pci_device * pci )
static

Definition at line 3175 of file etherfabric.c.

3177{
3178 efab_oword_t altera_build, nic_stat;
3179 int fpga_version;
3181
3182 /* PCI revision */
3184 efab->pci_revision = revision;
3185
3186 /* Asic vs FPGA */
3187 falcon_read ( efab, &altera_build, FCN_ALTERA_BUILD_REG_KER );
3188 fpga_version = EFAB_OWORD_FIELD ( altera_build, FCN_VER_ALL );
3189 efab->is_asic = (fpga_version == 0);
3190
3191 /* MAC and PCI type */
3192 falcon_read ( efab, &nic_stat, FCN_NIC_STAT_REG );
3193 if ( efab->pci_revision == FALCON_REV_B0 ) {
3194 efab->phy_10g = EFAB_OWORD_FIELD ( nic_stat, FCN_STRAP_10G );
3195 }
3196 else if ( efab->is_asic ) {
3197 efab->phy_10g = EFAB_OWORD_FIELD ( nic_stat, FCN_STRAP_10G );
3198 }
3199 else {
3200 int minor = EFAB_OWORD_FIELD ( altera_build, FCN_VER_MINOR );
3201 efab->phy_10g = ( minor == 0x14 );
3202 }
#define FCN_ALTERA_BUILD_REG_KER
#define FCN_NIC_STAT_REG
uint32_t revision
Entry point revision.
Definition ib_mad.h:9
int pci_read_config_byte(struct pci_device *pci, unsigned int where, uint8_t *value)
Read byte from PCI configuration space.
uint32_t minor
Minor version.
Definition netvsc.h:5
#define PCI_REVISION
PCI revision.
Definition pci.h:45

References EFAB_OWORD_FIELD, falcon_read(), FALCON_REV_B0, FCN_ALTERA_BUILD_REG_KER, FCN_NIC_STAT_REG, efab_nic::is_asic, minor, pci_read_config_byte(), PCI_REVISION, efab_nic::pci_revision, efab_nic::phy_10g, and revision.

Referenced by efab_probe().

◆ falcon_init_spi_device()

void falcon_init_spi_device ( struct efab_nic * efab,
struct spi_device * spi )
static

Definition at line 3205 of file etherfabric.c.

3207{
3208 /* Falcon's SPI interface only supports reads/writes of up to 16 bytes.
3209 * Reduce the nvs block size down to satisfy this - which means callers
3210 * should use the nvs_* functions rather than spi_*. */
3211 if ( spi->nvs.block_size > FALCON_SPI_MAX_LEN )
3213
3214 spi->bus = &efab->spi_bus;
3215 efab->spi = spi;
struct spi_device * spi
struct spi_bus spi_bus
SPI bus and devices, and the user visible NVO area.
unsigned int block_size
Data block size (in words)
Definition nvs.h:37
struct nvs_device nvs
NVS device.
Definition spi.h:89
struct spi_bus * bus
SPI bus to which device is attached.
Definition spi.h:91

References nvs_device::block_size, spi_device::bus, FALCON_SPI_MAX_LEN, spi_device::nvs, efab_nic::spi, and efab_nic::spi_bus.

Referenced by falcon_probe_spi().

◆ falcon_probe_spi()

int falcon_probe_spi ( struct efab_nic * efab)
static

Definition at line 3218 of file etherfabric.c.

3220{
3221 efab_oword_t nic_stat, gpio_ctl, ee_vpd_cfg;
3222 int has_flash, has_eeprom, ad9bit;
3223
3224 falcon_read ( efab, &nic_stat, FCN_NIC_STAT_REG );
3225 falcon_read ( efab, &gpio_ctl, FCN_GPIO_CTL_REG_KER );
3226 falcon_read ( efab, &ee_vpd_cfg, FCN_EE_VPD_CFG_REG );
3227
3228 /* determine if FLASH / EEPROM is present */
3229 if ( ( efab->pci_revision >= FALCON_REV_B0 ) || efab->is_asic ) {
3230 has_flash = EFAB_OWORD_FIELD ( nic_stat, FCN_SF_PRST );
3231 has_eeprom = EFAB_OWORD_FIELD ( nic_stat, FCN_EE_PRST );
3232 } else {
3233 has_flash = EFAB_OWORD_FIELD ( gpio_ctl, FCN_FLASH_PRESENT );
3234 has_eeprom = EFAB_OWORD_FIELD ( gpio_ctl, FCN_EEPROM_PRESENT );
3235 }
3236 ad9bit = EFAB_OWORD_FIELD ( ee_vpd_cfg, FCN_EE_VPD_EN_AD9_MODE );
3237
3238 /* Configure the SPI and I2C bus */
3239 efab->spi_bus.rw = falcon_spi_rw;
3241
3242 /* Configure the EEPROM SPI device. Generally, an Atmel 25040
3243 * (or similar) is used, but this is only possible if there is also
3244 * a flash device present to store the boot-time chip configuration.
3245 */
3246 if ( has_eeprom ) {
3247 if ( has_flash && ad9bit )
3248 init_at25040 ( &efab->spi_eeprom );
3249 else
3250 init_mc25xx640 ( &efab->spi_eeprom );
3251 falcon_init_spi_device ( efab, &efab->spi_eeprom );
3252 }
3253
3254 /* Configure the FLASH SPI device */
3255 if ( has_flash ) {
3256 init_at25f1024 ( &efab->spi_flash );
3257 falcon_init_spi_device ( efab, &efab->spi_flash );
3258 }
3259
3260 EFAB_LOG ( "flash is %s, EEPROM is %s%s\n",
3261 ( has_flash ? "present" : "absent" ),
3262 ( has_eeprom ? "present " : "absent" ),
3263 ( has_eeprom ? (ad9bit ? "(9bit)" : "(16bit)") : "") );
3264
3265 /* The device MUST have flash or eeprom */
3266 if ( ! efab->spi ) {
3267 EFAB_ERR ( "Device appears to have no flash or eeprom\n" );
3268 return -EIO;
3269 }
3270
3271 /* If the device has EEPROM attached, then advertise NVO space */
3272 if ( has_eeprom ) {
3273 nvo_init ( &efab->nvo, &efab->spi_eeprom.nvs, 0x100, 0xf0,
3274 NULL, &efab->netdev->refcnt );
3275 }
3276
3277 return 0;
#define FCN_EE_VPD_CFG_REG
static struct bit_basher_operations falcon_i2c_bit_ops
static int falcon_spi_rw(struct spi_bus *bus, struct spi_device *device, unsigned int command, int address, const void *data_out, void *data_in, size_t len)
static void falcon_init_spi_device(struct efab_nic *efab, struct spi_device *spi)
int init_i2c_bit_basher(struct i2c_bit_basher *i2cbit, struct bit_basher_operations *bash_op)
Initialise I2C bit-bashing interface.
Definition i2c_bit.c:387
void nvo_init(struct nvo_block *nvo, struct nvs_device *nvs, size_t address, size_t len, int(*resize)(struct nvo_block *nvo, size_t len), struct refcnt *refcnt)
Initialise non-volatile stored options.
Definition nvo.c:274
struct nvo_block nvo
struct net_device * netdev
struct refcnt refcnt
Reference counter.
Definition netdevice.h:355
int(* rw)(struct spi_bus *bus, struct spi_device *device, unsigned int command, int address, const void *data_out, void *data_in, size_t len)
Read/write data via SPI bus.
Definition spi.h:153

References EFAB_ERR, EFAB_LOG, EFAB_OWORD_FIELD, EIO, falcon_i2c_bit_ops, falcon_init_spi_device(), falcon_read(), FALCON_REV_B0, falcon_spi_rw(), FCN_EE_VPD_CFG_REG, FCN_GPIO_CTL_REG_KER, FCN_NIC_STAT_REG, efab_nic::i2c_bb, init_i2c_bit_basher(), efab_nic::is_asic, efab_nic::netdev, NULL, efab_nic::nvo, nvo_init(), spi_device::nvs, efab_nic::pci_revision, net_device::refcnt, spi_bus::rw, efab_nic::spi, efab_nic::spi_bus, efab_nic::spi_eeprom, and efab_nic::spi_flash.

Referenced by efab_probe().

◆ falcon_probe_nvram()

int falcon_probe_nvram ( struct efab_nic * efab)
static

Definition at line 3280 of file etherfabric.c.

3282{
3283 struct nvs_device *nvs = &efab->spi->nvs;
3284 struct falcon_nv_extra nv;
3285 int rc, board_revision;
3286
3287 /* Read the MAC address */
3289 efab->mac_addr, ETH_ALEN );
3290 if ( rc )
3291 return rc;
3292
3293 /* Poke through the NVRAM structure for the PHY type. */
3295 &nv, sizeof ( nv ) );
3296 if ( rc )
3297 return rc;
3298
3299 /* Handle each supported NVRAM version */
3300 if ( ( le16_to_cpu ( nv.magicnumber ) == FCN_NV_MAGIC_NUMBER ) &&
3301 ( le16_to_cpu ( nv.structure_version ) >= 2 ) ) {
3302 struct falcon_nv_config_ver2* ver2 = &nv.ver_specific.ver2;
3303
3304 /* Get the PHY type */
3305 efab->phy_addr = le16_to_cpu ( ver2->port0_phy_addr );
3306 efab->phy_type = le16_to_cpu ( ver2->port0_phy_type );
3308 }
3309 else {
3310 EFAB_ERR ( "NVram is not recognised\n" );
3311 return -EINVAL;
3312 }
3313
3315
3316 EFAB_TRACE ( "Falcon board %d phy %d @ addr %d\n",
3317 efab->board_type, efab->phy_type, efab->phy_addr );
3318
3319 /* Patch in the board operations */
3320 switch ( efab->board_type ) {
3321 case EFAB_BOARD_SFE4001:
3322 efab->board_op = &sfe4001_ops;
3323 break;
3324 case EFAB_BOARD_SFE4002:
3325 efab->board_op = &sfe4002_ops;
3326 break;
3327 case EFAB_BOARD_SFE4003:
3328 efab->board_op = &sfe4003_ops;
3329 break;
3330 default:
3331 EFAB_ERR ( "Unrecognised board type\n" );
3332 return -EINVAL;
3333 }
3334
3335 /* Patch in MAC operations */
3336 if ( efab->phy_10g )
3338 else
3340
3341 /* Hook in the PHY ops */
3342 switch ( efab->phy_type ) {
3343 case PHY_TYPE_10XPRESS:
3345 break;
3346 case PHY_TYPE_CX4:
3347 efab->phy_op = &falcon_xaui_phy_ops;
3348 break;
3349 case PHY_TYPE_XFP:
3350 efab->phy_op = &falcon_xfp_phy_ops;
3351 break;
3352 case PHY_TYPE_CX4_RTMR:
3353 efab->phy_op = &falcon_txc_phy_ops;
3354 break;
3355 case PHY_TYPE_PM8358:
3357 break;
3360 break;
3361 default:
3362 EFAB_ERR ( "Unknown PHY type: %d\n", efab->phy_type );
3363 return -EINVAL;
3364 }
3365
3366 return 0;
#define BOARD_TYPE(_rev)
#define SF_NV_CONFIG_EXTRA
static struct efab_mac_operations falcon_gmac_operations
static struct efab_phy_operations falcon_alaska_phy_ops
static struct efab_phy_operations falcon_txc_phy_ops
static struct efab_mac_operations falcon_xmac_operations
struct efab_board_operations sfe4003_ops
static struct efab_phy_operations falcon_xfp_phy_ops
static struct efab_phy_operations falcon_pm8358_phy_ops
struct efab_board_operations sfe4001_ops
struct efab_board_operations sfe4002_ops
static struct efab_phy_operations falcon_tenxpress_phy_ops
#define FCN_NV_MAGIC_NUMBER
#define SF_NV_CONFIG_BASE
static struct efab_phy_operations falcon_xaui_phy_ops
#define FALCON_MAC_ADDRESS_OFFSET
Offset of MAC address within EEPROM or Flash.
@ PHY_TYPE_CX4_RTMR
@ PHY_TYPE_CX4
@ PHY_TYPE_XFP
@ PHY_TYPE_PM8358
@ PHY_TYPE_10XPRESS
@ PHY_TYPE_1GIG_ALASKA
@ EFAB_BOARD_SFE4001
@ EFAB_BOARD_SFE4003
@ EFAB_BOARD_SFE4002
#define ETH_ALEN
Definition if_ether.h:9
#define le16_to_cpu(value)
Definition byteswap.h:113
int nvs_read(struct nvs_device *nvs, unsigned int address, void *data, size_t len)
Read from non-volatile storage device.
Definition nvs.c:76
struct efab_board_operations * board_op
Board, MAC, and PHY operations tables.
struct efab_mac_operations * mac_op
A non-volatile storage device.
Definition nvs.h:16

References efab_nic::board_op, falcon_nv_config_ver2::board_revision, BOARD_TYPE, efab_nic::board_type, EFAB_BOARD_SFE4001, EFAB_BOARD_SFE4002, EFAB_BOARD_SFE4003, EFAB_ERR, EFAB_TRACE, EINVAL, ETH_ALEN, falcon_alaska_phy_ops, falcon_gmac_operations, FALCON_MAC_ADDRESS_OFFSET, falcon_pm8358_phy_ops, falcon_tenxpress_phy_ops, falcon_txc_phy_ops, falcon_xaui_phy_ops, falcon_xfp_phy_ops, falcon_xmac_operations, FCN_NV_MAGIC_NUMBER, le16_to_cpu, efab_nic::mac_addr, efab_nic::mac_op, falcon_nv_extra::magicnumber, spi_device::nvs, nvs_read(), efab_nic::phy_10g, efab_nic::phy_addr, efab_nic::phy_op, efab_nic::phy_type, PHY_TYPE_10XPRESS, PHY_TYPE_1GIG_ALASKA, PHY_TYPE_CX4, PHY_TYPE_CX4_RTMR, PHY_TYPE_PM8358, PHY_TYPE_XFP, falcon_nv_config_ver2::port0_phy_addr, falcon_nv_config_ver2::port0_phy_type, rc, SF_NV_CONFIG_BASE, SF_NV_CONFIG_EXTRA, sfe4001_ops, sfe4002_ops, sfe4003_ops, efab_nic::spi, falcon_nv_extra::structure_version, falcon_nv_extra::ver2, and falcon_nv_extra::ver_specific.

Referenced by efab_probe().

◆ falcon_init_sram()

int falcon_init_sram ( struct efab_nic * efab)
static

Definition at line 3369 of file etherfabric.c.

3371{
3373 int count;
3374
3375 /* use card in internal SRAM mode */
3376 falcon_read ( efab, &reg, FCN_NIC_STAT_REG );
3377 EFAB_SET_OWORD_FIELD ( reg, FCN_ONCHIP_SRAM, 1 );
3378 falcon_write ( efab, &reg, FCN_NIC_STAT_REG );
3379
3380 /* Deactivate any external SRAM that might be present */
3382 FCN_GPIO1_OEN, 1,
3383 FCN_GPIO1_OUT, 1 );
3385
3386 /* Initiate SRAM reset */
3388 FCN_SRAM_OOB_BT_INIT_EN, 1,
3389 FCN_SRM_NUM_BANKS_AND_BANK_SIZE, 0 );
3391
3392 /* Wait for SRAM reset to complete */
3393 count = 0;
3394 do {
3395 /* SRAM reset is slow; expect around 16ms */
3396 mdelay ( 20 );
3397
3398 /* Check for reset complete */
3400 if ( !EFAB_OWORD_FIELD ( reg, FCN_SRAM_OOB_BT_INIT_EN ) )
3401 return 0;
3402 } while (++count < 20); /* wait up to 0.4 sec */
3403
3404 EFAB_ERR ( "timed out waiting for SRAM reset\n");
3405 return -ETIMEDOUT;
#define FCN_SRM_CFG_REG_KER

References count, EFAB_ERR, EFAB_OWORD_FIELD, EFAB_POPULATE_OWORD_2, EFAB_SET_OWORD_FIELD, ETIMEDOUT, falcon_read(), falcon_write(), FCN_GPIO_CTL_REG_KER, FCN_NIC_STAT_REG, FCN_SRM_CFG_REG_KER, mdelay(), and reg.

Referenced by efab_open().

◆ falcon_setup_nic()

void falcon_setup_nic ( struct efab_nic * efab)
static

Definition at line 3408 of file etherfabric.c.

3410{
3411 efab_dword_t timer_cmd;
3413 int tx_fc, xoff_thresh, xon_thresh;
3414
3415 /* bug5129: Clear the parity enables on the TX data fifos as
3416 * they produce false parity errors because of timing issues
3417 */
3418 falcon_read ( efab, &reg, FCN_SPARE_REG_KER );
3419 EFAB_SET_OWORD_FIELD ( reg, FCN_MEM_PERR_EN_TX_DATA, 0 );
3421
3422 /* Set up TX and RX descriptor caches in SRAM */
3423 EFAB_POPULATE_OWORD_1 ( reg, FCN_SRM_TX_DC_BASE_ADR, 0x130000 );
3425 EFAB_POPULATE_OWORD_1 ( reg, FCN_TX_DC_SIZE, 1 /* 16 descriptors */ );
3427 EFAB_POPULATE_OWORD_1 ( reg, FCN_SRM_RX_DC_BASE_ADR, 0x100000 );
3429 EFAB_POPULATE_OWORD_1 ( reg, FCN_RX_DC_SIZE, 2 /* 32 descriptors */ );
3431
3432 /* Set number of RSS CPUs
3433 * bug7244: Increase filter depth to reduce RX_RESET likelihood
3434 */
3436 FCN_NUM_KER, 0,
3437 FCN_UDP_FULL_SRCH_LIMIT, 8,
3438 FCN_UDP_WILD_SRCH_LIMIT, 8,
3439 FCN_TCP_WILD_SRCH_LIMIT, 8,
3440 FCN_TCP_FULL_SRCH_LIMIT, 8);
3442 udelay ( 1000 );
3443
3444 /* Setup RX. Wait for descriptor is broken and must
3445 * be disabled. RXDP recovery shouldn't be needed, but is.
3446 * disable ISCSI parsing because we don't need it
3447 */
3449 EFAB_SET_OWORD_FIELD ( reg, FCN_RX_NODESC_WAIT_DIS, 1 );
3450 EFAB_SET_OWORD_FIELD ( reg, FCN_RX_RECOVERY_EN, 1 );
3451 EFAB_SET_OWORD_FIELD ( reg, FCN_RX_ISCSI_DIS, 1 );
3453
3454 /* Determine recommended flow control settings. *
3455 * Flow control is qualified on B0 and A1/1G, not on A1/10G */
3456 if ( efab->pci_revision == FALCON_REV_B0 ) {
3457 tx_fc = 1;
3458 xoff_thresh = 54272; /* ~80Kb - 3*max MTU */
3459 xon_thresh = 27648; /* ~3*max MTU */
3460 }
3461 else if ( !efab->phy_10g ) {
3462 tx_fc = 1;
3463 xoff_thresh = 2048;
3464 xon_thresh = 512;
3465 }
3466 else {
3467 tx_fc = xoff_thresh = xon_thresh = 0;
3468 }
3469
3470 /* Setup TX and RX */
3472 EFAB_SET_OWORD_FIELD ( reg, FCN_TX_DIS_NON_IP_EV, 1 );
3474
3476 EFAB_SET_OWORD_FIELD_VER ( efab, reg, FCN_RX_USR_BUF_SIZE,
3477 (3*4096) / 32 );
3478 if ( efab->pci_revision == FALCON_REV_B0)
3479 EFAB_SET_OWORD_FIELD ( reg, FCN_RX_INGR_EN_B0, 1 );
3480 EFAB_SET_OWORD_FIELD_VER ( efab, reg, FCN_RX_XON_MAC_TH,
3481 xon_thresh / 256);
3482 EFAB_SET_OWORD_FIELD_VER ( efab, reg, FCN_RX_XOFF_MAC_TH,
3483 xoff_thresh / 256);
3484 EFAB_SET_OWORD_FIELD_VER ( efab, reg, FCN_RX_XOFF_MAC_EN, tx_fc);
3486
3487 /* Set timer register */
3488 EFAB_POPULATE_DWORD_2 ( timer_cmd,
3489 FCN_TIMER_MODE, FCN_TIMER_MODE_DIS,
3490 FCN_TIMER_VAL, 0 );
3491 falcon_writel ( efab, &timer_cmd, FCN_TIMER_CMD_REG_KER );
#define FCN_RX_CFG_REG_KER
#define FCN_SRM_RX_DC_CFG_REG_KER
#define FCN_TX_DC_CFG_REG_KER
#define FCN_SPARE_REG_KER
#define FCN_TIMER_CMD_REG_KER
#define FCN_SRM_TX_DC_CFG_REG_KER
#define FCN_TX_CFG2_REG_KER
#define FCN_RX_SELF_RST_REG_KER
#define FCN_RX_DC_CFG_REG_KER
#define FCN_RX_FILTER_CTL_REG_KER
#define FCN_TIMER_MODE_DIS
#define EFAB_SET_OWORD_FIELD_VER(efab, reg, field, val)

References EFAB_POPULATE_DWORD_2, EFAB_POPULATE_OWORD_1, EFAB_POPULATE_OWORD_5, EFAB_SET_OWORD_FIELD, EFAB_SET_OWORD_FIELD_VER, falcon_read(), FALCON_REV_B0, falcon_write(), falcon_writel(), FCN_RX_CFG_REG_KER, FCN_RX_DC_CFG_REG_KER, FCN_RX_FILTER_CTL_REG_KER, FCN_RX_SELF_RST_REG_KER, FCN_SPARE_REG_KER, FCN_SRM_RX_DC_CFG_REG_KER, FCN_SRM_TX_DC_CFG_REG_KER, FCN_TIMER_CMD_REG_KER, FCN_TIMER_MODE_DIS, FCN_TX_CFG2_REG_KER, FCN_TX_DC_CFG_REG_KER, efab_nic::pci_revision, efab_nic::phy_10g, reg, and udelay().

Referenced by efab_open().

◆ falcon_init_resources()

void falcon_init_resources ( struct efab_nic * efab)
static

Definition at line 3494 of file etherfabric.c.

3496{
3497 struct efab_ev_queue *ev_queue = &efab->ev_queue;
3498 struct efab_rx_queue *rx_queue = &efab->rx_queue;
3499 struct efab_tx_queue *tx_queue = &efab->tx_queue;
3500
3502 int jumbo;
3503
3504 /* Initialise the ptrs */
3505 tx_queue->read_ptr = tx_queue->write_ptr = 0;
3506 rx_queue->read_ptr = rx_queue->write_ptr = 0;
3507 ev_queue->read_ptr = 0;
3508
3509 /* Push the event queue to the hardware */
3511 FCN_EVQ_EN, 1,
3512 FCN_EVQ_SIZE, FQS(FCN_EVQ, EFAB_EVQ_SIZE),
3513 FCN_EVQ_BUF_BASE_ID, ev_queue->entry.id );
3514 falcon_write ( efab, &reg,
3515 FCN_REVISION_REG ( efab, FCN_EVQ_PTR_TBL_KER ) );
3516
3517 /* Push the tx queue to the hardware */
3519 FCN_TX_DESCQ_EN, 1,
3520 FCN_TX_ISCSI_DDIG_EN, 0,
3521 FCN_TX_ISCSI_DDIG_EN, 0,
3522 FCN_TX_DESCQ_BUF_BASE_ID, tx_queue->entry.id,
3523 FCN_TX_DESCQ_EVQ_ID, 0,
3524 FCN_TX_DESCQ_SIZE, FQS(FCN_TX_DESCQ, EFAB_TXD_SIZE),
3525 FCN_TX_DESCQ_TYPE, 0 /* kernel queue */,
3526 FCN_TX_NON_IP_DROP_DIS_B0, 1 );
3527 falcon_write ( efab, &reg,
3528 FCN_REVISION_REG ( efab, FCN_TX_DESC_PTR_TBL_KER ) );
3529
3530 /* Push the rx queue to the hardware */
3531 jumbo = ( efab->pci_revision == FALCON_REV_B0 ) ? 0 : 1;
3533 FCN_RX_ISCSI_DDIG_EN, 0,
3534 FCN_RX_ISCSI_HDIG_EN, 0,
3535 FCN_RX_DESCQ_BUF_BASE_ID, rx_queue->entry.id,
3536 FCN_RX_DESCQ_EVQ_ID, 0,
3537 FCN_RX_DESCQ_SIZE, FQS(FCN_RX_DESCQ, EFAB_RXD_SIZE),
3538 FCN_RX_DESCQ_TYPE, 0 /* kernel queue */,
3539 FCN_RX_DESCQ_JUMBO, jumbo,
3540 FCN_RX_DESCQ_EN, 1 );
3541 falcon_write ( efab, &reg,
3542 FCN_REVISION_REG ( efab, FCN_RX_DESC_PTR_TBL_KER ) );
3543
3544 /* Program INT_ADR_REG_KER */
3546 FCN_INT_ADR_KER, virt_to_bus ( &efab->int_ker ) );
3548
3549 /* Ack the event queue */
3550 falcon_eventq_read_ack ( efab, ev_queue );
#define FCN_INT_ADR_REG_KER
static void falcon_eventq_read_ack(struct efab_nic *efab, struct efab_ev_queue *ev_queue)
#define FQS(_prefix, _x)
Definition etherfabric.c:66
#define EFAB_POPULATE_OWORD_8(oword,...)
#define EFAB_POPULATE_OWORD_3(oword,...)
#define EFAB_TXD_SIZE
#define EFAB_EVQ_SIZE
#define EFAB_RXD_SIZE
struct efab_special_buffer entry
struct efab_ev_queue ev_queue
efab_oword_t int_ker
INT_REG_KER.
struct efab_rx_queue rx_queue
struct efab_tx_queue tx_queue
unsigned int read_ptr
unsigned int write_ptr
struct efab_special_buffer entry
unsigned int read_ptr
unsigned int write_ptr
struct efab_special_buffer entry

References EFAB_EVQ_SIZE, EFAB_POPULATE_OWORD_1, EFAB_POPULATE_OWORD_3, EFAB_POPULATE_OWORD_8, EFAB_RXD_SIZE, EFAB_TXD_SIZE, efab_ev_queue::entry, efab_rx_queue::entry, efab_tx_queue::entry, efab_nic::ev_queue, falcon_eventq_read_ack(), FALCON_REV_B0, falcon_write(), FCN_INT_ADR_REG_KER, FCN_REVISION_REG, FQS, efab_special_buffer::id, efab_nic::int_ker, efab_nic::pci_revision, efab_ev_queue::read_ptr, efab_rx_queue::read_ptr, efab_tx_queue::read_ptr, reg, efab_nic::rx_queue, efab_nic::tx_queue, virt_to_bus(), efab_rx_queue::write_ptr, and efab_tx_queue::write_ptr.

Referenced by efab_open().

◆ falcon_fini_resources()

void falcon_fini_resources ( struct efab_nic * efab)
static

Definition at line 3553 of file etherfabric.c.

3555{
3557
3558 /* Disable interrupts */
3559 falcon_interrupts ( efab, 0, 0 );
3560
3561 /* Flush the dma queues */
3563 FCN_TX_FLUSH_DESCQ_CMD, 1,
3564 FCN_TX_FLUSH_DESCQ, 0 );
3565 falcon_write ( efab, &cmd,
3566 FCN_REVISION_REG ( efab, FCN_TX_DESC_PTR_TBL_KER ) );
3567
3569 FCN_RX_FLUSH_DESCQ_CMD, 1,
3570 FCN_RX_FLUSH_DESCQ, 0 );
3571 falcon_write ( efab, &cmd,
3572 FCN_REVISION_REG ( efab, FCN_RX_DESC_PTR_TBL_KER ) );
3573
3574 mdelay ( 100 );
3575
3576 /* Remove descriptor rings from card */
3577 EFAB_ZERO_OWORD ( cmd );
3578 falcon_write ( efab, &cmd,
3579 FCN_REVISION_REG ( efab, FCN_TX_DESC_PTR_TBL_KER ) );
3580 falcon_write ( efab, &cmd,
3581 FCN_REVISION_REG ( efab, FCN_RX_DESC_PTR_TBL_KER ) );
3582 falcon_write ( efab, &cmd,
3583 FCN_REVISION_REG ( efab, FCN_EVQ_PTR_TBL_KER ) );
struct golan_eqe_cmd cmd
Definition CIB_PRM.h:1
static void falcon_interrupts(struct efab_nic *efab, int enabled, int force)

References cmd, EFAB_POPULATE_OWORD_2, EFAB_ZERO_OWORD, falcon_interrupts(), falcon_write(), FCN_REVISION_REG, and mdelay().

Referenced by efab_close().

◆ falcon_build_rx_desc()

void falcon_build_rx_desc ( falcon_rx_desc_t * rxd,
struct io_buffer * iob )
static

Definition at line 3594 of file etherfabric.c.

3596{
3598 FCN_RX_KER_BUF_SIZE, EFAB_RX_BUF_SIZE,
3599 FCN_RX_KER_BUF_ADR, virt_to_bus ( iob->data ) );
#define rxd
Definition davicom.c:146
#define EFAB_POPULATE_QWORD_2(qword,...)
#define EFAB_RX_BUF_SIZE
void * data
Start of data.
Definition iobuf.h:53

References io_buffer::data, EFAB_POPULATE_QWORD_2, EFAB_RX_BUF_SIZE, rxd, and virt_to_bus().

Referenced by efab_fill_rx_queue().

◆ falcon_notify_rx_desc()

void falcon_notify_rx_desc ( struct efab_nic * efab,
struct efab_rx_queue * rx_queue )
static

Definition at line 3602 of file etherfabric.c.

3604{
3606 int ptr = rx_queue->write_ptr % EFAB_RXD_SIZE;
3607
3608 EFAB_POPULATE_DWORD_1 ( reg, FCN_RX_DESC_WPTR_DWORD, ptr );
#define FCN_RX_DESC_UPD_REG_KER_DWORD

References EFAB_POPULATE_DWORD_1, EFAB_RXD_SIZE, falcon_writel(), FCN_RX_DESC_UPD_REG_KER_DWORD, reg, and efab_rx_queue::write_ptr.

Referenced by efab_fill_rx_queue().

◆ falcon_build_tx_desc()

void falcon_build_tx_desc ( falcon_tx_desc_t * txd,
struct io_buffer * iob )
static

Definition at line 3621 of file etherfabric.c.

3623{
3625 FCN_TX_KER_BYTE_CNT, iob_len ( iob ),
3626 FCN_TX_KER_BUF_ADR, virt_to_bus ( iob->data ) );
#define txd
Definition davicom.c:144
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
Definition iobuf.h:160

References io_buffer::data, EFAB_POPULATE_QWORD_2, iob_len(), txd, and virt_to_bus().

Referenced by efab_transmit().

◆ falcon_notify_tx_desc()

void falcon_notify_tx_desc ( struct efab_nic * efab,
struct efab_tx_queue * tx_queue )
static

Definition at line 3629 of file etherfabric.c.

3632{
3634 int ptr = tx_queue->write_ptr % EFAB_TXD_SIZE;
3635
3636 EFAB_POPULATE_DWORD_1 ( reg, FCN_TX_DESC_WPTR_DWORD, ptr );
#define FCN_TX_DESC_UPD_REG_KER_DWORD

References EFAB_POPULATE_DWORD_1, EFAB_TXD_SIZE, falcon_writel(), FCN_TX_DESC_UPD_REG_KER_DWORD, reg, and efab_tx_queue::write_ptr.

Referenced by efab_transmit().

◆ efab_fill_rx_queue()

int efab_fill_rx_queue ( struct efab_nic * efab,
struct efab_rx_queue * rx_queue )
static

Definition at line 3649 of file etherfabric.c.

3652{
3653 int fill_level = rx_queue->write_ptr - rx_queue->read_ptr;
3654 int space = EFAB_NUM_RX_DESC - fill_level - 1;
3655 int pushed = 0;
3656
3657 while ( space ) {
3658 int buf_id = rx_queue->write_ptr % EFAB_NUM_RX_DESC;
3659 int desc_id = rx_queue->write_ptr % EFAB_RXD_SIZE;
3660 struct io_buffer *iob;
3662
3663 assert ( rx_queue->buf[buf_id] == NULL );
3664 iob = alloc_iob ( EFAB_RX_BUF_SIZE );
3665 if ( !iob )
3666 break;
3667
3668 EFAB_TRACE ( "pushing rx_buf[%d] iob %p data %p\n",
3669 buf_id, iob, iob->data );
3670
3671 rx_queue->buf[buf_id] = iob;
3672 rxd = rx_queue->ring + desc_id;
3673 falcon_build_rx_desc ( rxd, iob );
3674 ++rx_queue->write_ptr;
3675 ++pushed;
3676 --space;
3677 }
3678
3679 if ( pushed ) {
3680 /* Push the ptr to hardware */
3681 falcon_notify_rx_desc ( efab, rx_queue );
3682
3683 fill_level = rx_queue->write_ptr - rx_queue->read_ptr;
3684 EFAB_TRACE ( "pushed %d rx buffers to fill level %d\n",
3685 pushed, fill_level );
3686 }
3687
3688 if ( fill_level == 0 )
3689 return -ENOMEM;
3690 return 0;
static void falcon_notify_rx_desc(struct efab_nic *efab, struct efab_rx_queue *rx_queue)
static void falcon_build_rx_desc(falcon_rx_desc_t *rxd, struct io_buffer *iob)
#define EFAB_NUM_RX_DESC
efab_qword_t falcon_rx_desc_t
#define ENOMEM
Not enough space.
Definition errno.h:535
struct io_buffer * alloc_iob(size_t len)
Allocate I/O buffer.
Definition iobuf.c:131
struct io_buffer * buf[EFAB_NUM_RX_DESC]
falcon_rx_desc_t * ring
A persistent I/O buffer.
Definition iobuf.h:38

References alloc_iob(), assert, efab_rx_queue::buf, io_buffer::data, EFAB_NUM_RX_DESC, EFAB_RX_BUF_SIZE, EFAB_RXD_SIZE, EFAB_TRACE, ENOMEM, falcon_build_rx_desc(), falcon_notify_rx_desc(), NULL, efab_rx_queue::read_ptr, efab_rx_queue::ring, rxd, and efab_rx_queue::write_ptr.

Referenced by efab_open(), and efab_poll().

◆ efab_receive()

void efab_receive ( struct efab_nic * efab,
unsigned int id,
int len,
int drop )
static

Definition at line 3693 of file etherfabric.c.

3695{
3696 struct efab_rx_queue *rx_queue = &efab->rx_queue;
3697 struct io_buffer *iob;
3698 unsigned int read_ptr = rx_queue->read_ptr % EFAB_RXD_SIZE;
3699 unsigned int buf_ptr = rx_queue->read_ptr % EFAB_NUM_RX_DESC;
3700
3701 assert ( id == read_ptr );
3702
3703 /* Pop this rx buffer out of the software ring */
3704 iob = rx_queue->buf[buf_ptr];
3705 rx_queue->buf[buf_ptr] = NULL;
3706
3707 EFAB_TRACE ( "popping rx_buf[%d] iob %p data %p with %d bytes %s\n",
3708 id, iob, iob->data, len, drop ? "bad" : "ok" );
3709
3710 /* Pass the packet up if required */
3711 if ( drop )
3712 free_iob ( iob );
3713 else {
3714 iob_put ( iob, len );
3715 netdev_rx ( efab->netdev, iob );
3716 }
3717
3718 ++rx_queue->read_ptr;
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
Definition iobuf.c:153
#define iob_put(iobuf, len)
Definition iobuf.h:125
void netdev_rx(struct net_device *netdev, struct io_buffer *iobuf)
Add packet to receive queue.
Definition netdevice.c:549

References assert, efab_rx_queue::buf, io_buffer::data, EFAB_NUM_RX_DESC, EFAB_RXD_SIZE, EFAB_TRACE, free_iob(), iob_put, len, efab_nic::netdev, netdev_rx(), NULL, efab_rx_queue::read_ptr, and efab_nic::rx_queue.

Referenced by falcon_handle_event().

◆ efab_transmit()

int efab_transmit ( struct net_device * netdev,
struct io_buffer * iob )
static

Definition at line 3729 of file etherfabric.c.

3731{
3732 struct efab_nic *efab = netdev->priv;
3733 struct efab_tx_queue *tx_queue = &efab->tx_queue;
3734 int fill_level, space;
3736 int buf_id;
3737
3738 fill_level = tx_queue->write_ptr - tx_queue->read_ptr;
3739 space = EFAB_TXD_SIZE - fill_level - 1;
3740 if ( space < 1 )
3741 return -ENOBUFS;
3742
3743 /* Save the iobuffer for later completion */
3744 buf_id = tx_queue->write_ptr % EFAB_TXD_SIZE;
3745 assert ( tx_queue->buf[buf_id] == NULL );
3746 tx_queue->buf[buf_id] = iob;
3747
3748 EFAB_TRACE ( "tx_buf[%d] for iob %p data %p len %zd\n",
3749 buf_id, iob, iob->data, iob_len ( iob ) );
3750
3751 /* Form the descriptor, and push it to hardware */
3752 txd = tx_queue->ring + buf_id;
3753 falcon_build_tx_desc ( txd, iob );
3754 ++tx_queue->write_ptr;
3755 falcon_notify_tx_desc ( efab, tx_queue );
3756
3757 return 0;
static void falcon_notify_tx_desc(struct efab_nic *efab, struct efab_tx_queue *tx_queue)
static void falcon_build_tx_desc(falcon_tx_desc_t *txd, struct io_buffer *iob)
efab_qword_t falcon_tx_desc_t
static struct net_device * netdev
Definition gdbudp.c:53
#define ENOBUFS
No buffer space available.
Definition errno.h:499
falcon_tx_desc_t * ring
struct io_buffer * buf[EFAB_TXD_SIZE]

References assert, efab_tx_queue::buf, io_buffer::data, EFAB_TRACE, EFAB_TXD_SIZE, ENOBUFS, falcon_build_tx_desc(), falcon_notify_tx_desc(), iob_len(), netdev, NULL, efab_tx_queue::read_ptr, efab_tx_queue::ring, efab_nic::tx_queue, txd, and efab_tx_queue::write_ptr.

◆ efab_transmit_done()

int efab_transmit_done ( struct efab_nic * efab,
int id )
static

Definition at line 3760 of file etherfabric.c.

3762{
3763 struct efab_tx_queue *tx_queue = &efab->tx_queue;
3764 unsigned int read_ptr, stop;
3765
3766 /* Complete all buffers from read_ptr up to and including id */
3767 read_ptr = tx_queue->read_ptr % EFAB_TXD_SIZE;
3768 stop = ( id + 1 ) % EFAB_TXD_SIZE;
3769
3770 while ( read_ptr != stop ) {
3771 struct io_buffer *iob = tx_queue->buf[read_ptr];
3772 assert ( iob );
3773
3774 /* Complete the tx buffer */
3775 if ( iob )
3776 netdev_tx_complete ( efab->netdev, iob );
3777 tx_queue->buf[read_ptr] = NULL;
3778
3779 ++tx_queue->read_ptr;
3780 read_ptr = tx_queue->read_ptr % EFAB_TXD_SIZE;
3781 }
3782
3783 return 0;
static void netdev_tx_complete(struct net_device *netdev, struct io_buffer *iobuf)
Complete network transmission.
Definition netdevice.h:767

References assert, efab_tx_queue::buf, EFAB_TXD_SIZE, efab_nic::netdev, netdev_tx_complete(), NULL, efab_tx_queue::read_ptr, and efab_nic::tx_queue.

Referenced by falcon_handle_event().

◆ falcon_clear_interrupts()

void falcon_clear_interrupts ( struct efab_nic * efab)
static

Definition at line 3794 of file etherfabric.c.

3796{
3798
3799 if ( efab->pci_revision == FALCON_REV_B0 ) {
3800 /* read the ISR */
3801 falcon_readl( efab, &reg, INT_ISR0_B0 );
3802 }
3803 else {
3804 /* write to the INT_ACK register */
3805 EFAB_ZERO_DWORD ( reg );
3807 mb();
3808 falcon_readl ( efab, &reg,
3810 }
#define INT_ISR0_B0
#define WORK_AROUND_BROKEN_PCI_READS_REG_KER_A1
#define FCN_INT_ACK_KER_REG_A1
#define EFAB_ZERO_DWORD(dword)
void mb(void)
Memory barrier.

References EFAB_ZERO_DWORD, falcon_readl(), FALCON_REV_B0, falcon_writel(), FCN_INT_ACK_KER_REG_A1, INT_ISR0_B0, mb(), efab_nic::pci_revision, reg, and WORK_AROUND_BROKEN_PCI_READS_REG_KER_A1.

Referenced by efab_poll().

◆ falcon_handle_event()

void falcon_handle_event ( struct efab_nic * efab,
falcon_event_t * evt )
static

Definition at line 3813 of file etherfabric.c.

3815{
3816 int ev_code, desc_ptr, len, drop;
3817
3818 /* Decode event */
3819 ev_code = EFAB_QWORD_FIELD ( *evt, FCN_EV_CODE );
3820 switch ( ev_code ) {
3822 desc_ptr = EFAB_QWORD_FIELD ( *evt, FCN_TX_EV_DESC_PTR );
3823 efab_transmit_done ( efab, desc_ptr );
3824 break;
3825
3827 desc_ptr = EFAB_QWORD_FIELD ( *evt, FCN_RX_EV_DESC_PTR );
3828 len = EFAB_QWORD_FIELD ( *evt, FCN_RX_EV_BYTE_CNT );
3829 drop = !EFAB_QWORD_FIELD ( *evt, FCN_RX_EV_PKT_OK );
3830
3831 efab_receive ( efab, desc_ptr, len, drop );
3832 break;
3833
3834 default:
3835 EFAB_TRACE ( "Unknown event type %d\n", ev_code );
3836 break;
3837 }
#define FCN_TX_IP_EV_DECODE
#define FCN_RX_IP_EV_DECODE
static int efab_transmit_done(struct efab_nic *efab, int id)
static void efab_receive(struct efab_nic *efab, unsigned int id, int len, int drop)
#define EFAB_QWORD_FIELD

References EFAB_QWORD_FIELD, efab_receive(), EFAB_TRACE, efab_transmit_done(), FCN_RX_IP_EV_DECODE, FCN_TX_IP_EV_DECODE, and len.

Referenced by efab_poll().

◆ efab_poll()

void efab_poll ( struct net_device * netdev)
static

Definition at line 3848 of file etherfabric.c.

3850{
3851 struct efab_nic *efab = netdev->priv;
3852 struct efab_ev_queue *ev_queue = &efab->ev_queue;
3853 struct efab_rx_queue *rx_queue = &efab->rx_queue;
3854 falcon_event_t *evt;
3855
3856 /* Read the event queue by directly looking for events
3857 * (we don't even bother to read the eventq write ptr) */
3858 evt = ev_queue->ring + ev_queue->read_ptr;
3859 while ( falcon_event_present ( evt ) ) {
3860
3861 EFAB_TRACE ( "Event at index 0x%x address %p is "
3862 EFAB_QWORD_FMT "\n", ev_queue->read_ptr,
3863 evt, EFAB_QWORD_VAL ( *evt ) );
3864
3865 falcon_handle_event ( efab, evt );
3866
3867 /* Clear the event */
3868 EFAB_SET_QWORD ( *evt );
3869
3870 /* Move to the next event. We don't ack the event
3871 * queue until the end */
3872 ev_queue->read_ptr = ( ( ev_queue->read_ptr + 1 ) %
3873 EFAB_EVQ_SIZE );
3874 evt = ev_queue->ring + ev_queue->read_ptr;
3875 }
3876
3877 /* Push more buffers if needed */
3878 (void) efab_fill_rx_queue ( efab, rx_queue );
3879
3880 /* Clear any pending interrupts */
3881 falcon_clear_interrupts ( efab );
3882
3883 /* Ack the event queue */
3884 falcon_eventq_read_ack ( efab, ev_queue );
static void falcon_clear_interrupts(struct efab_nic *efab)
static void falcon_handle_event(struct efab_nic *efab, falcon_event_t *evt)
static int falcon_event_present(falcon_event_t *event)
See if an event is present.
static int efab_fill_rx_queue(struct efab_nic *efab, struct efab_rx_queue *rx_queue)
#define EFAB_SET_QWORD(qword)
efab_qword_t falcon_event_t
falcon_event_t * ring

References EFAB_EVQ_SIZE, efab_fill_rx_queue(), EFAB_QWORD_FMT, EFAB_QWORD_VAL, EFAB_SET_QWORD, EFAB_TRACE, efab_nic::ev_queue, falcon_clear_interrupts(), falcon_event_present(), falcon_eventq_read_ack(), falcon_handle_event(), netdev, efab_ev_queue::read_ptr, efab_ev_queue::ring, and efab_nic::rx_queue.

◆ efab_irq()

void efab_irq ( struct net_device * netdev,
int enable )
static

Definition at line 3887 of file etherfabric.c.

3889{
3890 struct efab_nic *efab = netdev->priv;
3891 struct efab_ev_queue *ev_queue = &efab->ev_queue;
3892
3893 switch ( enable ) {
3894 case 0:
3895 falcon_interrupts ( efab, 0, 0 );
3896 break;
3897 case 1:
3898 falcon_interrupts ( efab, 1, 0 );
3899 falcon_eventq_read_ack ( efab, ev_queue );
3900 break;
3901 case 2:
3902 falcon_interrupts ( efab, 1, 1 );
3903 break;
3904 }

References efab_nic::ev_queue, falcon_eventq_read_ack(), falcon_interrupts(), and netdev.

◆ efab_free_resources()

void efab_free_resources ( struct efab_nic * efab)
static

Definition at line 3915 of file etherfabric.c.

3917{
3918 struct efab_ev_queue *ev_queue = &efab->ev_queue;
3919 struct efab_rx_queue *rx_queue = &efab->rx_queue;
3920 struct efab_tx_queue *tx_queue = &efab->tx_queue;
3921 int i;
3922
3923 for ( i = 0; i < EFAB_NUM_RX_DESC; i++ ) {
3924 if ( rx_queue->buf[i] )
3925 free_iob ( rx_queue->buf[i] );
3926 }
3927
3928 for ( i = 0; i < EFAB_TXD_SIZE; i++ ) {
3929 if ( tx_queue->buf[i] )
3930 netdev_tx_complete ( efab->netdev, tx_queue->buf[i] );
3931 }
3932
3933 if ( rx_queue->ring )
3934 falcon_free_special_buffer ( rx_queue->ring );
3935
3936 if ( tx_queue->ring )
3937 falcon_free_special_buffer ( tx_queue->ring );
3938
3939 if ( ev_queue->ring )
3940 falcon_free_special_buffer ( ev_queue->ring );
3941
3942 memset ( rx_queue, 0, sizeof ( *rx_queue ) );
3943 memset ( tx_queue, 0, sizeof ( *tx_queue ) );
3944 memset ( ev_queue, 0, sizeof ( *ev_queue ) );
3945
3946 /* Ensure subsequent buffer allocations start at id 0 */
3947 efab->buffer_head = 0;
static void falcon_free_special_buffer(void *p)
void * memset(void *dest, int character, size_t len) __nonnull

References efab_rx_queue::buf, efab_tx_queue::buf, efab_nic::buffer_head, EFAB_NUM_RX_DESC, EFAB_TXD_SIZE, efab_nic::ev_queue, falcon_free_special_buffer(), free_iob(), memset(), efab_nic::netdev, netdev_tx_complete(), efab_ev_queue::ring, efab_rx_queue::ring, efab_tx_queue::ring, efab_nic::rx_queue, and efab_nic::tx_queue.

Referenced by efab_close(), and efab_open().

◆ efab_alloc_resources()

int efab_alloc_resources ( struct efab_nic * efab)
static

Definition at line 3950 of file etherfabric.c.

3952{
3953 struct efab_ev_queue *ev_queue = &efab->ev_queue;
3954 struct efab_rx_queue *rx_queue = &efab->rx_queue;
3955 struct efab_tx_queue *tx_queue = &efab->tx_queue;
3956 size_t bytes;
3957
3958 /* Allocate the hardware event queue */
3959 bytes = sizeof ( falcon_event_t ) * EFAB_TXD_SIZE;
3960 ev_queue->ring = falcon_alloc_special_buffer ( efab, bytes,
3961 &ev_queue->entry );
3962 if ( !ev_queue->ring )
3963 goto fail1;
3964
3965 /* Initialise the hardware event queue */
3966 memset ( ev_queue->ring, 0xff, bytes );
3967
3968 /* Allocate the hardware tx queue */
3969 bytes = sizeof ( falcon_tx_desc_t ) * EFAB_TXD_SIZE;
3970 tx_queue->ring = falcon_alloc_special_buffer ( efab, bytes,
3971 &tx_queue->entry );
3972 if ( ! tx_queue->ring )
3973 goto fail2;
3974
3975 /* Allocate the hardware rx queue */
3976 bytes = sizeof ( falcon_rx_desc_t ) * EFAB_RXD_SIZE;
3977 rx_queue->ring = falcon_alloc_special_buffer ( efab, bytes,
3978 &rx_queue->entry );
3979 if ( ! rx_queue->ring )
3980 goto fail3;
3981
3982 return 0;
3983
3984fail3:
3985 falcon_free_special_buffer ( tx_queue->ring );
3986 tx_queue->ring = NULL;
3987fail2:
3988 falcon_free_special_buffer ( ev_queue->ring );
3989 ev_queue->ring = NULL;
3990fail1:
3991 return -ENOMEM;
static void * falcon_alloc_special_buffer(struct efab_nic *efab, int bytes, struct efab_special_buffer *entry)

References bytes, EFAB_RXD_SIZE, EFAB_TXD_SIZE, ENOMEM, efab_ev_queue::entry, efab_rx_queue::entry, efab_tx_queue::entry, efab_nic::ev_queue, falcon_alloc_special_buffer(), falcon_free_special_buffer(), memset(), NULL, efab_ev_queue::ring, efab_rx_queue::ring, efab_tx_queue::ring, efab_nic::rx_queue, and efab_nic::tx_queue.

Referenced by efab_open().

◆ efab_init_mac()

int efab_init_mac ( struct efab_nic * efab)
static

Definition at line 3994 of file etherfabric.c.

3996{
3997 int count, rc;
3998
3999 /* This can take several seconds */
4000 EFAB_LOG ( "Waiting for link..\n" );
4001 for ( count=0; count<5; count++ ) {
4002 rc = efab->mac_op->init ( efab );
4003 if ( rc ) {
4004 EFAB_ERR ( "Failed reinitialising MAC, error %s\n",
4005 strerror ( rc ));
4006 return rc;
4007 }
4008
4009 /* Sleep for 2s to wait for the link to settle, either
4010 * because we want to use it, or because we're about
4011 * to reset the mac anyway
4012 */
4013 mdelay ( 2000 );
4014
4015 if ( ! efab->link_up ) {
4016 EFAB_ERR ( "!\n" );
4017 continue;
4018 }
4019
4020 EFAB_LOG ( "\n%dMbps %s-duplex\n",
4021 ( efab->link_options & LPA_EF_10000 ? 10000 :
4022 ( efab->link_options & LPA_EF_1000 ? 1000 :
4023 ( efab->link_options & LPA_100 ? 100 : 10 ) ) ),
4024 ( efab->link_options & LPA_EF_DUPLEX ?
4025 "full" : "half" ) );
4026
4027 /* TODO: Move link state handling to the poll() routine */
4028 netdev_link_up ( efab->netdev );
4029 return 0;
4030 }
4031
4032 EFAB_ERR ( "timed initialising MAC\n" );
4033 return -ETIMEDOUT;
static void netdev_link_up(struct net_device *netdev)
Mark network device as having link up.
Definition netdevice.h:789
char * strerror(int errno)
Retrieve string representation of error number.
Definition strerror.c:79
int(* init)(struct efab_nic *efab)

References count, EFAB_ERR, EFAB_LOG, ETIMEDOUT, efab_mac_operations::init, efab_nic::link_options, efab_nic::link_up, LPA_100, LPA_EF_1000, LPA_EF_10000, LPA_EF_DUPLEX, efab_nic::mac_op, mdelay(), efab_nic::netdev, netdev_link_up(), rc, and strerror().

Referenced by efab_open().

◆ efab_close()

void efab_close ( struct net_device * netdev)
static

Definition at line 4036 of file etherfabric.c.

4038{
4039 struct efab_nic *efab = netdev->priv;
4040
4041 falcon_fini_resources ( efab );
4042 efab_free_resources ( efab );
4043 efab->board_op->fini ( efab );
4044 falcon_reset ( efab );
static void efab_free_resources(struct efab_nic *efab)
static int falcon_reset(struct efab_nic *efab)
static void falcon_fini_resources(struct efab_nic *efab)
void(* fini)(struct efab_nic *efab)

References efab_nic::board_op, efab_free_resources(), falcon_fini_resources(), falcon_reset(), efab_board_operations::fini, and netdev.

◆ efab_open()

int efab_open ( struct net_device * netdev)
static

Definition at line 4047 of file etherfabric.c.

4049{
4050 struct efab_nic *efab = netdev->priv;
4051 struct efab_rx_queue *rx_queue = &efab->rx_queue;
4052 int rc;
4053
4054 rc = falcon_reset ( efab );
4055 if ( rc )
4056 goto fail1;
4057
4058 rc = efab->board_op->init ( efab );
4059 if ( rc )
4060 goto fail2;
4061
4062 rc = falcon_init_sram ( efab );
4063 if ( rc )
4064 goto fail3;
4065
4066 /* Configure descriptor caches before pushing hardware queues */
4067 falcon_setup_nic ( efab );
4068
4069 rc = efab_alloc_resources ( efab );
4070 if ( rc )
4071 goto fail4;
4072
4073 falcon_init_resources ( efab );
4074
4075 /* Push rx buffers */
4076 rc = efab_fill_rx_queue ( efab, rx_queue );
4077 if ( rc )
4078 goto fail5;
4079
4080 /* Try and bring the interface up */
4081 rc = efab_init_mac ( efab );
4082 if ( rc )
4083 goto fail6;
4084
4085 return 0;
4086
4087fail6:
4088fail5:
4089 efab_free_resources ( efab );
4090fail4:
4091fail3:
4092 efab->board_op->fini ( efab );
4093fail2:
4094 falcon_reset ( efab );
4095fail1:
4096 return rc;
static int falcon_init_sram(struct efab_nic *efab)
static void falcon_init_resources(struct efab_nic *efab)
static void falcon_setup_nic(struct efab_nic *efab)
static int efab_init_mac(struct efab_nic *efab)
static int efab_alloc_resources(struct efab_nic *efab)
int(* init)(struct efab_nic *efab)

References efab_nic::board_op, efab_alloc_resources(), efab_fill_rx_queue(), efab_free_resources(), efab_init_mac(), falcon_init_resources(), falcon_init_sram(), falcon_reset(), falcon_setup_nic(), efab_board_operations::fini, efab_board_operations::init, netdev, rc, and efab_nic::rx_queue.

◆ efab_remove()

void efab_remove ( struct pci_device * pci)
static

Definition at line 4107 of file etherfabric.c.

4109{
4110 struct net_device *netdev = pci_get_drvdata ( pci );
4111 struct efab_nic *efab = netdev->priv;
4112
4113 if ( efab->membase ) {
4114 falcon_reset ( efab );
4115
4116 iounmap ( efab->membase );
4117 efab->membase = NULL;
4118 }
4119
4120 if ( efab->nvo.nvs ) {
4121 unregister_nvo ( &efab->nvo );
4122 efab->nvo.nvs = NULL;
4123 }
4124
4127 netdev_put ( netdev );
void iounmap(volatile const void *io_addr)
Unmap I/O address.
void unregister_netdev(struct net_device *netdev)
Unregister network device.
Definition netdevice.c:942
static void netdev_nullify(struct net_device *netdev)
Stop using a network device.
Definition netdevice.h:532
static void netdev_put(struct net_device *netdev)
Drop reference to network device.
Definition netdevice.h:576
void unregister_nvo(struct nvo_block *nvo)
Unregister non-volatile stored options.
Definition nvo.c:325
static void * pci_get_drvdata(struct pci_device *pci)
Get PCI driver-private data.
Definition pci.h:376
void * membase
Memory and IO base.
A network device.
Definition netdevice.h:353
struct nvs_device * nvs
Underlying non-volatile storage device.
Definition nvo.h:27

References falcon_reset(), iounmap(), efab_nic::membase, netdev, netdev_nullify(), netdev_put(), NULL, efab_nic::nvo, nvo_block::nvs, pci_get_drvdata(), unregister_netdev(), and unregister_nvo().

◆ efab_probe()

int efab_probe ( struct pci_device * pci)
static

Definition at line 4130 of file etherfabric.c.

4132{
4133 struct net_device *netdev;
4134 struct efab_nic *efab;
4135 unsigned long mmio_start, mmio_len;
4136 int rc;
4137
4138 /* Create the network adapter */
4139 netdev = alloc_etherdev ( sizeof ( struct efab_nic ) );
4140 if ( ! netdev ) {
4141 rc = -ENOMEM;
4142 goto fail1;
4143 }
4144
4145 /* Initialise the network adapter, and initialise private storage */
4147 pci_set_drvdata ( pci, netdev );
4148 netdev->dev = &pci->dev;
4149
4150 efab = netdev->priv;
4151 memset ( efab, 0, sizeof ( *efab ) );
4152 efab->netdev = netdev;
4153
4154 /* Get iobase/membase */
4155 mmio_start = pci_bar_start ( pci, PCI_BASE_ADDRESS_2 );
4156 mmio_len = pci_bar_size ( pci, PCI_BASE_ADDRESS_2 );
4157 efab->membase = pci_ioremap ( pci, mmio_start, mmio_len );
4158 EFAB_TRACE ( "BAR of %lx bytes at phys %lx mapped at %p\n",
4159 mmio_len, mmio_start, efab->membase );
4160
4161 /* Enable the PCI device */
4162 adjust_pci_device ( pci );
4163 efab->iobase = pci->ioaddr & ~3;
4164
4165 /* Determine the NIC variant */
4166 falcon_probe_nic_variant ( efab, pci );
4167
4168 /* Read the SPI interface and determine the MAC address,
4169 * and the board and phy variant. Hook in the op tables */
4170 rc = falcon_probe_spi ( efab );
4171 if ( rc )
4172 goto fail2;
4173 rc = falcon_probe_nvram ( efab );
4174 if ( rc )
4175 goto fail3;
4176
4177 memcpy ( netdev->hw_addr, efab->mac_addr, ETH_ALEN );
4178
4180 if ( rc )
4181 goto fail4;
4183
4184 /* Advertise non-volatile storage */
4185 if ( efab->nvo.nvs ) {
4186 rc = register_nvo ( &efab->nvo, netdev_settings ( netdev ) );
4187 if ( rc )
4188 goto fail5;
4189 }
4190
4191 EFAB_LOG ( "Found %s EtherFabric %s %s revision %d\n", pci->id->name,
4192 efab->is_asic ? "ASIC" : "FPGA",
4193 efab->phy_10g ? "10G" : "1G",
4194 efab->pci_revision );
4195
4196 return 0;
4197
4198fail5:
4200fail4:
4201fail3:
4202fail2:
4203 iounmap ( efab->membase );
4204 efab->membase = NULL;
4205 netdev_put ( netdev );
4206fail1:
4207 return rc;
static void falcon_probe_nic_variant(struct efab_nic *efab, struct pci_device *pci)
static struct net_device_operations efab_operations
static int falcon_probe_nvram(struct efab_nic *efab)
static int falcon_probe_spi(struct efab_nic *efab)
struct net_device * alloc_etherdev(size_t priv_size)
Allocate Ethernet device.
Definition ethernet.c:265
void * pci_ioremap(struct pci_device *pci, unsigned long bus_addr, size_t len)
Map PCI bus address as an I/O address.
int register_netdev(struct net_device *netdev)
Register network device.
Definition netdevice.c:760
static void netdev_init(struct net_device *netdev, struct net_device_operations *op)
Initialise a network device.
Definition netdevice.h:519
static struct settings * netdev_settings(struct net_device *netdev)
Get per-netdevice configuration settings block.
Definition netdevice.h:587
int register_nvo(struct nvo_block *nvo, struct settings *parent)
Register non-volatile stored options.
Definition nvo.c:294
unsigned long pci_bar_size(struct pci_device *pci, unsigned int reg)
Get the size of a PCI BAR.
Definition pci.c:164
void adjust_pci_device(struct pci_device *pci)
Enable PCI device.
Definition pci.c:241
unsigned long pci_bar_start(struct pci_device *pci, unsigned int reg)
Find the start of a PCI BAR.
Definition pci.c:97
#define PCI_BASE_ADDRESS_2
Definition pci.h:65
static void pci_set_drvdata(struct pci_device *pci, void *priv)
Set PCI driver-private data.
Definition pci.h:366
unsigned int iobase
const char * name
Name.
Definition pci.h:177
unsigned long ioaddr
I/O address.
Definition pci.h:226
struct device dev
Generic device.
Definition pci.h:213
struct pci_device_id * id
Driver device ID.
Definition pci.h:248

References adjust_pci_device(), alloc_etherdev(), pci_device::dev, EFAB_LOG, efab_operations, EFAB_TRACE, ENOMEM, ETH_ALEN, falcon_probe_nic_variant(), falcon_probe_nvram(), falcon_probe_spi(), pci_device::id, pci_device::ioaddr, efab_nic::iobase, iounmap(), efab_nic::is_asic, efab_nic::mac_addr, efab_nic::membase, memcpy(), memset(), pci_device_id::name, efab_nic::netdev, netdev, netdev_init(), netdev_link_up(), netdev_put(), netdev_settings(), NULL, efab_nic::nvo, nvo_block::nvs, pci_bar_size(), pci_bar_start(), PCI_BASE_ADDRESS_2, pci_ioremap(), efab_nic::pci_revision, pci_set_drvdata(), efab_nic::phy_10g, rc, register_netdev(), register_nvo(), and unregister_netdev().

Variable Documentation

◆ __invalid_queue_size

int __invalid_queue_size
extern

◆ falcon_i2c_bit_ops

struct bit_basher_operations falcon_i2c_bit_ops
static
Initial value:
= {
}
static int falcon_i2c_bit_read(struct bit_basher *basher, unsigned int bit_id)
static void falcon_i2c_bit_write(struct bit_basher *basher, unsigned int bit_id, unsigned long data)

Definition at line 1550 of file etherfabric.c.

1550 {
1551 .read = falcon_i2c_bit_read,
1552 .write = falcon_i2c_bit_write,
1553};

Referenced by falcon_probe_spi().

◆ falcon_gmac_operations

struct efab_mac_operations falcon_gmac_operations
static
Initial value:
= {
}
static int falcon_init_gmac(struct efab_nic *efab)

Definition at line 2047 of file etherfabric.c.

2047 {
2048 .init = falcon_init_gmac,
2049};

Referenced by falcon_probe_nvram().

◆ falcon_xmac_operations

struct efab_mac_operations falcon_xmac_operations
static
Initial value:
= {
}
static int falcon_init_xmac(struct efab_nic *efab)

Definition at line 2384 of file etherfabric.c.

2384 {
2385 .init = falcon_init_xmac,
2386};

Referenced by falcon_probe_nvram().

◆ falcon_xaui_phy_ops

struct efab_phy_operations falcon_xaui_phy_ops
static
Initial value:
= {
.mmds = 0,
}
static int falcon_xaui_phy_init(struct efab_nic *efab)

Definition at line 2406 of file etherfabric.c.

2406 {
2407 .init = falcon_xaui_phy_init,
2408 .mmds = 0,
2409};

Referenced by falcon_probe_nvram().

◆ falcon_alaska_phy_ops

struct efab_phy_operations falcon_alaska_phy_ops
static
Initial value:
= {
.init = alaska_init,
}
static int alaska_init(struct efab_nic *efab)
Initialise Alaska PHY.

Definition at line 2443 of file etherfabric.c.

2443 {
2444 .init = alaska_init,
2445};

Referenced by falcon_probe_nvram().

◆ falcon_xfp_phy_ops

struct efab_phy_operations falcon_xfp_phy_ops
static
Initial value:
= {
}
#define XFP_REQUIRED_DEVS
static int falcon_xfp_phy_init(struct efab_nic *efab)

Definition at line 2475 of file etherfabric.c.

2475 {
2476 .init = falcon_xfp_phy_init,
2477 .mmds = XFP_REQUIRED_DEVS,
2478};

Referenced by falcon_probe_nvram().

◆ falcon_txc_phy_ops

struct efab_phy_operations falcon_txc_phy_ops
static
Initial value:
= {
}
static int falcon_txc_phy_init(struct efab_nic *efab)
#define TXC_REQUIRED_DEVS

Definition at line 2604 of file etherfabric.c.

2604 {
2605 .init = falcon_txc_phy_init,
2606 .mmds = TXC_REQUIRED_DEVS,
2607};

Referenced by falcon_probe_nvram().

◆ falcon_tenxpress_phy_ops

struct efab_phy_operations falcon_tenxpress_phy_ops
static
Initial value:
= {
}
static int falcon_tenxpress_phy_init(struct efab_nic *efab)
#define TENXPRESS_REQUIRED_DEVS

Definition at line 2700 of file etherfabric.c.

2700 {
2703};

Referenced by falcon_probe_nvram().

◆ falcon_pm8358_phy_ops

struct efab_phy_operations falcon_pm8358_phy_ops
static
Initial value:
= {
}
#define PM8358_REQUIRED_DEVS
static int falcon_pm8358_phy_init(struct efab_nic *efab)

Definition at line 2777 of file etherfabric.c.

2778 {
2779 .init = falcon_pm8358_phy_init,
2780 .mmds = PM8358_REQUIRED_DEVS,

Referenced by falcon_probe_nvram().

◆ i2c_pca9539

struct i2c_device i2c_pca9539
static
Initial value:
= {
.dev_addr = PCA9539,
.dev_addr_len = 1,
.word_addr_len = 1,
}
#define PCA9539

Definition at line 2829 of file etherfabric.c.

2830 {
2831 .dev_addr = PCA9539,
2832 .dev_addr_len = 1,
2833 .word_addr_len = 1,

Referenced by sfe4001_fini(), and sfe4001_init().

◆ i2c_max6647

struct i2c_device i2c_max6647
static
Initial value:
= {
.dev_addr = MAX6647,
.dev_addr_len = 1,
.word_addr_len = 1,
}
#define MAX6647

Definition at line 2836 of file etherfabric.c.

2837 {
2838 .dev_addr = MAX6647,
2839 .dev_addr_len = 1,
2840 .word_addr_len = 1,

Referenced by sfe4001_fini(), and sfe4001_init().

◆ sfe4001_ops

struct efab_board_operations sfe4001_ops
Initial value:
= {
.init = sfe4001_init,
.fini = sfe4001_fini,
}
static int sfe4001_init(struct efab_nic *efab)
static void sfe4001_fini(struct efab_nic *efab)

Definition at line 2987 of file etherfabric.c.

2988 {
2989 .init = sfe4001_init,
2990 .fini = sfe4001_fini,

Referenced by falcon_probe_nvram().

◆ sfe4002_ops

struct efab_board_operations sfe4002_ops
Initial value:
= {
.init = sfe4002_init,
.fini = sfe4002_fini,
}
static void sfe4002_fini(struct efab_nic *efab)
static int sfe4002_init(struct efab_nic *efab)

Definition at line 3000 of file etherfabric.c.

3001 {
3002 .init = sfe4002_init,
3003 .fini = sfe4002_fini,

Referenced by falcon_probe_nvram().

◆ sfe4003_ops

struct efab_board_operations sfe4003_ops
Initial value:
= {
.init = sfe4003_init,
.fini = sfe4003_fini,
}
static void sfe4003_fini(struct efab_nic *efab)
static int sfe4003_init(struct efab_nic *efab)

Definition at line 3013 of file etherfabric.c.

3014 {
3015 .init = sfe4003_init,
3016 .fini = sfe4003_fini,

Referenced by falcon_probe_nvram().

◆ efab_operations

struct net_device_operations efab_operations
static
Initial value:
= {
.open = efab_open,
.close = efab_close,
.transmit = efab_transmit,
.poll = efab_poll,
.irq = efab_irq,
}
static int efab_transmit(struct net_device *netdev, struct io_buffer *iob)
static void efab_irq(struct net_device *netdev, int enable)
static void efab_poll(struct net_device *netdev)
static void efab_close(struct net_device *netdev)
static int efab_open(struct net_device *netdev)

Definition at line 4098 of file etherfabric.c.

4099 {
4100 .open = efab_open,
4101 .close = efab_close,
4102 .transmit = efab_transmit,
4103 .poll = efab_poll,
4104 .irq = efab_irq,

Referenced by efab_probe().

◆ efab_nics

struct pci_device_id efab_nics[]
static
Initial value:
= {
PCI_ROM(0x1924, 0x0703, "falcon", "EtherFabric Falcon", 0),
PCI_ROM(0x1924, 0x0710, "falconb0", "EtherFabric FalconB0", 0),
}
#define PCI_ROM(_vendor, _device, _name, _description, _data)
Definition pci.h:308

Definition at line 4210 of file etherfabric.c.

4211 {
4212 PCI_ROM(0x1924, 0x0703, "falcon", "EtherFabric Falcon", 0),
4213 PCI_ROM(0x1924, 0x0710, "falconb0", "EtherFabric FalconB0", 0),

◆ __pci_driver

struct pci_driver etherfabric_driver __pci_driver
Initial value:
= {
.ids = efab_nics,
.id_count = sizeof ( efab_nics ) / sizeof ( efab_nics[0] ),
.probe = efab_probe,
.remove = efab_remove,
}
static struct pci_device_id efab_nics[]
static int efab_probe(struct pci_device *pci)
static void efab_remove(struct pci_device *pci)

Definition at line 4215 of file etherfabric.c.

4216 {
4217 .ids = efab_nics,
4218 .id_count = sizeof ( efab_nics ) / sizeof ( efab_nics[0] ),
4219 .probe = efab_probe,
4220 .remove = efab_remove,