Loading drivers/net/netxen/netxen_nic.h +18 −13 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ #include <asm/io.h> #include <asm/byteorder.h> #include "netxen_nic_hdr.h" #include "netxen_nic_hw.h" #define _NETXEN_NIC_LINUX_MAJOR 4 Loading Loading @@ -227,8 +228,6 @@ #define MPORT_SINGLE_FUNCTION_MODE 0x1111 #define MPORT_MULTI_FUNCTION_MODE 0x2222 #include "netxen_nic_phan_reg.h" /* * NetXen host-peg signal message structure * Loading Loading @@ -503,17 +502,11 @@ struct netxen_skb_frag { u64 length; }; #define _netxen_set_bits(config_word, start, bits, val) {\ unsigned long long __tmask = (((1ULL << (bits)) - 1) << (start));\ unsigned long long __tvalue = (val); \ (config_word) &= ~__tmask; \ (config_word) |= (((__tvalue) << (start)) & __tmask); \ } #define _netxen_clear_bits(config_word, start, bits) {\ unsigned long long __tmask = (((1ULL << (bits)) - 1) << (start)); \ (config_word) &= ~__tmask; \ } struct netxen_recv_crb { u32 crb_rcv_producer[NUM_RCV_DESC_RINGS]; u32 crb_sts_consumer[NUM_STS_DESC_RINGS]; u32 sw_int_mask[NUM_STS_DESC_RINGS]; }; /* Following defines are for the state of the buffers */ #define NETXEN_BUFFER_FREE 0 Loading Loading @@ -1194,6 +1187,18 @@ struct netxen_adapter { const struct firmware *fw; }; /* Set promiscuous mode for a GbE interface */ int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter, u32 mode); int netxen_niu_xg_set_promiscuous_mode(struct netxen_adapter *adapter, u32 mode); /* Generic enable for GbE ports. Will detect the speed of the link. */ int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port); int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port); /* Disable a GbE interface */ int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter); int netxen_niu_disable_xg_port(struct netxen_adapter *adapter); int netxen_niu_xgbe_enable_phy_interrupts(struct netxen_adapter *adapter); int netxen_niu_gbe_enable_phy_interrupts(struct netxen_adapter *adapter); int netxen_niu_xgbe_disable_phy_interrupts(struct netxen_adapter *adapter); Loading drivers/net/netxen/netxen_nic_ctx.c +0 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ #include "netxen_nic_hw.h" #include "netxen_nic.h" #include "netxen_nic_phan_reg.h" #define NXHAL_VERSION 1 Loading drivers/net/netxen/netxen_nic_ethtool.c +0 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ #include "netxen_nic.h" #include "netxen_nic_hw.h" #include "netxen_nic_phan_reg.h" struct netxen_nic_stats { char stat_string[ETH_GSTRING_LEN]; Loading drivers/net/netxen/netxen_nic_hdr.h +84 −1 Original line number Diff line number Diff line Loading @@ -723,9 +723,92 @@ enum { #define NETXEN_FW_VERSION_MINOR (NETXEN_CAM_RAM(0x154)) #define NETXEN_FW_VERSION_SUB (NETXEN_CAM_RAM(0x158)) #define NETXEN_ROM_LOCK_ID (NETXEN_CAM_RAM(0x100)) #define NETXEN_PHY_LOCK_ID (NETXEN_CAM_RAM(0x120)) #define NETXEN_CRB_WIN_LOCK_ID (NETXEN_CAM_RAM(0x124)) #define NETXEN_PHY_LOCK_ID (NETXEN_CAM_RAM(0x120)) #define NIC_CRB_BASE (NETXEN_CAM_RAM(0x200)) #define NIC_CRB_BASE_2 (NETXEN_CAM_RAM(0x700)) #define NETXEN_NIC_REG(X) (NIC_CRB_BASE+(X)) #define NETXEN_NIC_REG_2(X) (NIC_CRB_BASE_2+(X)) #define NX_CDRP_CRB_OFFSET (NETXEN_NIC_REG(0x18)) #define NX_ARG1_CRB_OFFSET (NETXEN_NIC_REG(0x1c)) #define NX_ARG2_CRB_OFFSET (NETXEN_NIC_REG(0x20)) #define NX_ARG3_CRB_OFFSET (NETXEN_NIC_REG(0x24)) #define NX_SIGN_CRB_OFFSET (NETXEN_NIC_REG(0x28)) #define CRB_HOST_DUMMY_BUF_ADDR_HI (NETXEN_NIC_REG(0x3c)) #define CRB_HOST_DUMMY_BUF_ADDR_LO (NETXEN_NIC_REG(0x40)) #define CRB_CMDPEG_STATE (NETXEN_NIC_REG(0x50)) #define CRB_RCVPEG_STATE (NETXEN_NIC_REG(0x13c)) #define CRB_XG_STATE (NETXEN_NIC_REG(0x94)) #define CRB_XG_STATE_P3 (NETXEN_NIC_REG(0x98)) #define CRB_PF_LINK_SPEED_1 (NETXEN_NIC_REG(0xe8)) #define CRB_PF_LINK_SPEED_2 (NETXEN_NIC_REG(0xec)) #define CRB_MPORT_MODE (NETXEN_NIC_REG(0xc4)) #define CRB_DMA_SHIFT (NETXEN_NIC_REG(0xcc)) #define CRB_INT_VECTOR (NETXEN_NIC_REG(0xd4)) #define CRB_CMD_PRODUCER_OFFSET (NETXEN_NIC_REG(0x08)) #define CRB_CMD_CONSUMER_OFFSET (NETXEN_NIC_REG(0x0c)) #define CRB_CMD_PRODUCER_OFFSET_1 (NETXEN_NIC_REG(0x1ac)) #define CRB_CMD_CONSUMER_OFFSET_1 (NETXEN_NIC_REG(0x1b0)) #define CRB_CMD_PRODUCER_OFFSET_2 (NETXEN_NIC_REG(0x1b8)) #define CRB_CMD_CONSUMER_OFFSET_2 (NETXEN_NIC_REG(0x1bc)) #define CRB_CMD_PRODUCER_OFFSET_3 (NETXEN_NIC_REG(0x1d0)) #define CRB_CMD_CONSUMER_OFFSET_3 (NETXEN_NIC_REG(0x1d4)) #define CRB_TEMP_STATE (NETXEN_NIC_REG(0x1b4)) #define CRB_V2P_0 (NETXEN_NIC_REG(0x290)) #define CRB_V2P(port) (CRB_V2P_0+((port)*4)) #define CRB_DRIVER_VERSION (NETXEN_NIC_REG(0x2a0)) #define CRB_SW_INT_MASK_0 (NETXEN_NIC_REG(0x1d8)) #define CRB_SW_INT_MASK_1 (NETXEN_NIC_REG(0x1e0)) #define CRB_SW_INT_MASK_2 (NETXEN_NIC_REG(0x1e4)) #define CRB_SW_INT_MASK_3 (NETXEN_NIC_REG(0x1e8)) #define CRB_FW_CAPABILITIES_1 (NETXEN_CAM_RAM(0x128)) #define CRB_MAC_BLOCK_START (NETXEN_CAM_RAM(0x1c0)) /* * capabilities register, can be used to selectively enable/disable features * for backward compability */ #define CRB_NIC_CAPABILITIES_HOST NETXEN_NIC_REG(0x1a8) #define CRB_NIC_CAPABILITIES_FW NETXEN_NIC_REG(0x1dc) #define CRB_NIC_MSI_MODE_HOST NETXEN_NIC_REG(0x270) #define CRB_NIC_MSI_MODE_FW NETXEN_NIC_REG(0x274) #define INTR_SCHEME_PERPORT 0x1 #define MSI_MODE_MULTIFUNC 0x1 /* used for ethtool tests */ #define CRB_SCRATCHPAD_TEST NETXEN_NIC_REG(0x280) /* * CrbPortPhanCntrHi/Lo is used to pass the address of HostPhantomIndex address * which can be read by the Phantom host to get producer/consumer indexes from * Phantom/Casper. If it is not HOST_SHARED_MEMORY, then the following * registers will be used for the addresses of the ring's shared memory * on the Phantom. */ #define nx_get_temp_val(x) ((x) >> 16) #define nx_get_temp_state(x) ((x) & 0xffff) #define nx_encode_temp(val, state) (((val) << 16) | (state)) /* * Temperature control. */ enum { NX_TEMP_NORMAL = 0x1, /* Normal operating range */ NX_TEMP_WARN, /* Sound alert, temperature getting high */ NX_TEMP_PANIC /* Fatal error, hardware has shut down. */ }; /* Lock IDs for PHY lock */ #define PHY_LOCK_DRIVER 0x44524956 Loading drivers/net/netxen/netxen_nic_hw.c +0 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ #include "netxen_nic.h" #include "netxen_nic_hw.h" #include "netxen_nic_phan_reg.h" #include <net/ip.h> Loading Loading
drivers/net/netxen/netxen_nic.h +18 −13 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ #include <asm/io.h> #include <asm/byteorder.h> #include "netxen_nic_hdr.h" #include "netxen_nic_hw.h" #define _NETXEN_NIC_LINUX_MAJOR 4 Loading Loading @@ -227,8 +228,6 @@ #define MPORT_SINGLE_FUNCTION_MODE 0x1111 #define MPORT_MULTI_FUNCTION_MODE 0x2222 #include "netxen_nic_phan_reg.h" /* * NetXen host-peg signal message structure * Loading Loading @@ -503,17 +502,11 @@ struct netxen_skb_frag { u64 length; }; #define _netxen_set_bits(config_word, start, bits, val) {\ unsigned long long __tmask = (((1ULL << (bits)) - 1) << (start));\ unsigned long long __tvalue = (val); \ (config_word) &= ~__tmask; \ (config_word) |= (((__tvalue) << (start)) & __tmask); \ } #define _netxen_clear_bits(config_word, start, bits) {\ unsigned long long __tmask = (((1ULL << (bits)) - 1) << (start)); \ (config_word) &= ~__tmask; \ } struct netxen_recv_crb { u32 crb_rcv_producer[NUM_RCV_DESC_RINGS]; u32 crb_sts_consumer[NUM_STS_DESC_RINGS]; u32 sw_int_mask[NUM_STS_DESC_RINGS]; }; /* Following defines are for the state of the buffers */ #define NETXEN_BUFFER_FREE 0 Loading Loading @@ -1194,6 +1187,18 @@ struct netxen_adapter { const struct firmware *fw; }; /* Set promiscuous mode for a GbE interface */ int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter, u32 mode); int netxen_niu_xg_set_promiscuous_mode(struct netxen_adapter *adapter, u32 mode); /* Generic enable for GbE ports. Will detect the speed of the link. */ int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port); int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port); /* Disable a GbE interface */ int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter); int netxen_niu_disable_xg_port(struct netxen_adapter *adapter); int netxen_niu_xgbe_enable_phy_interrupts(struct netxen_adapter *adapter); int netxen_niu_gbe_enable_phy_interrupts(struct netxen_adapter *adapter); int netxen_niu_xgbe_disable_phy_interrupts(struct netxen_adapter *adapter); Loading
drivers/net/netxen/netxen_nic_ctx.c +0 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ #include "netxen_nic_hw.h" #include "netxen_nic.h" #include "netxen_nic_phan_reg.h" #define NXHAL_VERSION 1 Loading
drivers/net/netxen/netxen_nic_ethtool.c +0 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ #include "netxen_nic.h" #include "netxen_nic_hw.h" #include "netxen_nic_phan_reg.h" struct netxen_nic_stats { char stat_string[ETH_GSTRING_LEN]; Loading
drivers/net/netxen/netxen_nic_hdr.h +84 −1 Original line number Diff line number Diff line Loading @@ -723,9 +723,92 @@ enum { #define NETXEN_FW_VERSION_MINOR (NETXEN_CAM_RAM(0x154)) #define NETXEN_FW_VERSION_SUB (NETXEN_CAM_RAM(0x158)) #define NETXEN_ROM_LOCK_ID (NETXEN_CAM_RAM(0x100)) #define NETXEN_PHY_LOCK_ID (NETXEN_CAM_RAM(0x120)) #define NETXEN_CRB_WIN_LOCK_ID (NETXEN_CAM_RAM(0x124)) #define NETXEN_PHY_LOCK_ID (NETXEN_CAM_RAM(0x120)) #define NIC_CRB_BASE (NETXEN_CAM_RAM(0x200)) #define NIC_CRB_BASE_2 (NETXEN_CAM_RAM(0x700)) #define NETXEN_NIC_REG(X) (NIC_CRB_BASE+(X)) #define NETXEN_NIC_REG_2(X) (NIC_CRB_BASE_2+(X)) #define NX_CDRP_CRB_OFFSET (NETXEN_NIC_REG(0x18)) #define NX_ARG1_CRB_OFFSET (NETXEN_NIC_REG(0x1c)) #define NX_ARG2_CRB_OFFSET (NETXEN_NIC_REG(0x20)) #define NX_ARG3_CRB_OFFSET (NETXEN_NIC_REG(0x24)) #define NX_SIGN_CRB_OFFSET (NETXEN_NIC_REG(0x28)) #define CRB_HOST_DUMMY_BUF_ADDR_HI (NETXEN_NIC_REG(0x3c)) #define CRB_HOST_DUMMY_BUF_ADDR_LO (NETXEN_NIC_REG(0x40)) #define CRB_CMDPEG_STATE (NETXEN_NIC_REG(0x50)) #define CRB_RCVPEG_STATE (NETXEN_NIC_REG(0x13c)) #define CRB_XG_STATE (NETXEN_NIC_REG(0x94)) #define CRB_XG_STATE_P3 (NETXEN_NIC_REG(0x98)) #define CRB_PF_LINK_SPEED_1 (NETXEN_NIC_REG(0xe8)) #define CRB_PF_LINK_SPEED_2 (NETXEN_NIC_REG(0xec)) #define CRB_MPORT_MODE (NETXEN_NIC_REG(0xc4)) #define CRB_DMA_SHIFT (NETXEN_NIC_REG(0xcc)) #define CRB_INT_VECTOR (NETXEN_NIC_REG(0xd4)) #define CRB_CMD_PRODUCER_OFFSET (NETXEN_NIC_REG(0x08)) #define CRB_CMD_CONSUMER_OFFSET (NETXEN_NIC_REG(0x0c)) #define CRB_CMD_PRODUCER_OFFSET_1 (NETXEN_NIC_REG(0x1ac)) #define CRB_CMD_CONSUMER_OFFSET_1 (NETXEN_NIC_REG(0x1b0)) #define CRB_CMD_PRODUCER_OFFSET_2 (NETXEN_NIC_REG(0x1b8)) #define CRB_CMD_CONSUMER_OFFSET_2 (NETXEN_NIC_REG(0x1bc)) #define CRB_CMD_PRODUCER_OFFSET_3 (NETXEN_NIC_REG(0x1d0)) #define CRB_CMD_CONSUMER_OFFSET_3 (NETXEN_NIC_REG(0x1d4)) #define CRB_TEMP_STATE (NETXEN_NIC_REG(0x1b4)) #define CRB_V2P_0 (NETXEN_NIC_REG(0x290)) #define CRB_V2P(port) (CRB_V2P_0+((port)*4)) #define CRB_DRIVER_VERSION (NETXEN_NIC_REG(0x2a0)) #define CRB_SW_INT_MASK_0 (NETXEN_NIC_REG(0x1d8)) #define CRB_SW_INT_MASK_1 (NETXEN_NIC_REG(0x1e0)) #define CRB_SW_INT_MASK_2 (NETXEN_NIC_REG(0x1e4)) #define CRB_SW_INT_MASK_3 (NETXEN_NIC_REG(0x1e8)) #define CRB_FW_CAPABILITIES_1 (NETXEN_CAM_RAM(0x128)) #define CRB_MAC_BLOCK_START (NETXEN_CAM_RAM(0x1c0)) /* * capabilities register, can be used to selectively enable/disable features * for backward compability */ #define CRB_NIC_CAPABILITIES_HOST NETXEN_NIC_REG(0x1a8) #define CRB_NIC_CAPABILITIES_FW NETXEN_NIC_REG(0x1dc) #define CRB_NIC_MSI_MODE_HOST NETXEN_NIC_REG(0x270) #define CRB_NIC_MSI_MODE_FW NETXEN_NIC_REG(0x274) #define INTR_SCHEME_PERPORT 0x1 #define MSI_MODE_MULTIFUNC 0x1 /* used for ethtool tests */ #define CRB_SCRATCHPAD_TEST NETXEN_NIC_REG(0x280) /* * CrbPortPhanCntrHi/Lo is used to pass the address of HostPhantomIndex address * which can be read by the Phantom host to get producer/consumer indexes from * Phantom/Casper. If it is not HOST_SHARED_MEMORY, then the following * registers will be used for the addresses of the ring's shared memory * on the Phantom. */ #define nx_get_temp_val(x) ((x) >> 16) #define nx_get_temp_state(x) ((x) & 0xffff) #define nx_encode_temp(val, state) (((val) << 16) | (state)) /* * Temperature control. */ enum { NX_TEMP_NORMAL = 0x1, /* Normal operating range */ NX_TEMP_WARN, /* Sound alert, temperature getting high */ NX_TEMP_PANIC /* Fatal error, hardware has shut down. */ }; /* Lock IDs for PHY lock */ #define PHY_LOCK_DRIVER 0x44524956 Loading
drivers/net/netxen/netxen_nic_hw.c +0 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ #include "netxen_nic.h" #include "netxen_nic_hw.h" #include "netxen_nic_phan_reg.h" #include <net/ip.h> Loading