Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
  sysctl: net: call unregister_net_sysctl_table where needed
  Revert: veth: remove unneeded ifname code from veth_newlink()
  smsc95xx: fix reset check
  tg3: Fix failure to enable WoL by default when possible
  networking: inappropriate ioctl operation should return ENOTTY
  amd8111e: trivial typo spelling: Negotitate -> Negotiate
  ipv4: don't spam dmesg with "Using LC-trie" messages
  af_unix: Only allow recv on connected seqpacket sockets.
  mii: add support of pause frames in mii_get_an
  net: ftmac100: fix scheduling while atomic during PHY link status change
  usbnet: Transfer of maintainership
  usbnet: add support for some Huawei modems with cdc-ether ports
  bnx2: cancel timer on device removal
  iwl4965: fix "Received BA when not expected"
  iwlagn: fix "Received BA when not expected"
  dsa/mv88e6131: fix unknown multicast/broadcast forwarding on mv88e6085
  usbnet: Resubmit interrupt URB if device is open
  iwl4965: fix "TX Power requested while scanning"
  iwlegacy: led stay solid on when no traffic
  b43: trivial: update module info about ucode16_mimo firmware
  ...
  • Loading branch information
Linus Torvalds committed May 3, 2011
2 parents adadfe4 + ff53881 commit 5933f2a
Show file tree
Hide file tree
Showing 51 changed files with 338 additions and 134 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6556,7 +6556,7 @@ S: Maintained
F: drivers/usb/host/uhci*

USB "USBNET" DRIVER FRAMEWORK
M: David Brownell <dbrownell@users.sourceforge.net>
M: Oliver Neukum <oneukum@suse.de>
L: netdev@vger.kernel.org
W: http://www.linux-usb.org/usbnet
S: Maintained
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/include/asm/8xx_immap.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ typedef struct fec {
uint fec_addr_low; /* lower 32 bits of station address */
ushort fec_addr_high; /* upper 16 bits of station address */
ushort res1; /* reserved */
uint fec_hash_table_high; /* upper 32-bits of hash table */
uint fec_hash_table_low; /* lower 32-bits of hash table */
uint fec_grp_hash_table_high; /* upper 32-bits of hash table */
uint fec_grp_hash_table_low; /* lower 32-bits of hash table */
uint fec_r_des_start; /* beginning of Rx descriptor ring */
uint fec_x_des_start; /* beginning of Tx descriptor ring */
uint fec_r_buff_size; /* Rx buffer size */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/amd8111e.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ MODULE_DESCRIPTION ("AMD8111 based 10/100 Ethernet Controller. Driver Version "M
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(pci, amd8111e_pci_tbl);
module_param_array(speed_duplex, int, NULL, 0);
MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotitate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex");
MODULE_PARM_DESC(speed_duplex, "Set device speed and duplex modes, 0: Auto Negotiate, 1: 10Mbps Half Duplex, 2: 10Mbps Full Duplex, 3: 100Mbps Half Duplex, 4: 100Mbps Full Duplex");
module_param_array(coalesce, bool, NULL, 0);
MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0: Disable");
module_param_array(dynamic_ipg, bool, NULL, 0);
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/atl1c/atl1c.h
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,9 @@ struct atl1c_adapter {
#define __AT_TESTING 0x0001
#define __AT_RESETTING 0x0002
#define __AT_DOWN 0x0003
u8 work_event;
#define ATL1C_WORK_EVENT_RESET 0x01
#define ATL1C_WORK_EVENT_LINK_CHANGE 0x02
unsigned long work_event;
#define ATL1C_WORK_EVENT_RESET 0
#define ATL1C_WORK_EVENT_LINK_CHANGE 1
u32 msg_enable;

bool have_msi;
Expand Down
14 changes: 5 additions & 9 deletions drivers/net/atl1c/atl1c_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static void atl1c_link_chg_event(struct atl1c_adapter *adapter)
}
}

adapter->work_event |= ATL1C_WORK_EVENT_LINK_CHANGE;
set_bit(ATL1C_WORK_EVENT_LINK_CHANGE, &adapter->work_event);
schedule_work(&adapter->common_task);
}

Expand All @@ -337,20 +337,16 @@ static void atl1c_common_task(struct work_struct *work)
adapter = container_of(work, struct atl1c_adapter, common_task);
netdev = adapter->netdev;

