⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e100_kcompat.h

📁 Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters
💻 H
📖 第 1 页 / 共 2 页
字号:
#define MII_BMSR		0x01	/* MDI Status regiser */#endif#ifndef MII_PHYSID1#define MII_PHYSID1		0x02	/* Phy indentification reg (word 1) */#endif#ifndef MII_PHYSID2#define MII_PHYSID2		0x03	/* Phy indentification reg (word 2) */#endif#ifndef MII_ADVERTISE#define MII_ADVERTISE		0x04	/* Auto-negotiation advertisement */#endif#ifndef MII_LPA#define MII_LPA			0x05	/* Auto-negotiation link partner ability */#endif#ifndef MII_EXPANSION#define MII_EXPANSION		0x06	/* Auto-negotiation expansion */#endif#ifndef MII_NCONFIG#define MII_NCONFIG		0x1c	/* Network interface config   (MDI/MDIX) */#endif/* MDI Control register bit definitions*/#ifndef BMCR_RESV#define BMCR_RESV		0x007f	/* Unused...                   */#endif#ifndef BMCR_CTST#define BMCR_CTST	        0x0080	/* Collision test              */#endif#ifndef BMCR_FULLDPLX#define BMCR_FULLDPLX		0x0100	/* Full duplex                 */#endif#ifndef BMCR_ANRESTART#define BMCR_ANRESTART		0x0200	/* Auto negotiation restart    */#endif#ifndef BMCR_ISOLATE#define BMCR_ISOLATE		0x0400	/* Disconnect DP83840 from MII */#endif#ifndef BMCR_PDOWN#define BMCR_PDOWN		0x0800	/* Powerdown the DP83840       */#endif#ifndef BMCR_ANENABLE#define BMCR_ANENABLE		0x1000	/* Enable auto negotiation     */#endif#ifndef BMCR_SPEED100#define BMCR_SPEED100		0x2000	/* Select 100Mbps              */#endif#ifndef BMCR_LOOPBACK#define BMCR_LOOPBACK		0x4000	/* TXD loopback bits           */#endif#ifndef BMCR_RESET#define BMCR_RESET		0x8000	/* Reset the DP83840           */#endif/* MDI Status register bit definitions*/#ifndef BMSR_ERCAP#define BMSR_ERCAP		0x0001	/* Ext-reg capability          */#endif#ifndef BMSR_JCD#define BMSR_JCD		0x0002	/* Jabber detected             */#endif#ifndef BMSR_LSTATUS#define BMSR_LSTATUS		0x0004	/* Link status                 */#endif#ifndef BMSR_ANEGCAPABLE#define BMSR_ANEGCAPABLE	0x0008	/* Able to do auto-negotiation */#endif#ifndef BMSR_RFAULT#define BMSR_RFAULT		0x0010	/* Remote fault detected       */#endif#ifndef BMSR_ANEGCOMPLETE#define BMSR_ANEGCOMPLETE	0x0020	/* Auto-negotiation complete   */#endif#ifndef BMSR_RESV#define BMSR_RESV		0x07c0	/* Unused...                   */#endif#ifndef BMSR_10HALF#define BMSR_10HALF		0x0800	/* Can do 10mbps, half-duplex  */#endif#ifndef BMSR_10FULL#define BMSR_10FULL		0x1000	/* Can do 10mbps, full-duplex  */#endif#ifndef BMSR_100HALF#define BMSR_100HALF		0x2000	/* Can do 100mbps, half-duplex */#endif#ifndef BMSR_100FULL#define BMSR_100FULL		0x4000	/* Can do 100mbps, full-duplex */#endif#ifndef BMSR_100BASE4#define BMSR_100BASE4		0x8000	/* Can do 100mbps, 4k packets  */#endif/* Auto-Negotiation advertisement register bit definitions*/#ifndef ADVERTISE_10HALF#define ADVERTISE_10HALF	0x0020	/* Try for 10mbps half-duplex  */#endif#ifndef ADVERTISE_10FULL#define ADVERTISE_10FULL	0x0040	/* Try for 10mbps full-duplex  */#endif#ifndef ADVERTISE_100HALF#define ADVERTISE_100HALF	0x0080	/* Try for 100mbps half-duplex */#endif#ifndef ADVERTISE_100FULL#define ADVERTISE_100FULL	0x0100	/* Try for 100mbps full-duplex */#endif#ifndef ADVERTISE_100BASE4#define ADVERTISE_100BASE4	0x0200	/* Try for 100mbps 4k packets  */#endif/* Auto-Negotiation expansion register bit definitions*/#ifndef EXPANSION_NWAY #define EXPANSION_NWAY		0x0001	/* Can do N-way auto-nego      */#endif#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,4,5) */#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,7)#ifdef SIOCGMIIPHY#undef SIOCGMIIPHY#endif#define SIOCGMIIPHY     SIOCDEVPRIVATE#ifdef SIOCGMIIREG#undef SIOCGMIIREG#endif#define SIOCGMIIREG     (SIOCDEVPRIVATE+1)#ifdef SIOCSMIIREG#undef SIOCSMIIREG#endif#define SIOCSMIIREG     (SIOCDEVPRIVATE+2)#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,4,7) */#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,6)#include <linux/types.h>#include <linux/pci.h>/* Power Management */#define PMCSR		0xe0#define PM_ENABLE_BIT	0x0100#define PM_CLEAR_BIT	0x8000#define PM_STATE_MASK	0xFFFC#define PM_STATE_D1	0x0001static inline intpci_enable_wake(struct pci_dev *dev, u32 state, int enable){	u16 p_state;	pci_read_config_word(dev, PMCSR, &p_state);	pci_write_config_word(dev, PMCSR, p_state | PM_CLEAR_BIT);	if (enable == 0) {		p_state &= ~PM_ENABLE_BIT;	} else {		p_state |= PM_ENABLE_BIT;	}	p_state &= PM_STATE_MASK;	p_state |= state;	pci_write_config_word(dev, PMCSR, p_state);	return 0;}struct mii_ioctl_data {	u16             phy_id;	u16             reg_num;	u16             val_in;	u16             val_out;};#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,4,6) */#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,4,6) )#ifndef pci_set_power_state#define pci_set_power_state _kc_pci_set_power_stateextern int _kc_pci_set_power_state(struct pci_dev *dev, int state);#endif#ifndef pci_save_state#define pci_save_state _kc_pci_save_stateextern int _kc_pci_save_state(struct pci_dev *dev, u32 *buffer);#endif#ifndef pci_restore_state#define pci_restore_state _kc_pci_restore_stateextern int _kc_pci_restore_state(struct pci_dev *pdev, u32 *buffer);#endif/* PCI PM entry point syntax changed, so don't support suspend/resume */#undef CONFIG_PM#endif#ifndef pci_for_each_dev#define pci_for_each_dev(dev) for(dev = pci_devices; dev; dev = dev->next)#endif/* 2.4.20 => 2.4.18 */#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20) )#ifndef ETHTOOL_GRINGPARAM#define ETHTOOL_GRINGPARAM	0x00000010 /* Get ring parameters */#endif#ifndef ETHTOOL_SRINGPARAM#define ETHTOOL_SRINGPARAM	0x00000011 /* Set ring parameters, priv. */#endif#ifndef ETHTOOL_GPAUSEPARAM#define ETHTOOL_GPAUSEPARAM	0x00000012 /* Get pause parameters */#endif#ifndef ETHTOOL_SPAUSEPARAM#define ETHTOOL_SPAUSEPARAM	0x00000013 /* Set pause parameters, priv. */#endif#ifndef ETHTOOL_GRXCSUM#define ETHTOOL_GRXCSUM		0x00000014 /* Get RX hw csum enable (ethtool_value) */#endif#ifndef ETHTOOL_SRXCSUM#define ETHTOOL_SRXCSUM		0x00000015 /* Set RX hw csum enable (ethtool_value) */#endif#ifndef ETHTOOL_GTXCSUM#define ETHTOOL_GTXCSUM		0x00000016 /* Get TX hw csum enable (ethtool_value) */#endif#ifndef ETHTOOL_STXCSUM#define ETHTOOL_STXCSUM		0x00000017 /* Set TX hw csum enable (ethtool_value) */#endif#ifndef ETHTOOL_GSG#define ETHTOOL_GSG		0x00000018 /* Get scatter-gather enable					    * (ethtool_value) */#endif#ifndef ETHTOOL_SSG#define ETHTOOL_SSG		0x00000019 /* Set scatter-gather enable					    * (ethtool_value), priv. */#endif#undef ethtool_ringparam#define ethtool_ringparam _kc_ethtool_ringparamstruct _kc_ethtool_ringparam {	u32	cmd;	/* ETHTOOL_{G,S}RINGPARAM */	/* Read only attributes.  These indicate the maximum number	 * of pending RX/TX ring entries the driver will allow the	 * user to set.	 */	u32	rx_max_pending;	u32	rx_mini_max_pending;	u32	rx_jumbo_max_pending;	u32	tx_max_pending;	/* Values changeable by the user.  The valid values are	 * in the range 1 to the "*_max_pending" counterpart above.	 */	u32	rx_pending;	u32	rx_mini_pending;	u32	rx_jumbo_pending;	u32	tx_pending;};#undef ethtool_pauseparam#define ethtool_pauseparam _kc_ethtool_pauseparam/* for configuring link flow control parameters */struct _kc_ethtool_pauseparam {	u32	cmd;	/* ETHTOOL_{G,S}PAUSEPARAM */	/* If the link is being auto-negotiated (via ethtool_cmd.autoneg	 * being true) the user may set 'autonet' here non-zero to have the	 * pause parameters be auto-negotiated too.  In such a case, the	 * {rx,tx}_pause values below determine what capabilities are	 * advertised.	 *	 * If 'autoneg' is zero or the link is not being auto-negotiated,	 * then {rx,tx}_pause force the driver to use/not-use pause	 * flow control.	 */	u32	autoneg;	u32	rx_pause;	u32	tx_pause;};#endif /* 2.4.20 => 2.4.18 */#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22) )#define pci_name(x)	((x)->slot_name)#endif#endif /* __E100_KCOMPAT_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -