Commit 7f4174f1 authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-scsi.bkbits.net/scsi-for-linus-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 3b76b263 edf68308
This diff is collapsed.
...@@ -224,6 +224,9 @@ static struct devprobe isa_probes[] __initdata = { ...@@ -224,6 +224,9 @@ static struct devprobe isa_probes[] __initdata = {
#ifdef CONFIG_EL2 /* 3c503 */ #ifdef CONFIG_EL2 /* 3c503 */
{el2_probe, 0}, {el2_probe, 0},
#endif #endif
#ifdef CONFIG_EL3
{el3_probe, 0},
#endif
#ifdef CONFIG_HPLAN #ifdef CONFIG_HPLAN
{hp_probe, 0}, {hp_probe, 0},
#endif #endif
......
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
obj-$(CONFIG_E100) += e100.o obj-$(CONFIG_E100) += e100.o
e100-objs := e100_main.o e100_config.o e100_proc.o e100_phy.o \ e100-objs := e100_main.o e100_config.o e100_phy.o \
e100_eeprom.o e100_test.o e100_eeprom.o e100_test.o
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#include <linux/if.h> #include <linux/if.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <linux/proc_fs.h>
#include <linux/ip.h> #include <linux/ip.h>
#define E100_REGS_LEN 1 #define E100_REGS_LEN 1
...@@ -926,20 +925,7 @@ struct e100_private { ...@@ -926,20 +925,7 @@ struct e100_private {
struct cfg_params params; /* adapter's command line parameters */ struct cfg_params params; /* adapter's command line parameters */
struct proc_dir_entry *proc_parent;
char *id_string; char *id_string;
char *cable_status;
char *mdix_status;
/* Variables for HWI */
int saved_open_circut;
int saved_short_circut;
int saved_distance;
int saved_i;
int saved_same;
unsigned char hwi_started;
struct timer_list hwi_timer; /* hwi timer id */
u32 speed_duplex_caps; /* adapter's speed/duplex capabilities */ u32 speed_duplex_caps; /* adapter's speed/duplex capabilities */
......
This diff is collapsed.
This diff is collapsed.
...@@ -32,5 +32,4 @@ ...@@ -32,5 +32,4 @@
obj-$(CONFIG_E1000) += e1000.o obj-$(CONFIG_E1000) += e1000.o
e1000-objs := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o \ e1000-objs := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o
e1000_proc.o
...@@ -157,9 +157,6 @@ struct e1000_desc_ring { ...@@ -157,9 +157,6 @@ struct e1000_desc_ring {
struct e1000_adapter { struct e1000_adapter {
struct timer_list watchdog_timer; struct timer_list watchdog_timer;
struct timer_list phy_info_timer; struct timer_list phy_info_timer;
#ifdef CONFIG_PROC_FS
struct list_head proc_list_head;
#endif
struct vlan_group *vlgrp; struct vlan_group *vlgrp;
char *id_string; char *id_string;
uint32_t bd_number; uint32_t bd_number;
......
...@@ -39,6 +39,16 @@ extern int e1000_up(struct e1000_adapter *adapter); ...@@ -39,6 +39,16 @@ extern int e1000_up(struct e1000_adapter *adapter);
extern void e1000_down(struct e1000_adapter *adapter); extern void e1000_down(struct e1000_adapter *adapter);
extern void e1000_reset(struct e1000_adapter *adapter); extern void e1000_reset(struct e1000_adapter *adapter);
static char e1000_gstrings_stats[][ETH_GSTRING_LEN] = {
"rx_packets", "tx_packets", "rx_bytes", "tx_bytes", "rx_errors",
"tx_errors", "rx_dropped", "tx_dropped", "multicast", "collisions",
"rx_length_errors", "rx_over_errors", "rx_crc_errors",
"rx_frame_errors", "rx_fifo_errors", "rx_missed_errors",
"tx_aborted_errors", "tx_carrier_errors", "tx_fifo_errors",
"tx_heartbeat_errors", "tx_window_errors",
};
#define E1000_STATS_LEN sizeof(e1000_gstrings_stats) / ETH_GSTRING_LEN
static void static void
e1000_ethtool_gset(struct e1000_adapter *adapter, struct ethtool_cmd *ecmd) e1000_ethtool_gset(struct e1000_adapter *adapter, struct ethtool_cmd *ecmd)
{ {
...@@ -173,6 +183,7 @@ e1000_ethtool_gdrvinfo(struct e1000_adapter *adapter, ...@@ -173,6 +183,7 @@ e1000_ethtool_gdrvinfo(struct e1000_adapter *adapter,
strncpy(drvinfo->version, e1000_driver_version, 32); strncpy(drvinfo->version, e1000_driver_version, 32);
strncpy(drvinfo->fw_version, "N/A", 32); strncpy(drvinfo->fw_version, "N/A", 32);
strncpy(drvinfo->bus_info, adapter->pdev->slot_name, 32); strncpy(drvinfo->bus_info, adapter->pdev->slot_name, 32);
drvinfo->n_stats = E1000_STATS_LEN;
#define E1000_REGS_LEN 32 #define E1000_REGS_LEN 32
drvinfo->regdump_len = E1000_REGS_LEN * sizeof(uint32_t); drvinfo->regdump_len = E1000_REGS_LEN * sizeof(uint32_t);
drvinfo->eedump_len = e1000_eeprom_size(&adapter->hw); drvinfo->eedump_len = e1000_eeprom_size(&adapter->hw);
...@@ -209,17 +220,23 @@ e1000_ethtool_geeprom(struct e1000_adapter *adapter, ...@@ -209,17 +220,23 @@ e1000_ethtool_geeprom(struct e1000_adapter *adapter,
struct ethtool_eeprom *eeprom, uint16_t *eeprom_buff) struct ethtool_eeprom *eeprom, uint16_t *eeprom_buff)
{ {
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
int i, max_len, first_word, last_word; int max_len, first_word, last_word;
int ret_val = 0;
int i;
if(eeprom->len == 0) if(eeprom->len == 0) {
return -EINVAL; ret_val = -EINVAL;
goto geeprom_error;
}
eeprom->magic = hw->vendor_id | (hw->device_id << 16); eeprom->magic = hw->vendor_id | (hw->device_id << 16);
max_len = e1000_eeprom_size(hw); max_len = e1000_eeprom_size(hw);
if(eeprom->offset > eeprom->offset + eeprom->len) if(eeprom->offset > eeprom->offset + eeprom->len) {
return -EINVAL; ret_val = -EINVAL;
goto geeprom_error;
}
if((eeprom->offset + eeprom->len) > max_len) if((eeprom->offset + eeprom->len) > max_len)
eeprom->len = (max_len - eeprom->offset); eeprom->len = (max_len - eeprom->offset);
...@@ -230,7 +247,8 @@ e1000_ethtool_geeprom(struct e1000_adapter *adapter, ...@@ -230,7 +247,8 @@ e1000_ethtool_geeprom(struct e1000_adapter *adapter,
for(i = 0; i <= (last_word - first_word); i++) for(i = 0; i <= (last_word - first_word); i++)
e1000_read_eeprom(hw, first_word + i, &eeprom_buff[i]); e1000_read_eeprom(hw, first_word + i, &eeprom_buff[i]);
return 0; geeprom_error:
return ret_val;
} }
static int static int
...@@ -238,9 +256,10 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter, ...@@ -238,9 +256,10 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter,
struct ethtool_eeprom *eeprom, void *user_data) struct ethtool_eeprom *eeprom, void *user_data)
{ {
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
uint16_t eeprom_buff[256]; uint16_t *eeprom_buff;
int i, max_len, first_word, last_word; int max_len, first_word, last_word;
void *ptr; void *ptr;
int i;
if(eeprom->len == 0) if(eeprom->len == 0)
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -255,6 +274,10 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter, ...@@ -255,6 +274,10 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter,
first_word = eeprom->offset >> 1; first_word = eeprom->offset >> 1;
last_word = (eeprom->offset + eeprom->len - 1) >> 1; last_word = (eeprom->offset + eeprom->len - 1) >> 1;
eeprom_buff = kmalloc(max_len, GFP_KERNEL);
if(eeprom_buff == NULL)
return -ENOMEM;
ptr = (void *)eeprom_buff; ptr = (void *)eeprom_buff;
if(eeprom->offset & 1) { if(eeprom->offset & 1) {
...@@ -269,8 +292,10 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter, ...@@ -269,8 +292,10 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter,
e1000_read_eeprom(hw, last_word, e1000_read_eeprom(hw, last_word,
&eeprom_buff[last_word - first_word]); &eeprom_buff[last_word - first_word]);
} }
if(copy_from_user(ptr, user_data, eeprom->len)) if(copy_from_user(ptr, user_data, eeprom->len)) {
kfree(eeprom_buff);
return -EFAULT; return -EFAULT;
}
for(i = 0; i <= (last_word - first_word); i++) for(i = 0; i <= (last_word - first_word); i++)
e1000_write_eeprom(hw, first_word + i, eeprom_buff[i]); e1000_write_eeprom(hw, first_word + i, eeprom_buff[i]);
...@@ -279,6 +304,8 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter, ...@@ -279,6 +304,8 @@ e1000_ethtool_seeprom(struct e1000_adapter *adapter,
if(first_word <= EEPROM_CHECKSUM_REG) if(first_word <= EEPROM_CHECKSUM_REG)
e1000_update_eeprom_checksum(hw); e1000_update_eeprom_checksum(hw);
kfree(eeprom_buff);
return 0; return 0;
} }
...@@ -438,6 +465,28 @@ e1000_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr) ...@@ -438,6 +465,28 @@ e1000_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr)
return -EFAULT; return -EFAULT;
return 0; return 0;
} }
case ETHTOOL_GSTRINGS: {
struct ethtool_gstrings gstrings = { ETHTOOL_GSTRINGS };
char *strings = NULL;
if(copy_from_user(&gstrings, addr, sizeof(gstrings)))
return -EFAULT;
switch(gstrings.string_set) {
case ETH_SS_STATS:
gstrings.len = E1000_STATS_LEN;
strings = *e1000_gstrings_stats;
break;
default:
return -EOPNOTSUPP;
}
if(copy_to_user(addr, &gstrings, sizeof(gstrings)))
return -EFAULT;
addr += offsetof(struct ethtool_gstrings, data);
if(copy_to_user(addr, strings,
gstrings.len * ETH_GSTRING_LEN))
return -EFAULT;
return 0;
}
case ETHTOOL_GREGS: { case ETHTOOL_GREGS: {
struct ethtool_regs regs = {ETHTOOL_GREGS}; struct ethtool_regs regs = {ETHTOOL_GREGS};
uint32_t regs_buff[E1000_REGS_LEN]; uint32_t regs_buff[E1000_REGS_LEN];
...@@ -493,26 +542,40 @@ e1000_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr) ...@@ -493,26 +542,40 @@ e1000_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr)
} }
case ETHTOOL_GEEPROM: { case ETHTOOL_GEEPROM: {
struct ethtool_eeprom eeprom = {ETHTOOL_GEEPROM}; struct ethtool_eeprom eeprom = {ETHTOOL_GEEPROM};
uint16_t eeprom_buff[256]; uint16_t *eeprom_buff;
void *ptr; void *ptr;
int err; int max_len, err = 0;
if(copy_from_user(&eeprom, addr, sizeof(eeprom))) max_len = e1000_eeprom_size(&adapter->hw);
return -EFAULT;
if((err = e1000_ethtool_geeprom(adapter, eeprom_buff = kmalloc(max_len, GFP_KERNEL);
&eeprom, eeprom_buff)))
return err;
if(copy_to_user(addr, &eeprom, sizeof(eeprom))) if(eeprom_buff == NULL)
return -EFAULT; return -ENOMEM;
if(copy_from_user(&eeprom, addr, sizeof(eeprom))) {
err = -EFAULT;
goto err_geeprom_ioctl;
}
if((err = e1000_ethtool_geeprom(adapter, &eeprom,
eeprom_buff)))
goto err_geeprom_ioctl;
if(copy_to_user(addr, &eeprom, sizeof(eeprom))) {
err = -EFAULT;
goto err_geeprom_ioctl;
}
addr += offsetof(struct ethtool_eeprom, data); addr += offsetof(struct ethtool_eeprom, data);
ptr = ((void *)eeprom_buff) + (eeprom.offset & 1); ptr = ((void *)eeprom_buff) + (eeprom.offset & 1);
if(copy_to_user(addr, ptr, eeprom.len)) if(copy_to_user(addr, ptr, eeprom.len))
return -EFAULT; err = -EFAULT;
return 0;
err_geeprom_ioctl:
kfree(eeprom_buff);
return err;
} }
case ETHTOOL_SEEPROM: { case ETHTOOL_SEEPROM: {
struct ethtool_eeprom eeprom; struct ethtool_eeprom eeprom;
...@@ -526,6 +589,20 @@ e1000_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr) ...@@ -526,6 +589,20 @@ e1000_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr)
addr += offsetof(struct ethtool_eeprom, data); addr += offsetof(struct ethtool_eeprom, data);
return e1000_ethtool_seeprom(adapter, &eeprom, addr); return e1000_ethtool_seeprom(adapter, &eeprom, addr);
} }
case ETHTOOL_GSTATS: {
struct {
struct ethtool_stats cmd;
uint64_t data[E1000_STATS_LEN];
} stats = { {ETHTOOL_GSTATS, E1000_STATS_LEN} };
int i;
for(i = 0; i < E1000_STATS_LEN; i++)
stats.data[i] =
((unsigned long *)&adapter->net_stats)[i];
if(copy_to_user(addr, &stats, sizeof(stats)))
return -EFAULT;
return 0;
}
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
char e1000_driver_name[] = "e1000"; char e1000_driver_name[] = "e1000";
char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
char e1000_driver_version[] = "4.4.19-k1"; char e1000_driver_version[] = "4.4.19-k3";
char e1000_copyright[] = "Copyright (c) 1999-2002 Intel Corporation."; char e1000_copyright[] = "Copyright (c) 1999-2002 Intel Corporation.";
/* e1000_pci_tbl - PCI Device ID Table /* e1000_pci_tbl - PCI Device ID Table
...@@ -171,7 +171,6 @@ static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); ...@@ -171,7 +171,6 @@ static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
static void e1000_restore_vlan(struct e1000_adapter *adapter); static void e1000_restore_vlan(struct e1000_adapter *adapter);
static int e1000_notify_reboot(struct notifier_block *, unsigned long event, void *ptr); static int e1000_notify_reboot(struct notifier_block *, unsigned long event, void *ptr);
static int e1000_notify_netdev(struct notifier_block *, unsigned long event, void *ptr);
static int e1000_suspend(struct pci_dev *pdev, uint32_t state); static int e1000_suspend(struct pci_dev *pdev, uint32_t state);
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int e1000_resume(struct pci_dev *pdev); static int e1000_resume(struct pci_dev *pdev);
...@@ -183,17 +182,9 @@ struct notifier_block e1000_notifier_reboot = { ...@@ -183,17 +182,9 @@ struct notifier_block e1000_notifier_reboot = {
.priority = 0 .priority = 0
}; };
struct notifier_block e1000_notifier_netdev = {
.notifier_call = e1000_notify_netdev,
.next = NULL,
.priority = 0
};
/* Exported from other modules */ /* Exported from other modules */
extern void e1000_check_options(struct e1000_adapter *adapter); extern void e1000_check_options(struct e1000_adapter *adapter);
extern void e1000_proc_dev_setup(struct e1000_adapter *adapter);
extern void e1000_proc_dev_free(struct e1000_adapter *adapter);
extern int e1000_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr); extern int e1000_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr);
static struct pci_driver e1000_driver = { static struct pci_driver e1000_driver = {
...@@ -229,10 +220,8 @@ e1000_init_module(void) ...@@ -229,10 +220,8 @@ e1000_init_module(void)
printk(KERN_INFO "%s\n", e1000_copyright); printk(KERN_INFO "%s\n", e1000_copyright);
ret = pci_module_init(&e1000_driver); ret = pci_module_init(&e1000_driver);
if(ret >= 0) { if(ret >= 0)
register_reboot_notifier(&e1000_notifier_reboot); register_reboot_notifier(&e1000_notifier_reboot);
register_netdevice_notifier(&e1000_notifier_netdev);
}
return ret; return ret;
} }
...@@ -249,7 +238,6 @@ static void __exit ...@@ -249,7 +238,6 @@ static void __exit
e1000_exit_module(void) e1000_exit_module(void)
{ {
unregister_reboot_notifier(&e1000_notifier_reboot); unregister_reboot_notifier(&e1000_notifier_reboot);
unregister_netdevice_notifier(&e1000_notifier_netdev);
pci_unregister_driver(&e1000_driver); pci_unregister_driver(&e1000_driver);
} }
...@@ -433,10 +421,8 @@ e1000_probe(struct pci_dev *pdev, ...@@ -433,10 +421,8 @@ e1000_probe(struct pci_dev *pdev,
netdev->features = NETIF_F_SG; netdev->features = NETIF_F_SG;
} }
#ifdef NETIF_F_TSO
if(adapter->hw.mac_type >= e1000_82544) if(adapter->hw.mac_type >= e1000_82544)
netdev->features |= NETIF_F_TSO; netdev->features |= NETIF_F_TSO;
#endif
if(pci_using_dac) if(pci_using_dac)
netdev->features |= NETIF_F_HIGHDMA; netdev->features |= NETIF_F_HIGHDMA;
...@@ -490,7 +476,6 @@ e1000_probe(struct pci_dev *pdev, ...@@ -490,7 +476,6 @@ e1000_probe(struct pci_dev *pdev,
printk(KERN_INFO "%s: %s\n", netdev->name, adapter->id_string); printk(KERN_INFO "%s: %s\n", netdev->name, adapter->id_string);
e1000_check_options(adapter); e1000_check_options(adapter);
e1000_proc_dev_setup(adapter);
/* Initial Wake on LAN setting /* Initial Wake on LAN setting
* If APM wake is enabled in the EEPROM, * If APM wake is enabled in the EEPROM,
...@@ -548,8 +533,6 @@ e1000_remove(struct pci_dev *pdev) ...@@ -548,8 +533,6 @@ e1000_remove(struct pci_dev *pdev)
e1000_phy_hw_reset(&adapter->hw); e1000_phy_hw_reset(&adapter->hw);
e1000_proc_dev_free(adapter);
iounmap(adapter->hw.hw_addr); iounmap(adapter->hw.hw_addr);
pci_release_regions(pdev); pci_release_regions(pdev);
...@@ -1314,7 +1297,6 @@ e1000_watchdog(unsigned long data) ...@@ -1314,7 +1297,6 @@ e1000_watchdog(unsigned long data)
static inline boolean_t static inline boolean_t
e1000_tso(struct e1000_adapter *adapter, struct sk_buff *skb, int tx_flags) e1000_tso(struct e1000_adapter *adapter, struct sk_buff *skb, int tx_flags)
{ {
#ifdef NETIF_F_TSO
struct e1000_context_desc *context_desc; struct e1000_context_desc *context_desc;
int i; int i;
uint8_t ipcss, ipcso, tucss, tucso, hdr_len; uint8_t ipcss, ipcso, tucss, tucso, hdr_len;
...@@ -1358,7 +1340,6 @@ e1000_tso(struct e1000_adapter *adapter, struct sk_buff *skb, int tx_flags) ...@@ -1358,7 +1340,6 @@ e1000_tso(struct e1000_adapter *adapter, struct sk_buff *skb, int tx_flags)
return TRUE; return TRUE;
} }
#endif
return FALSE; return FALSE;
} }
...@@ -1398,6 +1379,8 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb) ...@@ -1398,6 +1379,8 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb)
{ {
struct e1000_desc_ring *tx_ring = &adapter->tx_ring; struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
int len, offset, size, count, i; int len, offset, size, count, i;
int tso = skb_shinfo(skb)->tso_size;
int nr_frags = skb_shinfo(skb)->nr_frags;
int f; int f;
len = skb->len - skb->data_len; len = skb->len - skb->data_len;
...@@ -1409,6 +1392,10 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb) ...@@ -1409,6 +1392,10 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb)
while(len) { while(len) {
i = (i + 1) % tx_ring->count; i = (i + 1) % tx_ring->count;
size = min(len, adapter->max_data_per_txd); size = min(len, adapter->max_data_per_txd);
/* Workaround for premature desc write-backs
* in TSO mode. Append 4-byte sentinel desc */
if(tso && !nr_frags && size == len && size > 4)
size -= 4;
tx_ring->buffer_info[i].length = size; tx_ring->buffer_info[i].length = size;
tx_ring->buffer_info[i].dma = tx_ring->buffer_info[i].dma =
pci_map_single(adapter->pdev, pci_map_single(adapter->pdev,
...@@ -1422,7 +1409,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb) ...@@ -1422,7 +1409,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb)
count++; count++;
} }
for(f = 0; f < skb_shinfo(skb)->nr_frags; f++) { for(f = 0; f < nr_frags; f++) {
struct skb_frag_struct *frag; struct skb_frag_struct *frag;
frag = &skb_shinfo(skb)->frags[f]; frag = &skb_shinfo(skb)->frags[f];
...@@ -1432,6 +1419,10 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb) ...@@ -1432,6 +1419,10 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb)
while(len) { while(len) {
i = (i + 1) % tx_ring->count; i = (i + 1) % tx_ring->count;
size = min(len, adapter->max_data_per_txd); size = min(len, adapter->max_data_per_txd);
/* Workaround for premature desc write-backs
* in TSO mode. Append 4-byte sentinel desc */
if(tso && f == (nr_frags-1) && size == len && size > 4)
size -= 4;
tx_ring->buffer_info[i].length = size; tx_ring->buffer_info[i].length = size;
tx_ring->buffer_info[i].dma = tx_ring->buffer_info[i].dma =
pci_map_page(adapter->pdev, pci_map_page(adapter->pdev,
...@@ -1439,6 +1430,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb) ...@@ -1439,6 +1430,7 @@ e1000_tx_map(struct e1000_adapter *adapter, struct sk_buff *skb)
frag->page_offset + offset, frag->page_offset + offset,
size, size,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
tx_ring->buffer_info[i].time_stamp = jiffies;
len -= size; len -= size;
offset += size; offset += size;
...@@ -1520,13 +1512,8 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) ...@@ -1520,13 +1512,8 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
for(f = 0; f < skb_shinfo(skb)->nr_frags; f++) for(f = 0; f < skb_shinfo(skb)->nr_frags; f++)
count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size, count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size,
adapter->max_data_per_txd); adapter->max_data_per_txd);
#ifdef NETIF_F_TSO
if((skb_shinfo(skb)->tso_size) || (skb->ip_summed == CHECKSUM_HW)) if((skb_shinfo(skb)->tso_size) || (skb->ip_summed == CHECKSUM_HW))
count++; count++;
#else
if(skb->ip_summed == CHECKSUM_HW)
count++;
#endif
if(E1000_DESC_UNUSED(&adapter->tx_ring) < count) { if(E1000_DESC_UNUSED(&adapter->tx_ring) < count) {
netif_stop_queue(netdev); netif_stop_queue(netdev);
...@@ -1823,7 +1810,10 @@ e1000_intr(int irq, void *data, struct pt_regs *regs) ...@@ -1823,7 +1810,10 @@ e1000_intr(int irq, void *data, struct pt_regs *regs)
#ifdef CONFIG_E1000_NAPI #ifdef CONFIG_E1000_NAPI
if (netif_rx_schedule_prep(netdev)) { if (netif_rx_schedule_prep(netdev)) {
e1000_irq_disable(adapter); /* Disable interrupts and enable polling */
atomic_inc(&adapter->irq_sem);
E1000_WRITE_REG(&adapter->hw, IMC, ~0);
E1000_WRITE_FLUSH(&adapter->hw);
__netif_rx_schedule(netdev); __netif_rx_schedule(netdev);
} }
#else #else
...@@ -2429,29 +2419,6 @@ e1000_notify_reboot(struct notifier_block *nb, unsigned long event, void *p) ...@@ -2429,29 +2419,6 @@ e1000_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
return NOTIFY_DONE; return NOTIFY_DONE;
} }
static int
e1000_notify_netdev(struct notifier_block *nb, unsigned long event, void *p)
{
struct e1000_adapter *adapter;
struct net_device *netdev = p;
if(netdev == NULL)
return NOTIFY_DONE;
switch(event) {
case NETDEV_CHANGENAME:
if(netdev->open == e1000_open) {
adapter = netdev->priv;
/* rename the proc nodes the easy way */
e1000_proc_dev_free(adapter);
memcpy(adapter->ifname, netdev->name, IFNAMSIZ);
adapter->ifname[IFNAMSIZ-1] = 0;
e1000_proc_dev_setup(adapter);
}
break;
}
return NOTIFY_DONE;
}
static int static int
e1000_suspend(struct pci_dev *pdev, uint32_t state) e1000_suspend(struct pci_dev *pdev, uint32_t state)
{ {
......
This diff is collapsed.
This diff is collapsed.
...@@ -113,6 +113,8 @@ ...@@ -113,6 +113,8 @@
#define CHIPREV_ID_5703_A2 0x1002 #define CHIPREV_ID_5703_A2 0x1002
#define CHIPREV_ID_5703_A3 0x1003 #define CHIPREV_ID_5703_A3 0x1003
#define CHIPREV_ID_5704_A0 0x2000 #define CHIPREV_ID_5704_A0 0x2000
#define CHIPREV_ID_5704_A1 0x2001
#define CHIPREV_ID_5704_A2 0x2002
#define GET_ASIC_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 12) #define GET_ASIC_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 12)
#define ASIC_REV_5700 0x07 #define ASIC_REV_5700 0x07
#define ASIC_REV_5701 0x00 #define ASIC_REV_5701 0x00
...@@ -454,6 +456,7 @@ ...@@ -454,6 +456,7 @@
#define RCV_RULE_DISABLE_MASK 0x7fffffff #define RCV_RULE_DISABLE_MASK 0x7fffffff
#define MAC_RCV_RULE_CFG 0x00000500 #define MAC_RCV_RULE_CFG 0x00000500
#define RCV_RULE_CFG_DEFAULT_CLASS 0x00000008 #define RCV_RULE_CFG_DEFAULT_CLASS 0x00000008
#define MAC_LOW_WMARK_MAX_RX_FRAME 0x00000504
/* 0x504 --> 0x590 unused */ /* 0x504 --> 0x590 unused */
#define MAC_SERDES_CFG 0x00000590 #define MAC_SERDES_CFG 0x00000590
#define MAC_SERDES_STAT 0x00000594 #define MAC_SERDES_STAT 0x00000594
...@@ -1136,6 +1139,7 @@ ...@@ -1136,6 +1139,7 @@
#define GRC_MISC_CFG_BOARD_ID_5703S 0x00002000 #define GRC_MISC_CFG_BOARD_ID_5703S 0x00002000
#define GRC_MISC_CFG_BOARD_ID_5704 0x00000000 #define GRC_MISC_CFG_BOARD_ID_5704 0x00000000
#define GRC_MISC_CFG_BOARD_ID_5704CIOBE 0x00004000 #define GRC_MISC_CFG_BOARD_ID_5704CIOBE 0x00004000
#define GRC_MISC_CFG_BOARD_ID_5704_A2 0x00008000
#define GRC_MISC_CFG_BOARD_ID_AC91002A1 0x00018000 #define GRC_MISC_CFG_BOARD_ID_AC91002A1 0x00018000
#define GRC_LOCAL_CTRL 0x00006808 #define GRC_LOCAL_CTRL 0x00006808
#define GRC_LCLCTRL_INT_ACTIVE 0x00000001 #define GRC_LCLCTRL_INT_ACTIVE 0x00000001
...@@ -1791,6 +1795,7 @@ struct tg3 { ...@@ -1791,6 +1795,7 @@ struct tg3 {
#define TG3_FLAG_USE_LINKCHG_REG 0x00000008 #define TG3_FLAG_USE_LINKCHG_REG 0x00000008
#define TG3_FLAG_USE_MI_INTERRUPT 0x00000010 #define TG3_FLAG_USE_MI_INTERRUPT 0x00000010
#define TG3_FLAG_ENABLE_ASF 0x00000020 #define TG3_FLAG_ENABLE_ASF 0x00000020
#define TG3_FLAG_5701_REG_WRITE_BUG 0x00000040
#define TG3_FLAG_POLL_SERDES 0x00000080 #define TG3_FLAG_POLL_SERDES 0x00000080
#define TG3_FLAG_MBOX_WRITE_REORDER 0x00000100 #define TG3_FLAG_MBOX_WRITE_REORDER 0x00000100
#define TG3_FLAG_PCIX_TARGET_HWBUG 0x00000200 #define TG3_FLAG_PCIX_TARGET_HWBUG 0x00000200
......
...@@ -1661,6 +1661,9 @@ ...@@ -1661,6 +1661,9 @@
#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d #define PCI_DEVICE_ID_TIGON3_5702FE 0x164d
#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6 #define PCI_DEVICE_ID_TIGON3_5702X 0x16a6
#define PCI_DEVICE_ID_TIGON3_5703X 0x16a7 #define PCI_DEVICE_ID_TIGON3_5703X 0x16a7
#define PCI_DEVICE_ID_TIGON3_5704S 0x16a8
#define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6
#define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7
#define PCI_DEVICE_ID_BCM4401 0x4401 #define PCI_DEVICE_ID_BCM4401 0x4401
#define PCI_VENDOR_ID_SYBA 0x1592 #define PCI_VENDOR_ID_SYBA 0x1592
......
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