Commit b1106618 authored by Jeff Garzik's avatar Jeff Garzik

Merge pobox.com:/spare/repo/netdev-2.6/e1000

into pobox.com:/spare/repo/netdev-2.6/ALL
parents edf609bc fa88c854
......@@ -49,6 +49,7 @@
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/interrupt.h>
#include <linux/string.h>
#include <linux/pagemap.h>
......@@ -63,6 +64,7 @@
#include <linux/udp.h>
#include <net/pkt_sched.h>
#include <linux/list.h>
#include <linux/rtnetlink.h>
#include <linux/reboot.h>
#ifdef NETIF_F_TSO
#include <net/checksum.h>
......@@ -77,6 +79,8 @@
#define BAR_1 1
#define BAR_5 5
#define INTEL_E1000_ETHERNET_DEVICE(device_id) {\
PCI_DEVICE(PCI_VENDOR_ID_INTEL, device_id)}
struct e1000_adapter;
......@@ -98,11 +102,12 @@ struct e1000_adapter;
#define E1000_MAX_INTR 10
/* How many descriptors for TX and RX ? */
/* TX/RX descriptor defines */
#define E1000_DEFAULT_TXD 256
#define E1000_MAX_TXD 256
#define E1000_MIN_TXD 80
#define E1000_MAX_82544_TXD 4096
#define E1000_DEFAULT_RXD 256
#define E1000_MAX_RXD 256
#define E1000_MIN_RXD 80
......@@ -123,14 +128,11 @@ struct e1000_adapter;
#define E1000_TX_HEAD_ADDR_SHIFT 7
#define E1000_PBA_TX_MASK 0xFFFF0000
/* Flow Control High-Watermark: 5688 bytes below Rx FIFO size */
#define E1000_FC_HIGH_DIFF 0x1638
/* Flow Control Low-Watermark: 5696 bytes below Rx FIFO size */
#define E1000_FC_LOW_DIFF 0x1640
/* Flow Control Watermarks */
#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 Pause Time: 858 usec */
#define E1000_FC_PAUSE_TIME 0x0680
#define E1000_FC_PAUSE_TIME 0x0680 /* 858 usec */
/* How many Tx Descriptors do we need to call netif_wake_queue ? */
#define E1000_TX_QUEUE_WAKE 16
......@@ -153,9 +155,9 @@ struct e1000_adapter;
struct e1000_buffer {
struct sk_buff *skb;
uint64_t dma;
unsigned long length;
unsigned long time_stamp;
unsigned int next_to_watch;
uint16_t length;
uint16_t next_to_watch;
};
struct e1000_desc_ring {
......@@ -202,7 +204,7 @@ struct e1000_adapter {
spinlock_t stats_lock;
atomic_t irq_sem;
struct work_struct tx_timeout_task;
uint8_t fc_autoneg;
uint8_t fc_autoneg;
struct timer_list blink_timer;
unsigned long led_status;
......
This diff is collapsed.
......@@ -251,6 +251,7 @@ e1000_set_mac_type(struct e1000_hw *hw)
break;
case E1000_DEV_ID_82541ER:
case E1000_DEV_ID_82541GI:
case E1000_DEV_ID_82541GI_LF:
case E1000_DEV_ID_82541GI_MOBILE:
hw->mac_type = e1000_82541_rev_2;
break;
......@@ -920,7 +921,8 @@ e1000_setup_copper_link(struct e1000_hw *hw)
if(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);
phy_data |= 0x00000008;
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)
}
break;
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;
}
......@@ -3453,7 +3445,6 @@ e1000_read_eeprom(struct e1000_hw *hw,
uint32_t i = 0;
DEBUGFUNC("e1000_read_eeprom");
/* A check for invalid values: offset too large, too many words, and not
* enough words.
*/
......@@ -5224,3 +5215,4 @@ e1000_enable_mng_pass_thru(struct e1000_hw *hw)
}
return FALSE;
}
......@@ -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_82541GI 0x1076
#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_FIBER 0x107A
#define E1000_DEV_ID_82546GB_SERDES 0x107B
#define E1000_DEV_ID_82547EI 0x1019
#define NODE_ADDRESS_SIZE 6
#define ETH_LENGTH_OF_ADDRESS 6
......@@ -1043,7 +1043,6 @@ struct e1000_hw {
#define E1000_EEPROM_SWDPIN0 0x0001 /* SWDPIN 0 EEPROM Value */
#define E1000_EEPROM_LED_LOGIC 0x0020 /* Led Logic Word */
/* Register Bit Masks */
/* Device Control */
#define E1000_CTRL_FD 0x00000001 /* Full duplex.0=half; 1=full */
......
This diff is collapsed.
......@@ -235,7 +235,7 @@ struct e1000_option {
static int __devinit
e1000_validate_option(int *value, struct e1000_option *opt,
struct e1000_adapter *adapter)
struct e1000_adapter *adapter)
{
if(*value == OPTION_UNSET) {
*value = opt->def;
......@@ -256,7 +256,7 @@ e1000_validate_option(int *value, struct e1000_option *opt,
case range_option:
if(*value >= opt->arg.r.min && *value <= opt->arg.r.max) {
DPRINTK(PROBE, INFO,
"%s set to %i\n", opt->name, *value);
"%s set to %i\n", opt->name, *value);
return 0;
}
break;
......@@ -449,8 +449,7 @@ e1000_check_options(struct e1000_adapter *adapter)
DPRINTK(PROBE, INFO, "%s turned off\n", opt.name);
break;
case 1:
DPRINTK(PROBE, INFO,
"%s set to dynamic mode\n", opt.name);
DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", opt.name);
break;
default:
e1000_validate_option(&adapter->itr, &opt, adapter);
......@@ -493,8 +492,9 @@ e1000_check_fiber_options(struct e1000_adapter *adapter)
"parameter ignored\n");
}
if((AutoNeg[bd] != OPTION_UNSET) && (AutoNeg[bd] != 0x20)) {
DPRINTK(PROBE, INFO, "AutoNeg other than Full/1000 is "
"not valid for fiber adapters, parameter ignored\n");
DPRINTK(PROBE, INFO, "AutoNeg other than 1000/Full is "
"not valid for fiber adapters, "
"parameter ignored\n");
}
}
......@@ -611,24 +611,24 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
break;
case HALF_DUPLEX:
DPRINTK(PROBE, INFO, "Half Duplex specified without Speed\n");
DPRINTK(PROBE, INFO,
"Using Autonegotiation at Half Duplex only\n");
DPRINTK(PROBE, INFO, "Using Autonegotiation at "
"Half Duplex only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_10_HALF |
ADVERTISE_100_HALF;
break;
case FULL_DUPLEX:
DPRINTK(PROBE, INFO, "Full Duplex specified without Speed\n");
DPRINTK(PROBE, INFO,
"Using Autonegotiation at Full Duplex only\n");
DPRINTK(PROBE, INFO, "Using Autonegotiation at "
"Full Duplex only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_10_FULL |
ADVERTISE_100_FULL |
ADVERTISE_1000_FULL;
break;
case SPEED_10:
DPRINTK(PROBE, INFO,
"10 Mbps Speed specified without Duplex\n");
DPRINTK(PROBE, INFO, "10 Mbps Speed specified "
"without Duplex\n");
DPRINTK(PROBE, INFO, "Using Autonegotiation at 10 Mbps only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_10_HALF |
......@@ -647,10 +647,10 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
adapter->hw.autoneg_advertised = 0;
break;
case SPEED_100:
DPRINTK(PROBE, INFO,
"100 Mbps Speed specified without Duplex\n");
DPRINTK(PROBE, INFO,
"Using Autonegotiation at 100 Mbps only\n");
DPRINTK(PROBE, INFO, "100 Mbps Speed specified "
"without Duplex\n");
DPRINTK(PROBE, INFO, "Using Autonegotiation at "
"100 Mbps only\n");
adapter->hw.autoneg = adapter->fc_autoneg = 1;
adapter->hw.autoneg_advertised = ADVERTISE_100_HALF |
ADVERTISE_100_FULL;
......@@ -668,10 +668,11 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
adapter->hw.autoneg_advertised = 0;
break;
case SPEED_1000:
DPRINTK(PROBE, INFO, "1000 Mbps Speed specified without "
"Duplex\n");
DPRINTK(PROBE, INFO,
"1000 Mbps Speed specified without Duplex\n");
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_advertised = ADVERTISE_1000_FULL;
break;
......@@ -679,7 +680,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
DPRINTK(PROBE, INFO,
"Half Duplex is not supported at 1000 Mbps\n");
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_advertised = ADVERTISE_1000_FULL;
break;
......@@ -696,8 +698,8 @@ e1000_check_copper_options(struct e1000_adapter *adapter)
/* Speed, AutoNeg and MDI/MDI-X must all play nice */
if (e1000_validate_mdi_setting(&(adapter->hw)) < 0) {
DPRINTK(PROBE, INFO,
"Speed, AutoNeg and MDI-X specifications are "
"incompatible. Setting MDI-X to a compatible value.\n");
"Speed, AutoNeg and MDI-X specifications are "
"incompatible. Setting MDI-X to a compatible value.\n");
}
}
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