if (adapter->work_event & ATL1C_WORK_EVENT_RESET) {
adapter->work_event &= ~ATL1C_WORK_EVENT_RESET;
if (test_and_clear_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event)) {
netif_device_detach(netdev);
atl1c_down(adapter);
atl1c_up(adapter);
netif_device_attach(netdev);
return;
}

if (adapter->work_event & ATL1C_WORK_EVENT_LINK_CHANGE) {
adapter->work_event &= ~ATL1C_WORK_EVENT_LINK_CHANGE;
if (test_and_clear_bit(ATL1C_WORK_EVENT_LINK_CHANGE,
&adapter->work_event))
atl1c_check_link_status(adapter);
}
return;
}


Expand All @@ -369,7 +365,7 @@ static void atl1c_tx_timeout(struct net_device *netdev)
struct atl1c_adapter *adapter = netdev_priv(netdev);

/* Do the reset outside of interrupt context */
adapter->work_event |= ATL1C_WORK_EVENT_RESET;
set_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event);
schedule_work(&adapter->common_task);
}

Expand Down
1 change: 1 addition & 0 deletions drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,7 @@ static void be_worker(struct work_struct *work)
be_detect_dump_ue(adapter);

reschedule:
adapter->work_counter++;
schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000));
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -8413,6 +8413,8 @@ bnx2_remove_one(struct pci_dev *pdev)

unregister_netdev(dev);

del_timer_sync(&bp->timer);

if (bp->mips_firmware)
release_firmware(bp->mips_firmware);
if (bp->rv2p_firmware)
Expand Down
34 changes: 24 additions & 10 deletions drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2019,15 +2019,23 @@ static inline void bnx2x_set_pbd_gso(struct sk_buff *skb,
static inline u8 bnx2x_set_pbd_csum_e2(struct bnx2x *bp, struct sk_buff *skb,
u32 *parsing_data, u32 xmit_type)
{
*parsing_data |= ((tcp_hdrlen(skb)/4) <<
ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT) &
ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW;
*parsing_data |=
((((u8 *)skb_transport_header(skb) - skb->data) >> 1) <<
ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT) &
ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W;

*parsing_data |= ((((u8 *)tcp_hdr(skb) - skb->data) / 2) <<
ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W_SHIFT) &
ETH_TX_PARSE_BD_E2_TCP_HDR_START_OFFSET_W;
if (xmit_type & XMIT_CSUM_TCP) {
*parsing_data |= ((tcp_hdrlen(skb) / 4) <<
ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW_SHIFT) &
ETH_TX_PARSE_BD_E2_TCP_HDR_LENGTH_DW;

return skb_transport_header(skb) + tcp_hdrlen(skb) - skb->data;
return skb_transport_header(skb) + tcp_hdrlen(skb) - skb->data;
} else
/* We support checksum offload for TCP and UDP only.
* No need to pass the UDP header length - it's a constant.
*/
return skb_transport_header(skb) +
sizeof(struct udphdr) - skb->data;
}

/**
Expand All @@ -2043,17 +2051,23 @@ static inline u8 bnx2x_set_pbd_csum(struct bnx2x *bp, struct sk_buff *skb,
struct eth_tx_parse_bd_e1x *pbd,
u32 xmit_type)
{
u8 hlen = (skb_network_header(skb) - skb->data) / 2;
u8 hlen = (skb_network_header(skb) - skb->data) >> 1;

/* for now NS flag is not used in Linux */
pbd->global_data =
(hlen | ((skb->protocol == cpu_to_be16(ETH_P_8021Q)) <<
ETH_TX_PARSE_BD_E1X_LLC_SNAP_EN_SHIFT));

pbd->ip_hlen_w = (skb_transport_header(skb) -
skb_network_header(skb)) / 2;
skb_network_header(skb)) >> 1;

hlen += pbd->ip_hlen_w + tcp_hdrlen(skb) / 2;
hlen += pbd->ip_hlen_w;

/* We support checksum offload for TCP and UDP only */
if (xmit_type & XMIT_CSUM_TCP)
hlen += tcp_hdrlen(skb) / 2;
else
hlen += sizeof(struct udphdr) / 2;

pbd->total_hlen_w = cpu_to_le16(hlen);
hlen = hlen*2;
Expand Down
7 changes: 5 additions & 2 deletions drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,8 +1482,11 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best,

