mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (166 commits) [PATCH] net: au1000_eth: PHY framework conversion [PATCH] 3c5zz ethernet: fix section warnings [PATCH] smc ethernet: fix section mismatch warnings [PATCH] hp ethernet: fix section mismatches [PATCH] Section mismatch in drivers/net/ne.o during modpost [PATCH] e1000: prevent statistics from getting garbled during reset [PATCH] smc911x Kconfig fix [PATCH] forcedeth: new device ids [PATCH] forcedeth config: version [PATCH] forcedeth config: module parameters [PATCH] forcedeth config: diagnostics [PATCH] forcedeth config: move functions [PATCH] forcedeth config: statistics [PATCH] forcedeth config: csum [PATCH] forcedeth config: wol [PATCH] forcedeth config: phy [PATCH] forcedeth config: flow control [PATCH] forcedeth config: ring sizes [PATCH] forcedeth config: tso cleanup [DOC] Update bonding documentation with sysfs info ...
This commit is contained in:
@@ -14,8 +14,8 @@ Copyright (C) 2004-2006, Intel Corporation
|
||||
|
||||
README.ipw2200
|
||||
|
||||
Version: 1.0.8
|
||||
Date : October 20, 2005
|
||||
Version: 1.1.2
|
||||
Date : March 30, 2006
|
||||
|
||||
|
||||
Index
|
||||
@@ -103,7 +103,7 @@ file.
|
||||
|
||||
1.1. Overview of Features
|
||||
-----------------------------------------------
|
||||
The current release (1.0.8) supports the following features:
|
||||
The current release (1.1.2) supports the following features:
|
||||
|
||||
+ BSS mode (Infrastructure, Managed)
|
||||
+ IBSS mode (Ad-Hoc)
|
||||
@@ -247,8 +247,8 @@ and can set the contents via echo. For example:
|
||||
% cat /sys/bus/pci/drivers/ipw2200/debug_level
|
||||
|
||||
Will report the current debug level of the driver's logging subsystem
|
||||
(only available if CONFIG_IPW_DEBUG was configured when the driver was
|
||||
built).
|
||||
(only available if CONFIG_IPW2200_DEBUG was configured when the driver
|
||||
was built).
|
||||
|
||||
You can set the debug level via:
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1425,6 +1425,8 @@ P: Jesse Brandeburg
|
||||
M: jesse.brandeburg@intel.com
|
||||
P: Jeff Kirsher
|
||||
M: jeffrey.t.kirsher@intel.com
|
||||
P: Auke Kok
|
||||
M: auke-jan.h.kok@intel.com
|
||||
W: http://sourceforge.net/projects/e1000/
|
||||
S: Supported
|
||||
|
||||
@@ -1437,6 +1439,8 @@ P: Jesse Brandeburg
|
||||
M: jesse.brandeburg@intel.com
|
||||
P: Jeff Kirsher
|
||||
M: jeffrey.t.kirsher@intel.com
|
||||
P: Auke Kok
|
||||
M: auke-jan.h.kok@intel.com
|
||||
W: http://sourceforge.net/projects/e1000/
|
||||
S: Supported
|
||||
|
||||
@@ -1449,6 +1453,8 @@ P: John Ronciak
|
||||
M: john.ronciak@intel.com
|
||||
P: Jesse Brandeburg
|
||||
M: jesse.brandeburg@intel.com
|
||||
P: Auke Kok
|
||||
M: auke-jan.h.kok@intel.com
|
||||
W: http://sourceforge.net/projects/e1000/
|
||||
S: Supported
|
||||
|
||||
|
||||
@@ -909,7 +909,7 @@ MODULE_PARM_DESC(irq, "EtherLink IRQ number");
|
||||
* here also causes the module to be unloaded
|
||||
*/
|
||||
|
||||
int init_module(void)
|
||||
int __init init_module(void)
|
||||
{
|
||||
dev_3c501 = el1_probe(-1);
|
||||
if (IS_ERR(dev_3c501))
|
||||
|
||||
@@ -688,7 +688,7 @@ MODULE_LICENSE("GPL");
|
||||
|
||||
/* This is set up so that only a single autoprobe takes place per call.
|
||||
ISA device autoprobes on a running machine are not recommended. */
|
||||
int
|
||||
int __init
|
||||
init_module(void)
|
||||
{
|
||||
struct net_device *dev;
|
||||
|
||||
@@ -1633,7 +1633,7 @@ MODULE_PARM_DESC(io, "EtherLink Plus I/O base address(es)");
|
||||
MODULE_PARM_DESC(irq, "EtherLink Plus IRQ number(s) (assigned)");
|
||||
MODULE_PARM_DESC(dma, "EtherLink Plus DMA channel(s)");
|
||||
|
||||
int init_module(void)
|
||||
int __init init_module(void)
|
||||
{
|
||||
int this_dev, found = 0;
|
||||
|
||||
|
||||
@@ -932,7 +932,7 @@ module_param(irq, int, 0);
|
||||
MODULE_PARM_DESC(io, "EtherLink16 I/O base address");
|
||||
MODULE_PARM_DESC(irq, "(ignored)");
|
||||
|
||||
int init_module(void)
|
||||
int __init init_module(void)
|
||||
{
|
||||
if (io == 0)
|
||||
printk("3c507: You should not use auto-probing with insmod!\n");
|
||||
|
||||
@@ -1277,7 +1277,7 @@ MODULE_PARM_DESC(io, "EtherLink/MC I/O base address(es)");
|
||||
MODULE_PARM_DESC(irq, "EtherLink/MC IRQ number(s)");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
int init_module(void)
|
||||
int __init init_module(void)
|
||||
{
|
||||
int this_dev,found = 0;
|
||||
|
||||
|
||||
@@ -1646,7 +1646,7 @@ static struct net_device *this_device;
|
||||
* insmod multiple modules for now but it's a hack.
|
||||
*/
|
||||
|
||||
int init_module(void)
|
||||
int __init init_module(void)
|
||||
{
|
||||
this_device = mc32_probe(-1);
|
||||
if (IS_ERR(this_device))
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
See the file COPYING in this distribution for more information.
|
||||
|
||||
Contributors:
|
||||
|
||||
|
||||
Wake-on-LAN support - Felipe Damasio <felipewd@terra.com.br>
|
||||
PCI suspend/resume - Felipe Damasio <felipewd@terra.com.br>
|
||||
LinkChg interrupt - Felipe Damasio <felipewd@terra.com.br>
|
||||
|
||||
|
||||
TODO:
|
||||
* Test Tx checksumming thoroughly
|
||||
* Implement dev->tx_timeout
|
||||
@@ -461,7 +461,7 @@ static void cp_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
|
||||
static inline void cp_set_rxbufsize (struct cp_private *cp)
|
||||
{
|
||||
unsigned int mtu = cp->dev->mtu;
|
||||
|
||||
|
||||
if (mtu > ETH_DATA_LEN)
|
||||
/* MTU + ethernet header + FCS + optional VLAN tag */
|
||||
cp->rx_buf_sz = mtu + ETH_HLEN + 8;
|
||||
@@ -510,7 +510,7 @@ static void cp_rx_err_acct (struct cp_private *cp, unsigned rx_tail,
|
||||
static inline unsigned int cp_rx_csum_ok (u32 status)
|
||||
{
|
||||
unsigned int protocol = (status >> 16) & 0x3;
|
||||
|
||||
|
||||
if (likely((protocol == RxProtoTCP) && (!(status & TCPFail))))
|
||||
return 1;
|
||||
else if ((protocol == RxProtoUDP) && (!(status & UDPFail)))
|
||||
@@ -1061,7 +1061,7 @@ static void cp_init_hw (struct cp_private *cp)
|
||||
cpw8(Config3, PARMEnable);
|
||||
cp->wol_enabled = 0;
|
||||
|
||||
cpw8(Config5, cpr8(Config5) & PMEStatus);
|
||||
cpw8(Config5, cpr8(Config5) & PMEStatus);
|
||||
|
||||
cpw32_f(HiTxRingAddr, 0);
|
||||
cpw32_f(HiTxRingAddr + 4, 0);
|
||||
@@ -1351,7 +1351,7 @@ static void netdev_get_wol (struct cp_private *cp,
|
||||
WAKE_MCAST | WAKE_UCAST;
|
||||
/* We don't need to go on if WOL is disabled */
|
||||
if (!cp->wol_enabled) return;
|
||||
|
||||
|
||||
options = cpr8 (Config3);
|
||||
if (options & LinkUp) wol->wolopts |= WAKE_PHY;
|
||||
if (options & MagicPacket) wol->wolopts |= WAKE_MAGIC;
|
||||
@@ -1919,7 +1919,7 @@ static int cp_resume (struct pci_dev *pdev)
|
||||
mii_check_media(&cp->mii_if, netif_msg_link(cp), FALSE);
|
||||
|
||||
spin_unlock_irqrestore (&cp->lock, flags);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
@@ -165,7 +165,7 @@ static int multicast_filter_limit = 32;
|
||||
static int debug = -1;
|
||||
|
||||
/*
|
||||
* Receive ring size
|
||||
* Receive ring size
|
||||
* Warning: 64K ring has hardware issues and may lock up.
|
||||
*/
|
||||
#if defined(CONFIG_SH_DREAMCAST)
|
||||
@@ -257,7 +257,7 @@ static struct pci_device_id rtl8139_pci_tbl[] = {
|
||||
{0x018a, 0x0106, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
|
||||
{0x126c, 0x1211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
|
||||
{0x1743, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
|
||||
{0x021b, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
|
||||
{0x021b, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
|
||||
|
||||
#ifdef CONFIG_SH_SECUREEDGE5410
|
||||
/* Bogus 8139 silicon reports 8129 without external PROM :-( */
|
||||
@@ -1824,7 +1824,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
|
||||
int tmp_work;
|
||||
#endif
|
||||
|
||||
if (netif_msg_rx_err (tp))
|
||||
if (netif_msg_rx_err (tp))
|
||||
printk(KERN_DEBUG "%s: Ethernet frame had errors, status %8.8x.\n",
|
||||
dev->name, rx_status);
|
||||
tp->stats.rx_errors++;
|
||||
@@ -1944,7 +1944,7 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
|
||||
RTL_R16 (RxBufAddr),
|
||||
RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd));
|
||||
|
||||
while (netif_running(dev) && received < budget
|
||||
while (netif_running(dev) && received < budget
|
||||
&& (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) {
|
||||
u32 ring_offset = cur_rx % RX_BUF_LEN;
|
||||
u32 rx_status;
|
||||
@@ -2031,7 +2031,7 @@ no_early_rx:
|
||||
|
||||
netif_receive_skb (skb);
|
||||
} else {
|
||||
if (net_ratelimit())
|
||||
if (net_ratelimit())
|
||||
printk (KERN_WARNING
|
||||
"%s: Memory squeeze, dropping packet.\n",
|
||||
dev->name);
|
||||
@@ -2158,13 +2158,13 @@ static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance,
|
||||
status = RTL_R16 (IntrStatus);
|
||||
|
||||
/* shared irq? */
|
||||
if (unlikely((status & rtl8139_intr_mask) == 0))
|
||||
if (unlikely((status & rtl8139_intr_mask) == 0))
|
||||
goto out;
|
||||
|
||||
handled = 1;
|
||||
|
||||
/* h/w no longer present (hotplug?) or major error, bail */
|
||||
if (unlikely(status == 0xFFFF))
|
||||
if (unlikely(status == 0xFFFF))
|
||||
goto out;
|
||||
|
||||
/* close possible race's with dev_close */
|
||||
|
||||
@@ -447,6 +447,7 @@ config MIPS_GT96100ETH
|
||||
config MIPS_AU1X00_ENET
|
||||
bool "MIPS AU1000 Ethernet support"
|
||||
depends on NET_ETHERNET && SOC_AU1X00
|
||||
select PHYLIB
|
||||
select CRC32
|
||||
help
|
||||
If you have an Alchemy Semi AU1X00 based system
|
||||
@@ -865,6 +866,22 @@ config DM9000
|
||||
<file:Documentation/networking/net-modules.txt>. The module will be
|
||||
called dm9000.
|
||||
|
||||
config SMC911X
|
||||
tristate "SMSC LAN911[5678] support"
|
||||
select CRC32
|
||||
select MII
|
||||
depends on NET_ETHERNET && ARCH_PXA
|
||||
help
|
||||
This is a driver for SMSC's LAN911x series of Ethernet chipsets
|
||||
including the new LAN9115, LAN9116, LAN9117, and LAN9118.
|
||||
Say Y if you want it compiled into the kernel,
|
||||
and read the Ethernet-HOWTO, available from
|
||||
<http://www.linuxdoc.org/docs.html#howto>.
|
||||
|
||||
This driver is also available as a module. The module will be
|
||||
called smc911x. If you want to compile it as a module, say M
|
||||
here and read <file:Documentation/modules.txt>
|
||||
|
||||
config NET_VENDOR_RACAL
|
||||
bool "Racal-Interlan (Micom) NI cards"
|
||||
depends on NET_ETHERNET && ISA
|
||||
@@ -2311,6 +2328,23 @@ config S2IO_NAPI
|
||||
|
||||
If in doubt, say N.
|
||||
|
||||
config MYRI10GE
|
||||
tristate "Myricom Myri-10G Ethernet support"
|
||||
depends on PCI
|
||||
select FW_LOADER
|
||||
select CRC32
|
||||
---help---
|
||||
This driver supports Myricom Myri-10G Dual Protocol interface in
|
||||
Ethernet mode. If the eeprom on your board is not recent enough,
|
||||
you will need a newer firmware image.
|
||||
You may get this image or more information, at:
|
||||
|
||||
<http://www.myri.com/Myri-10G/>
|
||||
|
||||
To compile this driver as a module, choose M here and read
|
||||
<file:Documentation/networking/net-modules.txt>. The module
|
||||
will be called myri10ge.
|
||||
|
||||
endmenu
|
||||
|
||||
source "drivers/net/tokenring/Kconfig"
|
||||
|
||||
@@ -192,7 +192,9 @@ obj-$(CONFIG_R8169) += r8169.o
|
||||
obj-$(CONFIG_AMD8111_ETH) += amd8111e.o
|
||||
obj-$(CONFIG_IBMVETH) += ibmveth.o
|
||||
obj-$(CONFIG_S2IO) += s2io.o
|
||||
obj-$(CONFIG_MYRI10GE) += myri10ge/
|
||||
obj-$(CONFIG_SMC91X) += smc91x.o
|
||||
obj-$(CONFIG_SMC911X) += smc911x.o
|
||||
obj-$(CONFIG_DM9000) += dm9000.o
|
||||
obj-$(CONFIG_FEC_8XX) += fec_8xx/
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -40,120 +40,6 @@
|
||||
|
||||
#define MULTICAST_FILTER_LIMIT 64
|
||||
|
||||
/* FIXME
|
||||
* The PHY defines should be in a separate file.
|
||||
*/
|
||||
|
||||
/* MII register offsets */
|
||||
#define MII_CONTROL 0x0000
|
||||
#define MII_STATUS 0x0001
|
||||
#define MII_PHY_ID0 0x0002
|
||||
#define MII_PHY_ID1 0x0003
|
||||
#define MII_ANADV 0x0004
|
||||
#define MII_ANLPAR 0x0005
|
||||
#define MII_AEXP 0x0006
|
||||
#define MII_ANEXT 0x0007
|
||||
#define MII_LSI_PHY_CONFIG 0x0011
|
||||
/* Status register */
|
||||
#define MII_LSI_PHY_STAT 0x0012
|
||||
#define MII_AMD_PHY_STAT MII_LSI_PHY_STAT
|
||||
#define MII_INTEL_PHY_STAT 0x0011
|
||||
|
||||
#define MII_AUX_CNTRL 0x0018
|
||||
/* mii registers specific to AMD 79C901 */
|
||||
#define MII_STATUS_SUMMARY = 0x0018
|
||||
|
||||
/* MII Control register bit definitions. */
|
||||
#define MII_CNTL_FDX 0x0100
|
||||
#define MII_CNTL_RST_AUTO 0x0200
|
||||
#define MII_CNTL_ISOLATE 0x0400
|
||||
#define MII_CNTL_PWRDWN 0x0800
|
||||
#define MII_CNTL_AUTO 0x1000
|
||||
#define MII_CNTL_F100 0x2000
|
||||
#define MII_CNTL_LPBK 0x4000
|
||||
#define MII_CNTL_RESET 0x8000
|
||||
|
||||
/* MII Status register bit */
|
||||
#define MII_STAT_EXT 0x0001
|
||||
#define MII_STAT_JAB 0x0002
|
||||
#define MII_STAT_LINK 0x0004
|
||||
#define MII_STAT_CAN_AUTO 0x0008
|
||||
#define MII_STAT_FAULT 0x0010
|
||||
#define MII_STAT_AUTO_DONE 0x0020
|
||||
#define MII_STAT_CAN_T 0x0800
|
||||
#define MII_STAT_CAN_T_FDX 0x1000
|
||||
#define MII_STAT_CAN_TX 0x2000
|
||||
#define MII_STAT_CAN_TX_FDX 0x4000
|
||||
#define MII_STAT_CAN_T4 0x8000
|
||||
|
||||
|
||||
#define MII_ID1_OUI_LO 0xFC00 /* low bits of OUI mask */
|
||||
#define MII_ID1_MODEL 0x03F0 /* model number */
|
||||
#define MII_ID1_REV 0x000F /* model number */
|
||||
|
||||
/* MII NWAY Register Bits ...
|
||||
valid for the ANAR (Auto-Negotiation Advertisement) and
|
||||
ANLPAR (Auto-Negotiation Link Partner) registers */
|
||||
#define MII_NWAY_NODE_SEL 0x001f
|
||||
#define MII_NWAY_CSMA_CD 0x0001
|
||||
#define MII_NWAY_T 0x0020
|
||||
#define MII_NWAY_T_FDX 0x0040
|
||||
#define MII_NWAY_TX 0x0080
|
||||
#define MII_NWAY_TX_FDX 0x0100
|
||||
#define MII_NWAY_T4 0x0200
|
||||
#define MII_NWAY_PAUSE 0x0400
|
||||
#define MII_NWAY_RF 0x2000 /* Remote Fault */
|
||||
#define MII_NWAY_ACK 0x4000 /* Remote Acknowledge */
|
||||
#define MII_NWAY_NP 0x8000 /* Next Page (Enable) */
|
||||
|
||||
/* mii stsout register bits */
|
||||
#define MII_STSOUT_LINK_FAIL 0x4000
|
||||
#define MII_STSOUT_SPD 0x0080
|
||||
#define MII_STSOUT_DPLX 0x0040
|
||||
|
||||
/* mii stsics register bits */
|
||||
#define MII_STSICS_SPD 0x8000
|
||||
#define MII_STSICS_DPLX 0x4000
|
||||
#define MII_STSICS_LINKSTS 0x0001
|
||||
|
||||
/* mii stssum register bits */
|
||||
#define MII_STSSUM_LINK 0x0008
|
||||
#define MII_STSSUM_DPLX 0x0004
|
||||
#define MII_STSSUM_AUTO 0x0002
|
||||
#define MII_STSSUM_SPD 0x0001
|
||||
|
||||
/* lsi phy status register */
|
||||
#define MII_LSI_PHY_STAT_FDX 0x0040
|
||||
#define MII_LSI_PHY_STAT_SPD 0x0080
|
||||
|
||||
/* amd phy status register */
|
||||
#define MII_AMD_PHY_STAT_FDX 0x0800
|
||||
#define MII_AMD_PHY_STAT_SPD 0x0400
|
||||
|
||||
/* intel phy status register */
|
||||
#define MII_INTEL_PHY_STAT_FDX 0x0200
|
||||
#define MII_INTEL_PHY_STAT_SPD 0x4000
|
||||
|
||||
/* Auxilliary Control/Status Register */
|
||||
#define MII_AUX_FDX 0x0001
|
||||
#define MII_AUX_100 0x0002
|
||||
#define MII_AUX_F100 0x0004
|
||||
#define MII_AUX_ANEG 0x0008
|
||||
|
||||
typedef struct mii_phy {
|
||||
struct mii_phy * next;
|
||||
struct mii_chip_info * chip_info;
|
||||
u16 status;
|
||||
u32 *mii_control_reg;
|
||||
u32 *mii_data_reg;
|
||||
} mii_phy_t;
|
||||
|
||||
struct phy_ops {
|
||||
int (*phy_init) (struct net_device *, int);
|
||||
int (*phy_reset) (struct net_device *, int);
|
||||
int (*phy_status) (struct net_device *, int, u16 *, u16 *);
|
||||
};
|
||||
|
||||
/*
|
||||
* Data Buffer Descriptor. Data buffers must be aligned on 32 byte
|
||||
* boundary for both, receive and transmit.
|
||||
@@ -200,7 +86,6 @@ typedef struct mac_reg {
|
||||
|
||||
|
||||
struct au1000_private {
|
||||
|
||||
db_dest_t *pDBfree;
|
||||
db_dest_t db[NUM_RX_BUFFS+NUM_TX_BUFFS];
|
||||
volatile rx_dma_t *rx_dma_ring[NUM_RX_DMA];
|
||||
@@ -213,8 +98,15 @@ struct au1000_private {
|
||||
u32 tx_full;
|
||||
|
||||
int mac_id;
|
||||
mii_phy_t *mii;
|
||||
struct phy_ops *phy_ops;
|
||||
|
||||
int mac_enabled; /* whether MAC is currently enabled and running (req. for mdio) */
|
||||
|
||||
int old_link; /* used by au1000_adjust_link */
|
||||
int old_speed;
|
||||
int old_duplex;
|
||||
|
||||
struct phy_device *phy_dev;
|
||||
struct mii_bus mii_bus;
|
||||
|
||||
/* These variables are just for quick access to certain regs addresses. */
|
||||
volatile mac_reg_t *mac; /* mac registers */
|
||||
@@ -223,14 +115,6 @@ struct au1000_private {
|
||||
u32 vaddr; /* virtual address of rx/tx buffers */
|
||||
dma_addr_t dma_addr; /* dma address of rx/tx buffers */
|
||||
|
||||
u8 *hash_table;
|
||||
u32 hash_mode;
|
||||
u32 intr_work_done; /* number of Rx and Tx pkts processed in the isr */
|
||||
int phy_addr; /* phy address */
|
||||
u32 options; /* User-settable misc. driver options. */
|
||||
u32 drv_flags;
|
||||
int want_autoneg;
|
||||
struct net_device_stats stats;
|
||||
struct timer_list timer;
|
||||
spinlock_t lock; /* Serialise access to device */
|
||||
};
|
||||
|
||||
@@ -4877,7 +4877,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
static int cas_version_printed = 0;
|
||||
unsigned long casreg_base, casreg_len;
|
||||
unsigned long casreg_len;
|
||||
struct net_device *dev;
|
||||
struct cas *cp;
|
||||
int i, err, pci_using_dac;
|
||||
@@ -4972,7 +4972,6 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
pci_using_dac = 0;
|
||||
}
|
||||
|
||||
casreg_base = pci_resource_start(pdev, 0);
|
||||
casreg_len = pci_resource_len(pdev, 0);
|
||||
|
||||
cp = netdev_priv(dev);
|
||||
@@ -5024,7 +5023,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
cp->timer_ticks = 0;
|
||||
|
||||
/* give us access to cassini registers */
|
||||
cp->regs = ioremap(casreg_base, casreg_len);
|
||||
cp->regs = pci_iomap(pdev, 0, casreg_len);
|
||||
if (cp->regs == 0UL) {
|
||||
printk(KERN_ERR PFX "Cannot map device registers, "
|
||||
"aborting.\n");
|
||||
@@ -5123,7 +5122,7 @@ err_out_iounmap:
|
||||
cas_shutdown(cp);
|
||||
mutex_unlock(&cp->pm_mutex);
|
||||
|
||||
iounmap(cp->regs);
|
||||
pci_iounmap(pdev, cp->regs);
|
||||
|
||||
|
||||
err_out_free_res:
|
||||
@@ -5171,7 +5170,7 @@ static void __devexit cas_remove_one(struct pci_dev *pdev)
|
||||
#endif
|
||||
pci_free_consistent(pdev, sizeof(struct cas_init_block),
|
||||
cp->init_block, cp->block_dvma);
|
||||
iounmap(cp->regs);
|
||||
pci_iounmap(pdev, cp->regs);
|
||||
free_netdev(dev);
|
||||
pci_release_regions(pdev);
|
||||
pci_disable_device(pdev);
|
||||
|
||||
@@ -2780,6 +2780,80 @@ static void e100_shutdown(struct pci_dev *pdev)
|
||||
DPRINTK(PROBE,ERR, "Error enabling wake\n");
|
||||
}
|
||||
|
||||
/* ------------------ PCI Error Recovery infrastructure -------------- */
|
||||
/**
|
||||
* e100_io_error_detected - called when PCI error is detected.
|
||||
* @pdev: Pointer to PCI device
|
||||
* @state: The current pci conneection state
|
||||
*/
|
||||
static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
|
||||
/* Similar to calling e100_down(), but avoids adpater I/O. */
|
||||
netdev->stop(netdev);
|
||||
|
||||
/* Detach; put netif into state similar to hotplug unplug. */
|
||||
netif_poll_enable(netdev);
|
||||
netif_device_detach(netdev);
|
||||
|
||||
/* Request a slot reset. */
|
||||
return PCI_ERS_RESULT_NEED_RESET;
|
||||
}
|
||||
|
||||
/**
|
||||
* e100_io_slot_reset - called after the pci bus has been reset.
|
||||
* @pdev: Pointer to PCI device
|
||||
*
|
||||
* Restart the card from scratch.
|
||||
*/
|
||||
static pci_ers_result_t e100_io_slot_reset(struct pci_dev *pdev)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct nic *nic = netdev_priv(netdev);
|
||||
|
||||
if (pci_enable_device(pdev)) {
|
||||
printk(KERN_ERR "e100: Cannot re-enable PCI device after reset.\n");
|
||||
return PCI_ERS_RESULT_DISCONNECT;
|
||||
}
|
||||
pci_set_master(pdev);
|
||||
|
||||
/* Only one device per card can do a reset */
|
||||
if (0 != PCI_FUNC(pdev->devfn))
|
||||
return PCI_ERS_RESULT_RECOVERED;
|
||||
e100_hw_reset(nic);
|
||||
e100_phy_init(nic);
|
||||
|
||||
return PCI_ERS_RESULT_RECOVERED;
|
||||
}
|
||||
|
||||
/**
|
||||
* e100_io_resume - resume normal operations
|
||||
* @pdev: Pointer to PCI device
|
||||
*
|
||||
* Resume normal operations after an error recovery
|
||||
* sequence has been completed.
|
||||
*/
|
||||
static void e100_io_resume(struct pci_dev *pdev)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct nic *nic = netdev_priv(netdev);
|
||||
|
||||
/* ack any pending wake events, disable PME */
|
||||
pci_enable_wake(pdev, 0, 0);
|
||||
|
||||
netif_device_attach(netdev);
|
||||
if (netif_running(netdev)) {
|
||||
e100_open(netdev);
|
||||
mod_timer(&nic->watchdog, jiffies);
|
||||
}
|
||||
}
|
||||
|
||||
static struct pci_error_handlers e100_err_handler = {
|
||||
.error_detected = e100_io_error_detected,
|
||||
.slot_reset = e100_io_slot_reset,
|
||||
.resume = e100_io_resume,
|
||||
};
|
||||
|
||||
static struct pci_driver e100_driver = {
|
||||
.name = DRV_NAME,
|
||||
@@ -2791,6 +2865,7 @@ static struct pci_driver e100_driver = {
|
||||
.resume = e100_resume,
|
||||
#endif
|
||||
.shutdown = e100_shutdown,
|
||||
.err_handler = &e100_err_handler,
|
||||
};
|
||||
|
||||
static int __init e100_init_module(void)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
################################################################################
|
||||
#
|
||||
#
|
||||
# Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved.
|
||||
# Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the Free
|
||||
@@ -22,6 +22,7 @@
|
||||
#
|
||||
# Contact Information:
|
||||
# Linux NICS <linux.nics@intel.com>
|
||||
# e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
|
||||
# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
#
|
||||
################################################################################
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
|
||||
|
||||
Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved.
|
||||
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
Contact Information:
|
||||
Linux NICS <linux.nics@intel.com>
|
||||
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
|
||||
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
|
||||
*******************************************************************************/
|
||||
@@ -114,6 +115,8 @@ struct e1000_adapter;
|
||||
/* Supported Rx Buffer Sizes */
|
||||
#define E1000_RXBUFFER_128 128 /* Used for packet split */
|
||||
#define E1000_RXBUFFER_256 256 /* Used for packet split */
|
||||
#define E1000_RXBUFFER_512 512
|
||||
#define E1000_RXBUFFER_1024 1024
|
||||
#define E1000_RXBUFFER_2048 2048
|
||||
#define E1000_RXBUFFER_4096 4096
|
||||
#define E1000_RXBUFFER_8192 8192
|
||||
@@ -334,7 +337,6 @@ struct e1000_adapter {
|
||||
boolean_t have_msi;
|
||||
#endif
|
||||
/* to not mess up cache alignment, always add to the bottom */
|
||||
boolean_t txb2b;
|
||||
#ifdef NETIF_F_TSO
|
||||
boolean_t tso_force;
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
|
||||
|
||||
Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved.
|
||||
Copyright(c) 1999 - 2006 Intel Corporation. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
Contact Information:
|
||||
Linux NICS <linux.nics@intel.com>
|
||||
e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
|
||||
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
|
||||
*******************************************************************************/
|
||||
@@ -864,8 +865,8 @@ static int
|
||||
e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
|
||||
{
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
uint32_t mask, i=0, shared_int = TRUE;
|
||||
uint32_t irq = adapter->pdev->irq;
|
||||
uint32_t mask, i=0, shared_int = TRUE;
|
||||
uint32_t irq = adapter->pdev->irq;
|
||||
|
||||
*data = 0;
|
||||
|
||||
@@ -891,22 +892,22 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
|
||||
/* Interrupt to test */
|
||||
mask = 1 << i;
|
||||
|
||||
if (!shared_int) {
|
||||
/* Disable the interrupt to be reported in
|
||||
* the cause register and then force the same
|
||||
* interrupt and see if one gets posted. If
|
||||
* an interrupt was posted to the bus, the
|
||||
* test failed.
|
||||
*/
|
||||
adapter->test_icr = 0;
|
||||
E1000_WRITE_REG(&adapter->hw, IMC, mask);
|
||||
E1000_WRITE_REG(&adapter->hw, ICS, mask);
|
||||
msec_delay(10);
|
||||
if (!shared_int) {
|
||||
/* Disable the interrupt to be reported in
|
||||
* the cause register and then force the same
|
||||
* interrupt and see if one gets posted. If
|
||||
* an interrupt was posted to the bus, the
|
||||
* test failed.
|
||||
*/
|
||||
adapter->test_icr = 0;
|
||||
E1000_WRITE_REG(&adapter->hw, IMC, mask);
|
||||
E1000_WRITE_REG(&adapter->hw, ICS, mask);
|
||||
msec_delay(10);
|
||||
|
||||
if (adapter->test_icr & mask) {
|
||||
*data = 3;
|
||||
break;
|
||||
}
|
||||
if (adapter->test_icr & mask) {
|
||||
*data = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable the interrupt to be reported in
|
||||
@@ -925,7 +926,7 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!shared_int) {
|
||||
if (!shared_int) {
|
||||
/* Disable the other interrupts to be reported in
|
||||
* the cause register and then force the other
|
||||
* interrupts and see if any get posted. If
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user