Linux Kernel
3.7.1
|
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/proc_fs.h>
#include <linux/mii.h>
#include <linux/platform_device.h>
#include <linux/ethtool.h>
#include <linux/etherdevice.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/sched.h>
#include <linux/slab.h>
Go to the source code of this file.
Data Structures | |
struct | ksz_desc_rx_stat |
struct | ksz_desc_tx_stat |
struct | ksz_desc_rx_buf |
struct | ksz_desc_tx_buf |
union | desc_stat |
union | desc_buf |
struct | ksz_hw_desc |
struct | ksz_sw_desc |
struct | ksz_dma_buf |
struct | ksz_desc |
struct | ksz_desc_info |
struct | ksz_mac_table |
struct | ksz_vlan_table |
struct | ksz_port_mib |
struct | ksz_port_cfg |
struct | ksz_switch |
struct | ksz_port_info |
struct | ksz_hw |
struct | ksz_port |
struct | ksz_timer_info |
struct | ksz_shared_mem |
struct | ksz_counter_info |
struct | dev_info |
struct | dev_priv |
struct | hw_regs |
struct | platform_info |
Enumerations | |
enum | { media_connected, media_disconnected } |
enum | { OID_COUNTER_UNKOWN, OID_COUNTER_FIRST, OID_COUNTER_XMIT_ERROR, OID_COUNTER_RCV_ERROR, OID_COUNTER_LAST } |
enum | { TABLE_STATIC_MAC = 0, TABLE_VLAN, TABLE_DYNAMIC_MAC, TABLE_MIB } |
enum | { PHY_NO_FLOW_CTRL, PHY_FLOW_CTRL, PHY_TX_ONLY, PHY_RX_ONLY } |
enum | { STP_STATE_DISABLED = 0, STP_STATE_LISTENING, STP_STATE_LEARNING, STP_STATE_FORWARDING, STP_STATE_BLOCKED, STP_STATE_SIMPLE } |
Functions | |
MODULE_DEVICE_TABLE (pci, pcidev_table) | |
module_init (ksz884x_init_module) | |
module_exit (ksz884x_cleanup_module) | |
MODULE_DESCRIPTION ("KSZ8841/2 PCI network driver") | |
MODULE_AUTHOR ("Tristram Ha <[email protected]>") | |
MODULE_LICENSE ("GPL") | |
module_param_named (message, msg_enable, int, 0) | |
MODULE_PARM_DESC (message,"Message verbosity level (0=none, 31=all)") | |
module_param (macaddr, charp, 0) | |
module_param (mac1addr, charp, 0) | |
module_param (fast_aging, int, 0) | |
module_param (multi_dev, int, 0) | |
module_param (stp, int, 0) | |
MODULE_PARM_DESC (macaddr,"MAC address") | |
MODULE_PARM_DESC (mac1addr,"Second MAC address") | |
MODULE_PARM_DESC (fast_aging,"Fast aging") | |
MODULE_PARM_DESC (multi_dev,"Multiple device interfaces") | |
MODULE_PARM_DESC (stp,"STP support") | |
#define ADVERTISED_ALL |
#define DMA_BUFFER | ( | desc | ) | ((struct ksz_dma_buf *)(&(desc)->dma_buf)) |
#define EEPROM_MAGIC 0x10A18842 |
#define HOST_MASK (1 << SWITCH_PORT_NUM) |
#define HOST_PORT SWITCH_PORT_NUM |
#define KS8842_MAC_ADDR_0_OFFSET (KS8842_MAC_ADDR_1_OFFSET + 1) |
#define KS8842_MAC_ADDR_1_OFFSET KS8842_MACAR1_P |
#define KS8842_MAC_ADDR_2_OFFSET (KS8842_MAC_ADDR_3_OFFSET + 1) |
#define KS8842_MAC_ADDR_3_OFFSET KS8842_MACAR2_P |
#define KS8842_MAC_ADDR_4_OFFSET (KS8842_MAC_ADDR_5_OFFSET + 1) |
#define KS8842_MAC_ADDR_5_OFFSET KS8842_MACAR3_P |
#define KS8842_PORT_1_CTRL_1 KS8842_P1CR1_P |
#define KS8842_PORT_2_CTRL_1 KS8842_P2CR1_P |
#define KS8842_PORT_3_CTRL_1 KS8842_P3CR1_P |
#define KS8842_SWITCH_CTRL_1_OFFSET KS8842_SGCR1_P |
#define KS8842_SWITCH_CTRL_2_OFFSET KS8842_SGCR2_P |
#define KS8842_SWITCH_CTRL_3_OFFSET KS8842_SGCR3_P |
#define KS8842_SWITCH_CTRL_5_OFFSET KS8842_SGCR5_P |
#define KS8842_SWITCH_CTRL_6_OFFSET KS8842_SGCR6_P |
#define KS8842_SWITCH_CTRL_7_OFFSET KS8842_SGCR7_P |
#define KS8842_TOS_1_OFFSET KS8842_TOSR1_P |
#define KS8842_TOS_2_OFFSET KS8842_TOSR2_P |
#define KS8842_TOS_3_OFFSET KS8842_TOSR3_P |
#define KS8842_TOS_4_OFFSET KS8842_TOSR4_P |
#define KS8842_TOS_5_OFFSET KS8842_TOSR5_P |
#define KS8842_TOS_6_OFFSET KS8842_TOSR6_P |
#define KS8842_TOS_7_OFFSET KS8842_TOSR7_P |
#define KS8842_TOS_8_OFFSET KS8842_TOSR8_P |
#define KS884X_ACC_CTRL_INDEX_OFFSET (KS884X_ACC_CTRL_SEL_OFFSET + 1) |
#define KS884X_ACC_CTRL_SEL_OFFSET KS884X_IACR_P |
#define KS884X_ACC_DATA_0_OFFSET KS884X_IADR4_P |
#define KS884X_ACC_DATA_1_OFFSET (KS884X_ACC_DATA_0_OFFSET + 1) |
#define KS884X_ACC_DATA_2_OFFSET KS884X_IADR5_P |
#define KS884X_ACC_DATA_3_OFFSET (KS884X_ACC_DATA_2_OFFSET + 1) |
#define KS884X_ACC_DATA_4_OFFSET KS884X_IADR2_P |
#define KS884X_ACC_DATA_5_OFFSET (KS884X_ACC_DATA_4_OFFSET + 1) |
#define KS884X_ACC_DATA_6_OFFSET KS884X_IADR3_P |
#define KS884X_ACC_DATA_7_OFFSET (KS884X_ACC_DATA_6_OFFSET + 1) |
#define KS884X_ACC_DATA_8_OFFSET KS884X_IADR1_P |
#define KS884X_CHIP_ID_OFFSET KS884X_SIDER_P |
#define KS884X_FAMILY_ID_OFFSET (KS884X_CHIP_ID_OFFSET + 1) |
#define KS884X_IACR_OFFSET KS884X_IACR_P |
#define KS884X_INT_MASK (KS884X_INT_RX | KS884X_INT_TX | KS884X_INT_PHY) |
#define KS884X_INT_RX_MASK (KS884X_INT_RX | KS884X_INT_RX_OVERRUN) |
#define KS884X_INT_TX_MASK (KS884X_INT_TX | KS884X_INT_TX_EMPTY) |
#define KS884X_PHY_1_CTRL_OFFSET KS884X_P1MBCR_P |
#define KS884X_PHY_SPECIAL_OFFSET KS884X_P1VCT_P |
#define KS_DESC_RX_ERROR_COND |
#define KS_DESC_RX_MASK (KS_DESC_BUF_SIZE) |
#define KS_DESC_TX_MASK |
#define MAX_ETHERNET_PACKET_SIZE (MAX_ETHERNET_BODY_SIZE + ETHERNET_HEADER_SIZE) |
#define MIN_DESC_SHIFT 2 |
#define PHY_AUTO_NEG_PAUSE (PHY_AUTO_NEG_SYM_PAUSE | PHY_AUTO_NEG_ASYM_PAUSE) |
#define PHY_CTRL_INTERVAL (KS884X_P2MBCR_P - KS884X_P1MBCR_P) |
#define PHY_LINK_SUPPORT |
#define PHY_SPECIAL_INTERVAL (KS884X_P2VCT_P - KS884X_P1VCT_P) |
drivers/net/ethernet/micrel/ksx884x.c - Micrel KSZ8841/2 PCI Ethernet driver
Copyright (c) 2009-2010 Micrel, Inc. Tristram Ha Trist ram. Ha@mi crel .com
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#define REGULAR_RX_BUF_SIZE (MAX_ETHERNET_PACKET_SIZE + 4) |
#define SET_DEFAULT_LED LED_SPEED_DUPLEX_ACT |
#define STATS_LEN (TOTAL_PORT_COUNTER_NUM) |
#define TOTAL_PORT_COUNTER_NUM (PORT_COUNTER_NUM + 2) |
#define TOTAL_PORT_NUM (SWITCH_PORT_NUM + 1) |
#define WOL_SUPPORT |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
MODULE_AUTHOR | ( | "Tristram Ha <[email protected]>" | ) |
MODULE_DEVICE_TABLE | ( | pci | , |
pcidev_table | |||
) |
module_exit | ( | ksz884x_cleanup_module | ) |
module_init | ( | ksz884x_init_module | ) |
MODULE_LICENSE | ( | "GPL" | ) |
module_param | ( | macaddr | , |
charp | , | ||
0 | |||
) |
module_param | ( | mac1addr | , |
charp | , | ||
0 | |||
) |
module_param | ( | fast_aging | , |
int | , | ||
0 | |||
) |
module_param | ( | multi_dev | , |
int | , | ||
0 | |||
) |
module_param | ( | stp | , |
int | , | ||
0 | |||
) |
module_param_named | ( | message | , |
msg_enable | , | ||
int | , | ||
0 | |||
) |
MODULE_PARM_DESC | ( | mac1addr | , |
"Second MAC address" | |||
) |
MODULE_PARM_DESC | ( | fast_aging | , |
"Fast aging" | |||
) |
MODULE_PARM_DESC | ( | multi_dev | , |
"Multiple device interfaces" | |||
) |
MODULE_PARM_DESC | ( | stp | , |
"STP support" | |||
) |