static int agg_device_up(const struct aggregator *agg)
{
return (netif_running(agg->slave->dev) &&
netif_carrier_ok(agg->slave->dev));
struct port *port = agg->lag_ports;
if (!port)
return 0;
return (netif_running(port->slave->dev) &&
netif_carrier_ok(port->slave->dev));
}

/**
Expand Down
9 changes: 6 additions & 3 deletions drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3040,11 +3040,14 @@ static void ehea_rereg_mrs(void)

if (dev->flags & IFF_UP) {
mutex_lock(&port->port_lock);
port_napi_enable(port);
ret = ehea_restart_qps(dev);
check_sqs(port);
if (!ret)
if (!ret) {
check_sqs(port);
port_napi_enable(port);
netif_wake_queue(dev);
} else {
netdev_err(dev, "Unable to restart QPS\n");
}
mutex_unlock(&port->port_lock);
}
}
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/fs_enet/mac-fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ static void set_multicast_finish(struct net_device *dev)
}

FC(fecp, r_cntrl, FEC_RCNTRL_PROM);
FW(fecp, hash_table_high, fep->fec.hthi);
FW(fecp, hash_table_low, fep->fec.htlo);
FW(fecp, grp_hash_table_high, fep->fec.hthi);
FW(fecp, grp_hash_table_low, fep->fec.htlo);
}

static void set_multicast_list(struct net_device *dev)
Expand Down Expand Up @@ -273,8 +273,8 @@ static void restart(struct net_device *dev)
/*
* Reset all multicast.
*/
FW(fecp, hash_table_high, fep->fec.hthi);
FW(fecp, hash_table_low, fep->fec.htlo);
FW(fecp, grp_hash_table_high, fep->fec.hthi);
FW(fecp, grp_hash_table_low, fep->fec.htlo);

/*
* Set maximum receive buffer size.
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/ftmac100.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ static int ftmac100_reset(struct ftmac100 *priv)
* that hardware reset completed (what the f*ck).
* We still need to wait for a while.
*/
usleep_range(500, 1000);
udelay(500);
return 0;
}

usleep_range(1000, 10000);
udelay(1000);
}

netdev_err(netdev, "software reset failed\n");
Expand Down Expand Up @@ -772,7 +772,7 @@ static int ftmac100_mdio_read(struct net_device *netdev, int phy_id, int reg)
if ((phycr & FTMAC100_PHYCR_MIIRD) == 0)
return phycr & FTMAC100_PHYCR_MIIRDATA;

usleep_range(100, 1000);
udelay(100);
}

netdev_err(netdev, "mdio read timed out\n");
Expand Down Expand Up @@ -801,7 +801,7 @@ static void ftmac100_mdio_write(struct net_device *netdev, int phy_id, int reg,
if ((phycr & FTMAC100_PHYCR_MIIWR) == 0)
return;

usleep_range(100, 1000);
udelay(100);
}

netdev_err(netdev, "mdio write timed out\n");
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/mii.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ static u32 mii_get_an(struct mii_if_info *mii, u16 addr)
result |= ADVERTISED_100baseT_Half;
if (advert & ADVERTISE_100FULL)
result |= ADVERTISED_100baseT_Full;
if (advert & ADVERTISE_PAUSE_CAP)
result |= ADVERTISED_Pause;
if (advert & ADVERTISE_PAUSE_ASYM)
result |= ADVERTISED_Asym_Pause;

return result;
}
Expand Down
8 changes: 8 additions & 0 deletions drivers/net/netconsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ static int netconsole_netdev_event(struct notifier_block *this,
goto done;

spin_lock_irqsave(&target_list_lock, flags);
restart:
list_for_each_entry(nt, &target_list, list) {
netconsole_target_get(nt);
if (nt->np.dev == dev) {
Expand All @@ -683,9 +684,16 @@ static int netconsole_netdev_event(struct notifier_block *this,
* rtnl_lock already held
*/
if (nt->np.dev) {
spin_unlock_irqrestore(
&target_list_lock,
flags);
__netpoll_cleanup(&nt->np);
spin_lock_irqsave(&target_list_lock,
flags);
dev_put(nt->np.dev);
nt->np.dev = NULL;
netconsole_target_put(nt);
goto restart;
}
/* Fall through */
case NETDEV_GOING_DOWN:
Expand Down
Loading

0 comments on commit 5933f2a

Please sign in to comment.