Commit 997037cc authored by Jeff Garzik's avatar Jeff Garzik

Merge pobox.com:/spare/repo/linux-2.6

into pobox.com:/spare/repo/netdev-2.6/ALL
parents 4d802161 803dc86e
...@@ -1586,6 +1586,8 @@ L: oprofile-list@lists.sf.net ...@@ -1586,6 +1586,8 @@ L: oprofile-list@lists.sf.net
S: Maintained S: Maintained
ORINOCO DRIVER ORINOCO DRIVER
P: Pavel Roskin
M: proski@gnu.org
P: David Gibson P: David Gibson
M: hermes@gibson.dropbear.id.au M: hermes@gibson.dropbear.id.au
W: http://www.ozlabs.org/people/dgibson/dldwd W: http://www.ozlabs.org/people/dgibson/dldwd
......
...@@ -306,10 +306,10 @@ CONFIG_EEPRO100=y ...@@ -306,10 +306,10 @@ CONFIG_EEPRO100=y
# CONFIG_R8169 is not set # CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set # CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set # CONFIG_TIGON3 is not set
CONFIG_MV64340_ETH=y CONFIG_MV643XX_ETH=y
CONFIG_MV64340_ETH_0=y CONFIG_MV643XX_ETH_0=y
CONFIG_MV64340_ETH_1=y CONFIG_MV643XX_ETH_1=y
CONFIG_MV64340_ETH_2=y CONFIG_MV643XX_ETH_2=y
# #
# Ethernet (10000 Mbit) # Ethernet (10000 Mbit)
......
...@@ -303,7 +303,7 @@ CONFIG_NET_ETHERNET=y ...@@ -303,7 +303,7 @@ CONFIG_NET_ETHERNET=y
# CONFIG_R8169 is not set # CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set # CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set # CONFIG_TIGON3 is not set
# CONFIG_MV64340_ETH is not set # CONFIG_MV643XX_ETH is not set
# #
# Ethernet (10000 Mbit) # Ethernet (10000 Mbit)
......
...@@ -40,7 +40,7 @@ const char *get_system_type(void) ...@@ -40,7 +40,7 @@ const char *get_system_type(void)
return "Momentum Jaguar-ATX"; return "Momentum Jaguar-ATX";
} }
#ifdef CONFIG_MV64340_ETH #ifdef CONFIG_MV643XX_ETH
extern unsigned char prom_mac_addr_base[6]; extern unsigned char prom_mac_addr_base[6];
static void burn_clocks(void) static void burn_clocks(void)
...@@ -230,7 +230,7 @@ void __init prom_init(void) ...@@ -230,7 +230,7 @@ void __init prom_init(void)
mips_machgroup = MACH_GROUP_MOMENCO; mips_machgroup = MACH_GROUP_MOMENCO;
mips_machtype = MACH_MOMENCO_JAGUAR_ATX; mips_machtype = MACH_MOMENCO_JAGUAR_ATX;
#ifdef CONFIG_MV64340_ETH #ifdef CONFIG_MV643XX_ETH
/* get the base MAC address for on-board ethernet ports */ /* get the base MAC address for on-board ethernet ports */
get_mac(prom_mac_addr_base); get_mac(prom_mac_addr_base);
#endif #endif
......
...@@ -32,7 +32,7 @@ struct callvectors* debug_vectors; ...@@ -32,7 +32,7 @@ struct callvectors* debug_vectors;
extern unsigned long marvell_base; extern unsigned long marvell_base;
extern unsigned long cpu_clock; extern unsigned long cpu_clock;
#ifdef CONFIG_MV64340_ETH #ifdef CONFIG_MV643XX_ETH
extern unsigned char prom_mac_addr_base[6]; extern unsigned char prom_mac_addr_base[6];
#endif #endif
...@@ -45,7 +45,7 @@ const char *get_system_type(void) ...@@ -45,7 +45,7 @@ const char *get_system_type(void)
#endif #endif
} }
#ifdef CONFIG_MV64340_ETH #ifdef CONFIG_MV643XX_ETH
static void burn_clocks(void) static void burn_clocks(void)
{ {
int i; int i;
...@@ -227,7 +227,7 @@ void __init prom_init(void) ...@@ -227,7 +227,7 @@ void __init prom_init(void)
mips_machgroup = MACH_GROUP_MOMENCO; mips_machgroup = MACH_GROUP_MOMENCO;
mips_machtype = MACH_MOMENCO_OCELOT_C; mips_machtype = MACH_MOMENCO_OCELOT_C;
#ifdef CONFIG_MV64340_ETH #ifdef CONFIG_MV643XX_ETH
/* get the base MAC address for on-board ethernet ports */ /* get the base MAC address for on-board ethernet ports */
get_mac(prom_mac_addr_base); get_mac(prom_mac_addr_base);
#endif #endif
......
...@@ -613,7 +613,7 @@ static int rtl8139_open (struct net_device *dev); ...@@ -613,7 +613,7 @@ static int rtl8139_open (struct net_device *dev);
static int mdio_read (struct net_device *dev, int phy_id, int location); static int mdio_read (struct net_device *dev, int phy_id, int location);
static void mdio_write (struct net_device *dev, int phy_id, int location, static void mdio_write (struct net_device *dev, int phy_id, int location,
int val); int val);
static inline void rtl8139_start_thread(struct net_device *dev); static void rtl8139_start_thread(struct net_device *dev);
static void rtl8139_tx_timeout (struct net_device *dev); static void rtl8139_tx_timeout (struct net_device *dev);
static void rtl8139_init_ring (struct net_device *dev); static void rtl8139_init_ring (struct net_device *dev);
static int rtl8139_start_xmit (struct sk_buff *skb, static int rtl8139_start_xmit (struct sk_buff *skb,
...@@ -1643,7 +1643,7 @@ static int rtl8139_thread (void *data) ...@@ -1643,7 +1643,7 @@ static int rtl8139_thread (void *data)
complete_and_exit (&tp->thr_exited, 0); complete_and_exit (&tp->thr_exited, 0);
} }
static inline void rtl8139_start_thread(struct net_device *dev) static void rtl8139_start_thread(struct net_device *dev)
{ {
struct rtl8139_private *tp = dev->priv; struct rtl8139_private *tp = dev->priv;
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
module by all drivers that require it. module by all drivers that require it.
Alan Cox : Spinlocking work, added 'BUG_83C690' Alan Cox : Spinlocking work, added 'BUG_83C690'
Paul Gortmaker : Separate out Tx timeout code from Tx path. Paul Gortmaker : Separate out Tx timeout code from Tx path.
Paul Gortmaker : Remove old unused single Tx buffer code.
Sources: Sources:
The National Semiconductor LAN Databook, and the 3Com 3c503 databook. The National Semiconductor LAN Databook, and the 3Com 3c503 databook.
...@@ -289,8 +290,6 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -289,8 +290,6 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
send_length = ETH_ZLEN < length ? length : ETH_ZLEN; send_length = ETH_ZLEN < length ? length : ETH_ZLEN;
#ifdef EI_PINGPONG
/* /*
* We have two Tx slots available for use. Find the first free * We have two Tx slots available for use. Find the first free
* slot, and then perform some sanity checks. With two Tx bufs, * slot, and then perform some sanity checks. With two Tx bufs,
...@@ -309,7 +308,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -309,7 +308,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
} }
else if (ei_local->tx2 == 0) else if (ei_local->tx2 == 0)
{ {
output_page = ei_local->tx_start_page + TX_1X_PAGES; output_page = ei_local->tx_start_page + TX_PAGES/2;
ei_local->tx2 = send_length; ei_local->tx2 = send_length;
if (ei_debug && ei_local->tx1 > 0) if (ei_debug && ei_local->tx1 > 0)
printk(KERN_DEBUG "%s: idle transmitter, tx1=%d, lasttx=%d, txing=%d.\n", printk(KERN_DEBUG "%s: idle transmitter, tx1=%d, lasttx=%d, txing=%d.\n",
...@@ -366,28 +365,6 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -366,28 +365,6 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
else else
netif_start_queue(dev); netif_start_queue(dev);
#else /* EI_PINGPONG */
/*
* Only one Tx buffer in use. You need two Tx bufs to come close to
* back-to-back transmits. Expect a 20 -> 25% performance hit on
* reasonable hardware if you only use one Tx buffer.
*/
if (length == send_length)
ei_block_output(dev, length, skb->data, ei_local->tx_start_page);
else {
memset(scratch, 0, ETH_ZLEN);
memcpy(scratch, skb->data, skb->len);
ei_block_output(dev, ETH_ZLEN, scratch, ei_local->tx_start_page);
}
ei_local->txing = 1;
NS8390_trigger_send(dev, send_length, ei_local->tx_start_page);
dev->trans_start = jiffies;
netif_stop_queue(dev);
#endif /* EI_PINGPONG */
/* Turn 8390 interrupts back on. */ /* Turn 8390 interrupts back on. */
ei_local->irqlock = 0; ei_local->irqlock = 0;
outb_p(ENISR_ALL, e8390_base + EN0_IMR); outb_p(ENISR_ALL, e8390_base + EN0_IMR);
...@@ -590,8 +567,6 @@ static void ei_tx_intr(struct net_device *dev) ...@@ -590,8 +567,6 @@ static void ei_tx_intr(struct net_device *dev)
outb_p(ENISR_TX, e8390_base + EN0_ISR); /* Ack intr. */ outb_p(ENISR_TX, e8390_base + EN0_ISR); /* Ack intr. */
#ifdef EI_PINGPONG
/* /*
* There are two Tx buffers, see which one finished, and trigger * There are two Tx buffers, see which one finished, and trigger
* the send of another one if it exists. * the send of another one if it exists.
...@@ -634,13 +609,6 @@ static void ei_tx_intr(struct net_device *dev) ...@@ -634,13 +609,6 @@ static void ei_tx_intr(struct net_device *dev)
// else printk(KERN_WARNING "%s: unexpected TX-done interrupt, lasttx=%d.\n", // else printk(KERN_WARNING "%s: unexpected TX-done interrupt, lasttx=%d.\n",
// dev->name, ei_local->lasttx); // dev->name, ei_local->lasttx);
#else /* EI_PINGPONG */
/*
* Single Tx buffer: mark it free so another packet can be loaded.
*/
ei_local->txing = 0;
#endif
/* Minimize Tx latency: update the statistics after we restart TXing. */ /* Minimize Tx latency: update the statistics after we restart TXing. */
if (status & ENTSR_COL) if (status & ENTSR_COL)
ei_local->stat.collisions++; ei_local->stat.collisions++;
......
...@@ -12,17 +12,7 @@ ...@@ -12,17 +12,7 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#define TX_2X_PAGES 12 #define TX_PAGES 12 /* Two Tx slots */
#define TX_1X_PAGES 6
/* Should always use two Tx slots to get back-to-back transmits. */
#define EI_PINGPONG
#ifdef EI_PINGPONG
#define TX_PAGES TX_2X_PAGES
#else
#define TX_PAGES TX_1X_PAGES
#endif
#define ETHER_ADDR_LEN 6 #define ETHER_ADDR_LEN 6
......
...@@ -1746,6 +1746,7 @@ config VIA_VELOCITY ...@@ -1746,6 +1746,7 @@ config VIA_VELOCITY
tristate "VIA Velocity support" tristate "VIA Velocity support"
depends on NET_PCI && PCI depends on NET_PCI && PCI
select CRC32 select CRC32
select CRC16
select MII select MII
help help
If you have a VIA "Velocity" based network card say Y here. If you have a VIA "Velocity" based network card say Y here.
...@@ -2043,6 +2044,11 @@ config R8169 ...@@ -2043,6 +2044,11 @@ config R8169
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
will be called r8169. This is recommended. will be called r8169. This is recommended.
config R8169_NAPI
bool "Use Rx and Tx Polling (NAPI) (EXPERIMENTAL)"
depends on R8169 && EXPERIMENTAL
config SK98LIN config SK98LIN
tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support" tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support"
depends on PCI depends on PCI
...@@ -2131,6 +2137,45 @@ config TIGON3 ...@@ -2131,6 +2137,45 @@ config TIGON3
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
will be called tg3. This is recommended. will be called tg3. This is recommended.
config GIANFAR
tristate "Gianfar Ethernet"
depends on 85xx
help
This driver supports the Gigabit TSEC on the MPC85xx
family of chips, and the FEC on the 8540
config GFAR_NAPI
bool "NAPI Support"
depends on GIANFAR
config MV643XX_ETH
tristate "MV-643XX Ethernet support"
depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX
help
This driver supports the gigabit Ethernet on the Marvell MV643XX
chipset which is used in the Momenco Ocelot C and Jaguar ATX.
config MV643XX_ETH_0
bool "MV-643XX Port 0"
depends on MV643XX_ETH
help
This enables support for Port 0 of the Marvell MV643XX Gigabit
Ethernet.
config MV643XX_ETH_1
bool "MV-643XX Port 1"
depends on MV643XX_ETH
help
This enables support for Port 1 of the Marvell MV643XX Gigabit
Ethernet.
config MV643XX_ETH_2
bool "MV-643XX Port 2"
depends on MV643XX_ETH
help
This enables support for Port 2 of the Marvell MV643XX Gigabit
Ethernet.
endmenu endmenu
# #
......
...@@ -10,6 +10,7 @@ obj-$(CONFIG_E1000) += e1000/ ...@@ -10,6 +10,7 @@ obj-$(CONFIG_E1000) += e1000/
obj-$(CONFIG_IBM_EMAC) += ibm_emac/ obj-$(CONFIG_IBM_EMAC) += ibm_emac/
obj-$(CONFIG_IXGB) += ixgb/ obj-$(CONFIG_IXGB) += ixgb/
obj-$(CONFIG_BONDING) += bonding/ obj-$(CONFIG_BONDING) += bonding/
obj-$(CONFIG_GIANFAR) += gianfar.o gianfar_ethtool.o gianfar_phy.o
# #
# link order important here # link order important here
...@@ -95,6 +96,8 @@ obj-$(CONFIG_B44) += b44.o ...@@ -95,6 +96,8 @@ obj-$(CONFIG_B44) += b44.o
obj-$(CONFIG_FORCEDETH) += forcedeth.o obj-$(CONFIG_FORCEDETH) += forcedeth.o
obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o
obj-$(CONFIG_MV643XX_ETH) += mv643xx_eth.o
obj-$(CONFIG_PPP) += ppp_generic.o slhc.o obj-$(CONFIG_PPP) += ppp_generic.o slhc.o
obj-$(CONFIG_PPP_ASYNC) += ppp_async.o obj-$(CONFIG_PPP_ASYNC) += ppp_async.o
obj-$(CONFIG_PPP_SYNC_TTY) += ppp_synctty.o obj-$(CONFIG_PPP_SYNC_TTY) += ppp_synctty.o
......
This diff is collapsed.
...@@ -693,7 +693,7 @@ struct ace_private ...@@ -693,7 +693,7 @@ struct ace_private
int board_idx; int board_idx;
u16 pci_command; u16 pci_command;
u8 pci_latency; u8 pci_latency;
char name[48]; const char *name;
#ifdef INDEX_DEBUG #ifdef INDEX_DEBUG
spinlock_t debug_lock spinlock_t debug_lock
__attribute__ ((aligned (SMP_CACHE_BYTES))); __attribute__ ((aligned (SMP_CACHE_BYTES)));
......
...@@ -87,9 +87,8 @@ ...@@ -87,9 +87,8 @@
* cb_to_use is the next CB to use for queuing a command; cb_to_clean * cb_to_use is the next CB to use for queuing a command; cb_to_clean
* is the next CB to check for completion; cb_to_send is the first * is the next CB to check for completion; cb_to_send is the first
* CB to start on in case of a previous failure to resume. CB clean * CB to start on in case of a previous failure to resume. CB clean
* up happens in interrupt context in response to a CU interrupt, or * up happens in interrupt context in response to a CU interrupt.
* in dev->poll in the case where NAPI is enabled. cbs_avail keeps * cbs_avail keeps track of number of free CB resources available.
* track of number of free CB resources available.
* *
* Hardware padding of short packets to minimum packet size is * Hardware padding of short packets to minimum packet size is
* enabled. 82557 pads with 7Eh, while the later controllers pad * enabled. 82557 pads with 7Eh, while the later controllers pad
...@@ -112,9 +111,8 @@ ...@@ -112,9 +111,8 @@
* replacement RFDs cannot be allocated, or the RU goes non-active, * replacement RFDs cannot be allocated, or the RU goes non-active,
* the RU must be restarted. Frame arrival generates an interrupt, * the RU must be restarted. Frame arrival generates an interrupt,
* and Rx indication and re-allocation happen in the same context, * and Rx indication and re-allocation happen in the same context,
* therefore no locking is required. If NAPI is enabled, this work * therefore no locking is required. A software-generated interrupt
* happens in dev->poll. A software-generated interrupt is gen- * is generated from the watchdog to recover from a failed allocation
* erated from the watchdog to recover from a failed allocation
* senario where all Rx resources have been indicated and none re- * senario where all Rx resources have been indicated and none re-
* placed. * placed.
* *
...@@ -126,8 +124,6 @@ ...@@ -126,8 +124,6 @@
* supported. Tx Scatter/Gather is not supported. Jumbo Frames is * supported. Tx Scatter/Gather is not supported. Jumbo Frames is
* not supported (hardware limitation). * not supported (hardware limitation).
* *
* NAPI support is enabled with CONFIG_E100_NAPI.
*
* MagicPacket(tm) WoL support is enabled/disabled via ethtool. * MagicPacket(tm) WoL support is enabled/disabled via ethtool.
* *
* Thanks to JC (jchapman@katalix.com) for helping with * Thanks to JC (jchapman@katalix.com) for helping with
...@@ -158,7 +154,8 @@ ...@@ -158,7 +154,8 @@
#define DRV_NAME "e100" #define DRV_NAME "e100"
#define DRV_VERSION "3.0.18" #define DRV_EXT "-NAPI"
#define DRV_VERSION "3.0.27-k2"DRV_EXT
#define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver"
#define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation" #define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation"
#define PFX DRV_NAME ": " #define PFX DRV_NAME ": "
...@@ -201,6 +198,8 @@ static struct pci_device_id e100_id_table[] = { ...@@ -201,6 +198,8 @@ static struct pci_device_id e100_id_table[] = {
INTEL_8255X_ETHERNET_DEVICE(0x1053, 5), INTEL_8255X_ETHERNET_DEVICE(0x1053, 5),
INTEL_8255X_ETHERNET_DEVICE(0x1054, 5), INTEL_8255X_ETHERNET_DEVICE(0x1054, 5),
INTEL_8255X_ETHERNET_DEVICE(0x1055, 5), INTEL_8255X_ETHERNET_DEVICE(0x1055, 5),
INTEL_8255X_ETHERNET_DEVICE(0x1056, 5),
INTEL_8255X_ETHERNET_DEVICE(0x1057, 5),
INTEL_8255X_ETHERNET_DEVICE(0x1064, 6), INTEL_8255X_ETHERNET_DEVICE(0x1064, 6),
INTEL_8255X_ETHERNET_DEVICE(0x1065, 6), INTEL_8255X_ETHERNET_DEVICE(0x1065, 6),
INTEL_8255X_ETHERNET_DEVICE(0x1066, 6), INTEL_8255X_ETHERNET_DEVICE(0x1066, 6),
...@@ -242,6 +241,7 @@ enum phy { ...@@ -242,6 +241,7 @@ enum phy {
phy_nsc_tx = 0x5C002000, phy_nsc_tx = 0x5C002000,
phy_82562_et = 0x033002A8, phy_82562_et = 0x033002A8,
phy_82562_em = 0x032002A8, phy_82562_em = 0x032002A8,
phy_82562_ek = 0x031002A8,
phy_82562_eh = 0x017002A8, phy_82562_eh = 0x017002A8,
phy_unknown = 0xFFFFFFFF, phy_unknown = 0xFFFFFFFF,
}; };
...@@ -330,11 +330,16 @@ enum eeprom_op { ...@@ -330,11 +330,16 @@ enum eeprom_op {
}; };
enum eeprom_offsets { enum eeprom_offsets {
eeprom_cnfg_mdix = 0x03,
eeprom_id = 0x0A, eeprom_id = 0x0A,
eeprom_config_asf = 0x0D, eeprom_config_asf = 0x0D,
eeprom_smbus_addr = 0x90, eeprom_smbus_addr = 0x90,
}; };
enum eeprom_cnfg_mdix {
eeprom_mdix_enabled = 0x0080,
};
enum eeprom_id { enum eeprom_id {
eeprom_id_wol = 0x0020, eeprom_id_wol = 0x0020,
}; };
...@@ -350,10 +355,12 @@ enum cb_status { ...@@ -350,10 +355,12 @@ enum cb_status {
}; };
enum cb_command { enum cb_command {
cb_nop = 0x0000,
cb_iaaddr = 0x0001, cb_iaaddr = 0x0001,
cb_config = 0x0002, cb_config = 0x0002,
cb_multi = 0x0003, cb_multi = 0x0003,
cb_tx = 0x0004, cb_tx = 0x0004,
cb_ucode = 0x0005,
cb_dump = 0x0006, cb_dump = 0x0006,
cb_tx_sf = 0x0008, cb_tx_sf = 0x0008,
cb_cid = 0x1f00, cb_cid = 0x1f00,
...@@ -428,12 +435,14 @@ struct multi { ...@@ -428,12 +435,14 @@ struct multi {
}; };
/* Important: keep total struct u32-aligned */ /* Important: keep total struct u32-aligned */
#define UCODE_SIZE 134
struct cb { struct cb {
u16 status; u16 status;
u16 command; u16 command;
u32 link; u32 link;
union { union {
u8 iaaddr[ETH_ALEN]; u8 iaaddr[ETH_ALEN];
u32 ucode[UCODE_SIZE];
struct config config; struct config config;
struct multi multi; struct multi multi;
struct { struct {
...@@ -548,6 +557,7 @@ struct nic { ...@@ -548,6 +557,7 @@ struct nic {
u32 rx_fc_pause; u32 rx_fc_pause;
u32 rx_fc_unsupported; u32 rx_fc_unsupported;
u32 rx_tco_frames; u32 rx_tco_frames;
u32 rx_over_length_errors;
u8 rev_id; u8 rev_id;
u16 leds; u16 leds;
...@@ -980,6 +990,27 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb) ...@@ -980,6 +990,27 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
c[16], c[17], c[18], c[19], c[20], c[21], c[22], c[23]); c[16], c[17], c[18], c[19], c[20], c[21], c[22], c[23]);
} }
static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb)
{
int i;
static const u32 ucode[UCODE_SIZE] = {
/* NFS packets are misinterpreted as TCO packets and
* incorrectly routed to the BMC over SMBus. This
* microcode patch checks the fragmented IP bit in the
* NFS/UDP header to distinguish between NFS and TCO. */
0x0EF70E36, 0x1FFF1FFF, 0x1FFF1FFF, 0x1FFF1FFF, 0x1FFF1FFF,
0x1FFF1FFF, 0x00906E41, 0x00800E3C, 0x00E00E39, 0x00000000,
0x00906EFD, 0x00900EFD, 0x00E00EF8,
};
if(nic->mac == mac_82551_F || nic->mac == mac_82551_10) {
for(i = 0; i < UCODE_SIZE; i++)
cb->u.ucode[i] = cpu_to_le32(ucode[i]);
cb->command = cpu_to_le16(cb_ucode);
} else
cb->command = cpu_to_le16(cb_nop);
}
static void e100_setup_iaaddr(struct nic *nic, struct cb *cb, static void e100_setup_iaaddr(struct nic *nic, struct cb *cb,
struct sk_buff *skb) struct sk_buff *skb)
{ {
...@@ -1045,7 +1076,9 @@ static int e100_phy_init(struct nic *nic) ...@@ -1045,7 +1076,9 @@ static int e100_phy_init(struct nic *nic)
mdio_write(netdev, nic->mii.phy_id, MII_NSC_CONG, cong); mdio_write(netdev, nic->mii.phy_id, MII_NSC_CONG, cong);
} }
if(nic->mac >= mac_82550_D102) if((nic->mac >= mac_82550_D102) || ((nic->flags & ich) &&
(mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000) &&
(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled)))
/* enable/disable MDI/MDI-X auto-switching */ /* enable/disable MDI/MDI-X auto-switching */
mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG,
nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH); nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH);
...@@ -1069,6 +1102,8 @@ static int e100_hw_init(struct nic *nic) ...@@ -1069,6 +1102,8 @@ static int e100_hw_init(struct nic *nic)
return err; return err;
if((err = e100_exec_cmd(nic, ruc_load_base, 0))) if((err = e100_exec_cmd(nic, ruc_load_base, 0)))
return err; return err;
if((err = e100_exec_cb(nic, NULL, e100_load_ucode)))
return err;
if((err = e100_exec_cb(nic, NULL, e100_configure))) if((err = e100_exec_cb(nic, NULL, e100_configure)))
return err; return err;
if((err = e100_exec_cb(nic, NULL, e100_setup_iaaddr))) if((err = e100_exec_cb(nic, NULL, e100_setup_iaaddr)))
...@@ -1143,9 +1178,11 @@ static void e100_update_stats(struct nic *nic) ...@@ -1143,9 +1178,11 @@ static void e100_update_stats(struct nic *nic)
ns->tx_errors += le32_to_cpu(s->tx_max_collisions) + ns->tx_errors += le32_to_cpu(s->tx_max_collisions) +
le32_to_cpu(s->tx_lost_crs); le32_to_cpu(s->tx_lost_crs);
ns->rx_dropped += le32_to_cpu(s->rx_resource_errors); ns->rx_dropped += le32_to_cpu(s->rx_resource_errors);
ns->rx_length_errors += le32_to_cpu(s->rx_short_frame_errors); ns->rx_length_errors += le32_to_cpu(s->rx_short_frame_errors) +
nic->rx_over_length_errors;
ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors); ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors);
ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors); ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors);
ns->rx_over_errors += le32_to_cpu(s->rx_overrun_errors);
ns->rx_fifo_errors += le32_to_cpu(s->rx_overrun_errors); ns->rx_fifo_errors += le32_to_cpu(s->rx_overrun_errors);
ns->rx_errors += le32_to_cpu(s->rx_crc_errors) + ns->rx_errors += le32_to_cpu(s->rx_crc_errors) +
le32_to_cpu(s->rx_alignment_errors) + le32_to_cpu(s->rx_alignment_errors) +
...@@ -1456,18 +1493,14 @@ static inline int e100_rx_indicate(struct nic *nic, struct rx *rx, ...@@ -1456,18 +1493,14 @@ static inline int e100_rx_indicate(struct nic *nic, struct rx *rx,
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} else if(actual_size > nic->netdev->mtu + VLAN_ETH_HLEN) { } else if(actual_size > nic->netdev->mtu + VLAN_ETH_HLEN) {
/* Don't indicate oversized frames */ /* Don't indicate oversized frames */
nic->net_stats.rx_over_errors++; nic->rx_over_length_errors++;
nic->net_stats.rx_dropped++; nic->net_stats.rx_dropped++;
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} else { } else {
nic->net_stats.rx_packets++; nic->net_stats.rx_packets++;
nic->net_stats.rx_bytes += actual_size; nic->net_stats.rx_bytes += actual_size;
nic->netdev->last_rx = jiffies; nic->netdev->last_rx = jiffies;
#ifdef CONFIG_E100_NAPI
netif_receive_skb(skb); netif_receive_skb(skb);
#else
netif_rx(skb);
#endif
if(work_done) if(work_done)
(*work_done)++; (*work_done)++;
} }
...@@ -1562,20 +1595,12 @@ static irqreturn_t e100_intr(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1562,20 +1595,12 @@ static irqreturn_t e100_intr(int irq, void *dev_id, struct pt_regs *regs)
if(stat_ack & stat_ack_rnr) if(stat_ack & stat_ack_rnr)
nic->ru_running = 0; nic->ru_running = 0;
#ifdef CONFIG_E100_NAPI
e100_disable_irq(nic); e100_disable_irq(nic);
netif_rx_schedule(netdev); netif_rx_schedule(netdev);
#else
if(stat_ack & stat_ack_rx)
e100_rx_clean(nic, NULL, 0);
if(stat_ack & stat_ack_tx)
e100_tx_clean(nic);
#endif
return IRQ_HANDLED; return IRQ_HANDLED;
} }
#ifdef CONFIG_E100_NAPI
static int e100_poll(struct net_device *netdev, int *budget) static int e100_poll(struct net_device *netdev, int *budget)
{ {
struct nic *nic = netdev_priv(netdev); struct nic *nic = netdev_priv(netdev);
...@@ -1598,7 +1623,6 @@ static int e100_poll(struct net_device *netdev, int *budget) ...@@ -1598,7 +1623,6 @@ static int e100_poll(struct net_device *netdev, int *budget)
return 1; return 1;
} }
#endif
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
static void e100_netpoll(struct net_device *netdev) static void e100_netpoll(struct net_device *netdev)
...@@ -1641,7 +1665,7 @@ static int e100_change_mtu(struct net_device *netdev, int new_mtu) ...@@ -1641,7 +1665,7 @@ static int e100_change_mtu(struct net_device *netdev, int new_mtu)
static int e100_asf(struct nic *nic) static int e100_asf(struct nic *nic)
{ {
/* ASF can be enabled from eeprom */ /* ASF can be enabled from eeprom */
return((nic->pdev->device >= 0x1050) && (nic->pdev->device <= 0x1055) && return((nic->pdev->device >= 0x1050) && (nic->pdev->device <= 0x1057) &&
(nic->eeprom[eeprom_config_asf] & eeprom_asf) && (nic->eeprom[eeprom_config_asf] & eeprom_asf) &&
!(nic->eeprom[eeprom_config_asf] & eeprom_gcl) && !(nic->eeprom[eeprom_config_asf] & eeprom_gcl) &&
((nic->eeprom[eeprom_smbus_addr] & 0xFF) != 0xFE)); ((nic->eeprom[eeprom_smbus_addr] & 0xFF) != 0xFE));
...@@ -1961,18 +1985,27 @@ static int e100_diag_test_count(struct net_device *netdev) ...@@ -1961,18 +1985,27 @@ static int e100_diag_test_count(struct net_device *netdev)
static void e100_diag_test(struct net_device *netdev, static void e100_diag_test(struct net_device *netdev,
struct ethtool_test *test, u64 *data) struct ethtool_test *test, u64 *data)
{ {
struct ethtool_cmd cmd;
struct nic *nic = netdev_priv(netdev); struct nic *nic = netdev_priv(netdev);
int i; int i, err;
memset(data, 0, E100_TEST_LEN * sizeof(u64)); memset(data, 0, E100_TEST_LEN * sizeof(u64));
data[0] = !mii_link_ok(&nic->mii); data[0] = !mii_link_ok(&nic->mii);
data[1] = e100_eeprom_load(nic); data[1] = e100_eeprom_load(nic);
if(test->flags & ETH_TEST_FL_OFFLINE) { if(test->flags & ETH_TEST_FL_OFFLINE) {
/* save speed, duplex & autoneg settings */
err = mii_ethtool_gset(&nic->mii, &cmd);
if(netif_running(netdev)) if(netif_running(netdev))
e100_down(nic); e100_down(nic);
data[2] = e100_self_test(nic); data[2] = e100_self_test(nic);
data[3] = e100_loopback_test(nic, lb_mac); data[3] = e100_loopback_test(nic, lb_mac);
data[4] = e100_loopback_test(nic, lb_phy); data[4] = e100_loopback_test(nic, lb_phy);
/* restore speed, duplex & autoneg settings */
err = mii_ethtool_sset(&nic->mii, &cmd);
if(netif_running(netdev)) if(netif_running(netdev))
e100_up(nic); e100_up(nic);
} }
...@@ -2135,10 +2168,8 @@ static int __devinit e100_probe(struct pci_dev *pdev, ...@@ -2135,10 +2168,8 @@ static int __devinit e100_probe(struct pci_dev *pdev,
SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops); SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops);
netdev->tx_timeout = e100_tx_timeout; netdev->tx_timeout = e100_tx_timeout;
netdev->watchdog_timeo = E100_WATCHDOG_PERIOD; netdev->watchdog_timeo = E100_WATCHDOG_PERIOD;
#ifdef CONFIG_E100_NAPI
netdev->poll = e100_poll; netdev->poll = e100_poll;
netdev->weight = E100_NAPI_WEIGHT; netdev->weight = E100_NAPI_WEIGHT;
#endif
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
netdev->poll_controller = e100_netpoll; netdev->poll_controller = e100_netpoll;
#endif #endif
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
#include <linux/udp.h> #include <linux/udp.h>
#include <net/pkt_sched.h> #include <net/pkt_sched.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/rtnetlink.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#ifdef NETIF_F_TSO #ifdef NETIF_F_TSO
#include <net/checksum.h> #include <net/checksum.h>
...@@ -77,6 +79,8 @@ ...@@ -77,6 +79,8 @@
#define BAR_1 1 #define BAR_1 1
#define BAR_5 5 #define BAR_5 5
#define INTEL_E1000_ETHERNET_DEVICE(device_id) {\
PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)}
struct e1000_adapter; struct e1000_adapter;
...@@ -98,11 +102,12 @@ struct e1000_adapter; ...@@ -98,11 +102,12 @@ struct e1000_adapter;
#define E1000_MAX_INTR 10 #define E1000_MAX_INTR 10
/* How many descriptors for TX and RX ? */ /* TX/RX descriptor defines */
#define E1000_DEFAULT_TXD 256 #define E1000_DEFAULT_TXD 256
#define E1000_MAX_TXD 256 #define E1000_MAX_TXD 256
#define E1000_MIN_TXD 80 #define E1000_MIN_TXD 80
#define E1000_MAX_82544_TXD 4096 #define E1000_MAX_82544_TXD 4096
#define E1000_DEFAULT_RXD 256 #define E1000_DEFAULT_RXD 256
#define E1000_MAX_RXD 256 #define E1000_MAX_RXD 256
#define E1000_MIN_RXD 80 #define E1000_MIN_RXD 80
...@@ -123,14 +128,11 @@ struct e1000_adapter; ...@@ -123,14 +128,11 @@ struct e1000_adapter;
#define E1000_TX_HEAD_ADDR_SHIFT 7 #define E1000_TX_HEAD_ADDR_SHIFT 7
#define E1000_PBA_TX_MASK 0xFFFF0000 #define E1000_PBA_TX_MASK 0xFFFF0000
/* Flow Control High-Watermark: 5688 bytes below Rx FIFO size */ /* Flow Control Watermarks */
#define E1000_FC_HIGH_DIFF 0x1638 #define E1000_FC_HIGH_DIFF 0x1638 /* High: 5688 bytes below Rx FIFO size */
#define E1000_FC_LOW_DIFF 0x1640 /* Low: 5696 bytes below Rx FIFO size */
/* Flow Control Low-Watermark: 5696 bytes below Rx FIFO size */
#define E1000_FC_LOW_DIFF 0x1640
/* Flow Control Pause Time: 858 usec */ #define E1000_FC_PAUSE_TIME 0x0680 /* 858 usec */
#define E1000_FC_PAUSE_TIME 0x0680
/* How many Tx Descriptors do we need to call netif_wake_queue ? */ /* How many Tx Descriptors do we need to call netif_wake_queue ? */
#define E1000_TX_QUEUE_WAKE 16 #define E1000_TX_QUEUE_WAKE 16
...@@ -153,9 +155,9 @@ struct e1000_adapter; ...@@ -153,9 +155,9 @@ struct e1000_adapter;
struct e1000_buffer { struct e1000_buffer {
struct sk_buff *skb; struct sk_buff *skb;
uint64_t dma; uint64_t dma;
unsigned long length;
unsigned long time_stamp; unsigned long time_stamp;
unsigned int next_to_watch; uint16_t length;
uint16_t next_to_watch;
}; };
struct e1000_desc_ring { struct e1000_desc_ring {
...@@ -202,7 +204,7 @@ struct e1000_adapter { ...@@ -202,7 +204,7 @@ struct e1000_adapter {
spinlock_t stats_lock; spinlock_t stats_lock;
atomic_t irq_sem; atomic_t irq_sem;
struct work_struct tx_timeout_task; struct work_struct tx_timeout_task;
uint8_t fc_autoneg; uint8_t fc_autoneg;
struct timer_list blink_timer; struct timer_list blink_timer;
unsigned long led_status; unsigned long led_status;
......
This diff is collapsed.
...@@ -251,6 +251,7 @@ e1000_set_mac_type(struct e1000_hw *hw) ...@@ -251,6 +251,7 @@ e1000_set_mac_type(struct e1000_hw *hw)
break; break;
case E1000_DEV_ID_82541ER: case E1000_DEV_ID_82541ER:
case E1000_DEV_ID_82541GI: case E1000_DEV_ID_82541GI:
case E1000_DEV_ID_82541GI_LF:
case E1000_DEV_ID_82541GI_MOBILE: case E1000_DEV_ID_82541GI_MOBILE:
hw->mac_type = e1000_82541_rev_2; hw->mac_type = e1000_82541_rev_2;
break; break;
...@@ -920,7 +921,8 @@ e1000_setup_copper_link(struct e1000_hw *hw) ...@@ -920,7 +921,8 @@ e1000_setup_copper_link(struct e1000_hw *hw)
if(ret_val) if(ret_val)
return ret_val; return ret_val;
if(hw->mac_type == e1000_82545_rev_3) { if((hw->mac_type == e1000_82545_rev_3) ||
(hw->mac_type == e1000_82546_rev_3)) {
ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data);
phy_data |= 0x00000008; phy_data |= 0x00000008;
ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data);
...@@ -3057,16 +3059,6 @@ e1000_init_eeprom_params(struct e1000_hw *hw) ...@@ -3057,16 +3059,6 @@ e1000_init_eeprom_params(struct e1000_hw *hw)
} }
break; break;
default: default:
eeprom->type = e1000_eeprom_spi;
eeprom->opcode_bits = 8;
eeprom->delay_usec = 1;
if (eecd & E1000_EECD_ADDR_BITS) {
eeprom->page_size = 32;
eeprom->address_bits = 16;
} else {
eeprom->page_size = 8;
eeprom->address_bits = 8;
}
break; break;
} }
...@@ -3453,7 +3445,6 @@ e1000_read_eeprom(struct e1000_hw *hw, ...@@ -3453,7 +3445,6 @@ e1000_read_eeprom(struct e1000_hw *hw,
uint32_t i = 0; uint32_t i = 0;
DEBUGFUNC("e1000_read_eeprom"); DEBUGFUNC("e1000_read_eeprom");
/* A check for invalid values: offset too large, too many words, and not /* A check for invalid values: offset too large, too many words, and not
* enough words. * enough words.
*/ */
...@@ -5224,3 +5215,4 @@ e1000_enable_mng_pass_thru(struct e1000_hw *hw) ...@@ -5224,3 +5215,4 @@ e1000_enable_mng_pass_thru(struct e1000_hw *hw)
} }
return FALSE; return FALSE;
} }
...@@ -357,11 +357,11 @@ int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active); ...@@ -357,11 +357,11 @@ int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, boolean_t active);
#define E1000_DEV_ID_82547GI 0x1075 #define E1000_DEV_ID_82547GI 0x1075
#define E1000_DEV_ID_82541GI 0x1076 #define E1000_DEV_ID_82541GI 0x1076
#define E1000_DEV_ID_82541GI_MOBILE 0x1077 #define E1000_DEV_ID_82541GI_MOBILE 0x1077
#define E1000_DEV_ID_82541GI_LF 0x107C
#define E1000_DEV_ID_82546GB_COPPER 0x1079 #define E1000_DEV_ID_82546GB_COPPER 0x1079
#define E1000_DEV_ID_82546GB_FIBER 0x107A #define E1000_DEV_ID_82546GB_FIBER 0x107A
#define E1000_DEV_ID_82546GB_SERDES 0x107B #define E1000_DEV_ID_82546GB_SERDES 0x107B
#define E1000_DEV_ID_82547EI 0x1019 #define E1000_DEV_ID_82547EI 0x1019
#define NODE_ADDRESS_SIZE 6 #define NODE_ADDRESS_SIZE 6
#define ETH_LENGTH_OF_ADDRESS 6 #define ETH_LENGTH_OF_ADDRESS 6
...@@ -1043,7 +1043,6 @@ struct e1000_hw { ...@@ -1043,7 +1043,6 @@ struct e1000_hw {
#define E1000_EEPROM_SWDPIN0 0x0001 /* SWDPIN 0 EEPROM Value */ #define E1000_EEPROM_SWDPIN0 0x0001 /* SWDPIN 0 EEPROM Value */
#define E1000_EEPROM_LED_LOGIC 0x0020 /* Led Logic Word */ #define E1000_EEPROM_LED_LOGIC 0x0020 /* Led Logic Word */
/* Register Bit Masks */ /* Register Bit Masks */
/* Device Control */ /* Device Control */
#define E1000_CTRL_FD 0x00000001 /* Full duplex.0=half; 1=full */ #define E1000_CTRL_FD 0x00000001 /* Full duplex.0=half; 1=full */
......
This diff is collapsed.
...@@ -235,7 +235,7 @@ struct e1000_option { ...@@ -235,7 +235,7 @@ struct e1000_option {
static int __devinit static int __devinit
e1000_validate_option(int *value, struct e1000_option *opt, e1000_validate_option(int *value, struct e1000_option *opt,
struct e1000_adapter *adapter) struct e1000_adapter *adapter)
{ {
if(*value == OPTION_UNSET) { if(*value == OPTION_UNSET) {
*value = opt->def; *value = opt->def;
...@@ -256,7 +256,7 @@ e1000_validate_option(int *value, struct e1000_option *opt, ...@@ -256,7 +256,7 @@ e1000_validate_option(int *value, struct e1000_option *opt,
case range_option: case range_option:
if(*value >= opt->arg.r.min && *value <= opt->arg.r.max) { if(*value >= opt->arg.r.min && *value <= opt->arg.r.max) {
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO,
"%s set to %i\n", opt->name, *value); "%s set to %i\n", opt->name, *value);
return 0; return 0;
} }
break; break;
...@@ -449,8 +449,7 @@ e1000_check_options(struct e1000_adapter *adapter) ...@@ -449,8 +449,7 @@ e1000_check_options(struct e1000_adapter *adapter)
DPRINTK(PROBE, INFO, "%s turned off\n", opt.name); DPRINTK(PROBE, INFO, "%s turned off\n", opt.name);
break; break;
case 1: case 1:
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", opt.name);
"%s set to dynamic mode\n", opt.name);
break; break;
default: default:
e1000_validate_option(&adapter->itr, &opt, adapter); e1000_validate_option(&adapter->itr, &opt, adapter);
...@@ -493,8 +492,9 @@ e1000_check_fiber_options(struct e1000_adapter *adapter) ...@@ -493,8 +492,9 @@ e1000_check_fiber_options(struct e1000_adapter *adapter)
"parameter ignored\n"); "parameter ignored\n");
} }
if((AutoNeg[bd] != OPTION_UNSET) && (AutoNeg[bd] != 0x20)) { if((AutoNeg[bd] != OPTION_UNSET) && (AutoNeg[bd] != 0x20)) {
DPRINTK(PROBE, INFO, "AutoNeg other than Full/1000 is " DPRINTK(PROBE, INFO, "AutoNeg other than 1000/Full is "
"not valid for fiber adapters, parameter ignored\n"); "not valid for fiber adapters, "
"parameter ignored\n");
} }
} }
...@@ -611,24 +611,24 @@ e1000_check_copper_options(struct e1000_adapter *adapter) ...@@ -611,24 +611,24 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
break; break;
case HALF_DUPLEX: case HALF_DUPLEX:
DPRINTK(PROBE, INFO, "Half Duplex specified without Speed\n"); DPRINTK(PROBE, INFO, "Half Duplex specified without Speed\n");
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO, "Using Autonegotiation at "
"Using Autonegotiation at Half Duplex only\n"); "Half Duplex only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_10_HALF | adapter->hw.autoneg_advertised = ADVERTISE_10_HALF |
ADVERTISE_100_HALF; ADVERTISE_100_HALF;
break; break;
case FULL_DUPLEX: case FULL_DUPLEX:
DPRINTK(PROBE, INFO, "Full Duplex specified without Speed\n"); DPRINTK(PROBE, INFO, "Full Duplex specified without Speed\n");
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO, "Using Autonegotiation at "
"Using Autonegotiation at Full Duplex only\n"); "Full Duplex only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_10_FULL | adapter->hw.autoneg_advertised = ADVERTISE_10_FULL |
ADVERTISE_100_FULL | ADVERTISE_100_FULL |
ADVERTISE_1000_FULL; ADVERTISE_1000_FULL;
break; break;
case SPEED_10: case SPEED_10:
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO, "10 Mbps Speed specified "
"10 Mbps Speed specified without Duplex\n"); "without Duplex\n");
DPRINTK(PROBE, INFO, "Using Autonegotiation at 10 Mbps only\n"); DPRINTK(PROBE, INFO, "Using Autonegotiation at 10 Mbps only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_10_HALF | adapter->hw.autoneg_advertised = ADVERTISE_10_HALF |
...@@ -647,10 +647,10 @@ e1000_check_copper_options(struct e1000_adapter *adapter) ...@@ -647,10 +647,10 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
adapter->hw.autoneg_advertised = 0; adapter->hw.autoneg_advertised = 0;
break; break;
case SPEED_100: case SPEED_100:
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO, "100 Mbps Speed specified "
"100 Mbps Speed specified without Duplex\n"); "without Duplex\n");
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO, "Using Autonegotiation at "
"Using Autonegotiation at 100 Mbps only\n"); "100 Mbps only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_100_HALF | adapter->hw.autoneg_advertised = ADVERTISE_100_HALF |
ADVERTISE_100_FULL; ADVERTISE_100_FULL;
...@@ -668,10 +668,11 @@ e1000_check_copper_options(struct e1000_adapter *adapter) ...@@ -668,10 +668,11 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
adapter->hw.autoneg_advertised = 0; adapter->hw.autoneg_advertised = 0;
break; break;
case SPEED_1000: case SPEED_1000:
DPRINTK(PROBE, INFO, "1000 Mbps Speed specified without "
"Duplex\n");
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO,
"1000 Mbps Speed specified without Duplex\n"); "Using Autonegotiation at 1000 Mbps "
DPRINTK(PROBE, INFO, "Full Duplex only\n");
"Using Autonegotiation at 1000 Mbps Full Duplex only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_1000_FULL; adapter->hw.autoneg_advertised = ADVERTISE_1000_FULL;
break; break;
...@@ -679,7 +680,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter) ...@@ -679,7 +680,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO,
"Half Duplex is not supported at 1000 Mbps\n"); "Half Duplex is not supported at 1000 Mbps\n");
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO,
"Using Autonegotiation at 1000 Mbps Full Duplex only\n"); "Using Autonegotiation at 1000 Mbps "
"Full Duplex only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1; adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_1000_FULL; adapter->hw.autoneg_advertised = ADVERTISE_1000_FULL;
break; break;
...@@ -696,8 +698,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter) ...@@ -696,8 +698,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
/* Speed, AutoNeg and MDI/MDI-X must all play nice */ /* Speed, AutoNeg and MDI/MDI-X must all play nice */
if (e1000_validate_mdi_setting(&(adapter->hw)) < 0) { if (e1000_validate_mdi_setting(&(adapter->hw)) < 0) {
DPRINTK(PROBE, INFO, DPRINTK(PROBE, INFO,
"Speed, AutoNeg and MDI-X specifications are " "Speed, AutoNeg and MDI-X specifications are "
"incompatible. Setting MDI-X to a compatible value.\n"); "incompatible. Setting MDI-X to a compatible value.\n");
} }
} }
...@@ -88,7 +88,6 @@ static int options[] = {-1, -1, -1, -1, -1, -1, -1, -1}; ...@@ -88,7 +88,6 @@ static int options[] = {-1, -1, -1, -1, -1, -1, -1, -1};
#define PKT_BUF_SZ 1536 #define PKT_BUF_SZ 1536
#include <linux/config.h> #include <linux/config.h>
#include <linux/version.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -2447,22 +2446,6 @@ static struct pci_driver eepro100_driver = { ...@@ -2447,22 +2446,6 @@ static struct pci_driver eepro100_driver = {
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
}; };
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,48)
static int pci_module_init(struct pci_driver *pdev)
{
int rc;
rc = pci_register_driver(pdev);
if (rc <= 0) {
printk(KERN_INFO "%s: No cards found, driver not installed.\n",
pdev->name);
pci_unregister_driver(pdev);
return -ENODEV;
}
return 0;
}
#endif
static int __init eepro100_init_module(void) static int __init eepro100_init_module(void)
{ {
#ifdef MODULE #ifdef MODULE
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -750,6 +750,9 @@ static void netdev_error(struct net_device *dev, int intr_status); ...@@ -750,6 +750,9 @@ static void netdev_error(struct net_device *dev, int intr_status);
static void netdev_rx(struct net_device *dev); static void netdev_rx(struct net_device *dev);
static void netdev_tx_done(struct net_device *dev); static void netdev_tx_done(struct net_device *dev);
static int natsemi_change_mtu(struct net_device *dev, int new_mtu); static int natsemi_change_mtu(struct net_device *dev, int new_mtu);
#ifdef CONFIG_NET_POLL_CONTROLLER
static void natsemi_poll_controller(struct net_device *dev);
#endif
static void __set_rx_mode(struct net_device *dev); static void __set_rx_mode(struct net_device *dev);
static void set_rx_mode(struct net_device *dev); static void set_rx_mode(struct net_device *dev);
static void __get_stats(struct net_device *dev); static void __get_stats(struct net_device *dev);
...@@ -920,6 +923,9 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev, ...@@ -920,6 +923,9 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
dev->do_ioctl = &netdev_ioctl; dev->do_ioctl = &netdev_ioctl;
dev->tx_timeout = &tx_timeout; dev->tx_timeout = &tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = &natsemi_poll_controller;
#endif
if (mtu) if (mtu)
dev->mtu = mtu; dev->mtu = mtu;
...@@ -2364,6 +2370,15 @@ static struct net_device_stats *get_stats(struct net_device *dev) ...@@ -2364,6 +2370,15 @@ static struct net_device_stats *get_stats(struct net_device *dev)
return &np->stats; return &np->stats;
} }
#ifdef CONFIG_NET_POLL_CONTROLLER
static void natsemi_poll_controller(struct net_device *dev)
{
disable_irq(dev->irq);
intr_handler(dev->irq, dev, NULL);
enable_irq(dev->irq);
}
#endif
#define HASH_TABLE 0x200 #define HASH_TABLE 0x200
static void __set_rx_mode(struct net_device *dev) static void __set_rx_mode(struct net_device *dev)
{ {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment