Skip to content

Commit

Permalink
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  WOL bugfix for 3c59x.c
  skge 1.12
  skge: add a debug interface
  skge: eeprom support
  skge: internal stats
  skge: XM PHY handling fixes
  skge: changing MTU while running causes problems
  skge: fix ram buffer size calculation
  gianfar: Fix compile regression caused by 09f75cd
  net: Fix new EMAC driver for NAPI changes
  bonding: two small fixes for IPoIB support
  e1000e: don't poke PHY registers to retreive link status
  e1000e: fix error checks
  e1000e: Fix debug printk macro
  tokenring/3c359.c: fixed array index problem
  [netdrvr] forcedeth: remove in-driver copy of net_device_stats
  [netdrvr] forcedeth: improved probe info; dev_printk() cleanups
  forcedeth: fix NAPI rx poll function
  • Loading branch information
Linus Torvalds committed Oct 17, 2007
2 parents e5712a6 + 1a1769f commit ebb3e82
Show file tree
Hide file tree
Showing 12 changed files with 558 additions and 216 deletions.
8 changes: 7 additions & 1 deletion drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3118,7 +3118,13 @@ static void acpi_set_WOL(struct net_device *dev)
iowrite16(SetRxFilter|RxStation|RxMulticast|RxBroadcast, ioaddr + EL3_CMD);
iowrite16(RxEnable, ioaddr + EL3_CMD);

pci_enable_wake(VORTEX_PCI(vp), 0, 1);
if (pci_enable_wake(VORTEX_PCI(vp), PCI_D3hot, 1)) {
printk(KERN_INFO "%s: WOL not supported.\n",
pci_name(VORTEX_PCI(vp)));

vp->enable_wol = 0;
return;
}

/* Change the power state to D3; RxEnable doesn't take effect. */
pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot);
Expand Down
10 changes: 10 additions & 0 deletions drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2173,6 +2173,16 @@ config SKGE
To compile this driver as a module, choose M here: the module
will be called skge. This is recommended.

config SKGE_DEBUG
bool "Debugging interface"
depends on SKGE && DEBUG_FS
help
This option adds the ability to dump driver state for debugging.
The file debugfs/skge/ethX displays the state of the internal
transmit and receive rings.

If unsure, say N.

config SKY2
tristate "SysKonnect Yukon2 support"
depends on PCI
Expand Down
11 changes: 5 additions & 6 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,7 @@ static void bond_setup_by_slave(struct net_device *bond_dev,
struct bonding *bond = bond_dev->priv;

bond_dev->neigh_setup = slave_dev->neigh_setup;
bond_dev->header_ops = slave_dev->header_ops;

bond_dev->type = slave_dev->type;
bond_dev->hard_header_len = slave_dev->hard_header_len;
Expand Down Expand Up @@ -3351,7 +3352,10 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave
switch (event) {
case NETDEV_UNREGISTER:
if (bond_dev) {
bond_release(bond_dev, slave_dev);
if (bond->setup_by_slave)
bond_release_and_destroy(bond_dev, slave_dev);
else
bond_release(bond_dev, slave_dev);
}
break;
case NETDEV_CHANGE:
Expand All @@ -3366,11 +3370,6 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave
* ... Or is it this?
*/
break;
case NETDEV_GOING_DOWN:
dprintk("slave %s is going down\n", slave_dev->name);
if (bond->setup_by_slave)
bond_release_and_destroy(bond_dev, slave_dev);
break;
case NETDEV_CHANGEMTU:
/*
* TODO: Should slaves be allowed to
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/bonding/bonding.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "bond_3ad.h"
#include "bond_alb.h"

#define DRV_VERSION "3.2.0"
#define DRV_RELDATE "September 13, 2007"
#define DRV_VERSION "3.2.1"
#define DRV_RELDATE "October 15, 2007"
#define DRV_NAME "bonding"
#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"

Expand Down
35 changes: 23 additions & 12 deletions drivers/net/e1000e/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ static int e1000_get_settings(struct net_device *netdev,
{
struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
u32 status;

if (hw->media_type == e1000_media_type_copper) {

Expand Down Expand Up @@ -147,16 +148,16 @@ static int e1000_get_settings(struct net_device *netdev,
ecmd->transceiver = XCVR_EXTERNAL;
}

if (er32(STATUS) & E1000_STATUS_LU) {

adapter->hw.mac.ops.get_link_up_info(hw, &adapter->link_speed,
&adapter->link_duplex);
ecmd->speed = adapter->link_speed;

/* unfortunately FULL_DUPLEX != DUPLEX_FULL
* and HALF_DUPLEX != DUPLEX_HALF */
status = er32(STATUS);
if (status & E1000_STATUS_LU) {
if (status & E1000_STATUS_SPEED_1000)
ecmd->speed = 1000;
else if (status & E1000_STATUS_SPEED_100)
ecmd->speed = 100;
else
ecmd->speed = 10;

if (adapter->link_duplex == FULL_DUPLEX)
if (status & E1000_STATUS_FD)
ecmd->duplex = DUPLEX_FULL;
else
ecmd->duplex = DUPLEX_HALF;
Expand All @@ -170,6 +171,16 @@ static int e1000_get_settings(struct net_device *netdev,
return 0;
}

static u32 e1000_get_link(struct net_device *netdev)
{
struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw;
u32 status;

status = er32(STATUS);
return (status & E1000_STATUS_LU);
}

static int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx)
{
struct e1000_mac_info *mac = &adapter->hw.mac;
Expand Down Expand Up @@ -1451,11 +1462,11 @@ static int e1000_loopback_test(struct e1000_adapter *adapter, u64 *data)
}

*data = e1000_setup_desc_rings(adapter);
if (data)
if (*data)
goto out;

*data = e1000_setup_loopback_test(adapter);
if (data)
if (*data)
goto err_loopback;

*data = e1000_run_loopback_test(adapter);
Expand Down Expand Up @@ -1751,7 +1762,7 @@ static const struct ethtool_ops e1000_ethtool_ops = {
.get_msglevel = e1000_get_msglevel,
.set_msglevel = e1000_set_msglevel,
.nway_reset = e1000_nway_reset,
.get_link = ethtool_op_get_link,
.get_link = e1000_get_link,
.get_eeprom_len = e1000_get_eeprom_len,
.get_eeprom = e1000_get_eeprom,
.set_eeprom = e1000_set_eeprom,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/e1000e/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ struct e1000_hw {

#ifdef DEBUG
#define hw_dbg(hw, format, arg...) \
printk(KERN_DEBUG, "%s: " format, e1000e_get_hw_dev_name(hw), ##arg);
printk(KERN_DEBUG "%s: " format, e1000e_get_hw_dev_name(hw), ##arg)
#else
static inline int __attribute__ ((format (printf, 2, 3)))
hw_dbg(struct e1000_hw *hw, const char *format, ...)
Expand Down
Loading

0 comments on commit ebb3e82

Please sign in to comment.