Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104954
b: refs/heads/master
c: 380bab1
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jul 23, 2008
1 parent d71dafa commit 23ce155
Show file tree
Hide file tree
Showing 30 changed files with 136 additions and 150 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6f8aa8586dabe605454f3c98a5c1a577c3e0cfb
refs/heads/master: 380bab10de09c22c813ae83f8e148f5a46c1de40
5 changes: 2 additions & 3 deletions trunk/drivers/net/au1000_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,9 +911,8 @@ au1000_adjust_link(struct net_device *dev)
if(phydev->link != aup->old_link) {
// link state changed

if (phydev->link) // link went up
netif_tx_schedule_all(dev);
else { // link went down
if (!phydev->link) {
/* link went down */
aup->old_speed = 0;
aup->old_duplex = -1;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/bfin_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ static void bfin_mac_adjust_link(struct net_device *dev)
if (!lp->old_link) {
new_state = 1;
lp->old_link = 1;
netif_tx_schedule_all(dev);
}
} else if (lp->old_link) {
new_state = 1;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5041,6 +5041,7 @@ static int bond_check_params(struct bond_params *params)
}

static struct lock_class_key bonding_netdev_xmit_lock_key;
static struct lock_class_key bonding_netdev_addr_lock_key;

static void bond_set_lockdep_class_one(struct net_device *dev,
struct netdev_queue *txq,
Expand All @@ -5052,6 +5053,8 @@ static void bond_set_lockdep_class_one(struct net_device *dev,

static void bond_set_lockdep_class(struct net_device *dev)
{
lockdep_set_class(&dev->addr_list_lock,
&bonding_netdev_addr_lock_key);
netdev_for_each_tx_queue(dev, bond_set_lockdep_class_one, NULL);
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/cpmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,10 +945,8 @@ static void cpmac_adjust_link(struct net_device *dev)
if (!priv->oldlink) {
new_state = 1;
priv->oldlink = 1;
netif_tx_schedule_all(dev);
}
} else if (priv->oldlink) {
netif_tx_stop_all_queues(dev);
new_state = 1;
priv->oldlink = 0;
priv->oldspeed = 0;
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/net/fec_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,13 @@ static void mpc52xx_fec_adjust_link(struct net_device *dev)
if (priv->link == PHY_DOWN) {
new_state = 1;
priv->link = phydev->link;
netif_tx_schedule_all(dev);
netif_carrier_on(dev);
netif_start_queue(dev);
}

} else if (priv->link) {
new_state = 1;
priv->link = PHY_DOWN;
priv->speed = 0;
priv->duplex = -1;
netif_stop_queue(dev);
netif_carrier_off(dev);
}

if (new_state && netif_msg_link(priv))
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/net/fs_enet/fs_enet-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,9 +738,6 @@ static void generic_adjust_link(struct net_device *dev)
if (!fep->oldlink) {
new_state = 1;
fep->oldlink = 1;
netif_tx_schedule_all(dev);
netif_carrier_on(dev);
netif_start_queue(dev);
}

if (new_state)
Expand All @@ -750,8 +747,6 @@ static void generic_adjust_link(struct net_device *dev)
fep->oldlink = 0;
fep->oldspeed = 0;
fep->oldduplex = -1;
netif_carrier_off(dev);
netif_stop_queue(dev);
}

if (new_state && netif_msg_link(fep))
Expand Down Expand Up @@ -826,6 +821,8 @@ static int fs_enet_open(struct net_device *dev)
}
phy_start(fep->phydev);

netif_start_queue(dev);

return 0;
}

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/hamradio/bpqether.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ static LIST_HEAD(bpq_devices);
* off into a separate class since they always nest.
*/
static struct lock_class_key bpq_netdev_xmit_lock_key;
static struct lock_class_key bpq_netdev_addr_lock_key;

static void bpq_set_lockdep_class_one(struct net_device *dev,
struct netdev_queue *txq,
Expand All @@ -133,6 +134,7 @@ static void bpq_set_lockdep_class_one(struct net_device *dev,

static void bpq_set_lockdep_class(struct net_device *dev)
{
lockdep_set_class(&dev->addr_list_lock, &bpq_netdev_addr_lock_key);
netdev_for_each_tx_queue(dev, bpq_set_lockdep_class_one, NULL);
}

Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ static void macb_handle_link_change(struct net_device *dev)
}

if (phydev->link != bp->link) {
if (phydev->link)
netif_tx_schedule_all(dev);
else {
if (!phydev->link) {
bp->speed = 0;
bp->duplex = -1;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ static int macvlan_change_mtu(struct net_device *dev, int new_mtu)
* separate class since they always nest.
*/
static struct lock_class_key macvlan_netdev_xmit_lock_key;
static struct lock_class_key macvlan_netdev_addr_lock_key;

#define MACVLAN_FEATURES \
(NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \
Expand All @@ -295,6 +296,8 @@ static void macvlan_set_lockdep_class_one(struct net_device *dev,

static void macvlan_set_lockdep_class(struct net_device *dev)
{
lockdep_set_class(&dev->addr_list_lock,
&macvlan_netdev_addr_lock_key);
netdev_for_each_tx_queue(dev, macvlan_set_lockdep_class_one, NULL);
}

Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/net/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,17 +642,12 @@ static void sh_eth_adjust_link(struct net_device *ndev)
| ECMR_DM, ioaddr + ECMR);
new_state = 1;
mdp->link = phydev->link;
netif_tx_schedule_all(ndev);
netif_carrier_on(ndev);
netif_start_queue(ndev);
}
} else if (mdp->link) {
new_state = 1;
mdp->link = PHY_DOWN;
mdp->speed = 0;
mdp->duplex = -1;
netif_stop_queue(ndev);
netif_carrier_off(ndev);
}

if (new_state)
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/tc35815.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ static void tc_handle_link_change(struct net_device *dev)
if (dev->flags & IFF_PROMISC)
tc35815_set_multicast_list(dev);
#endif
netif_tx_schedule_all(dev);
} else {
lp->speed = 0;
lp->duplex = -1;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/hostap/hostap_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3101,6 +3101,7 @@ static void prism2_clear_set_tim_queue(local_info_t *local)
* This is a natural nesting, which needs a split lock type.
*/
static struct lock_class_key hostap_netdev_xmit_lock_key;
static struct lock_class_key hostap_netdev_addr_lock_key;

static void prism2_set_lockdep_class_one(struct net_device *dev,
struct netdev_queue *txq,
Expand All @@ -3112,6 +3113,8 @@ static void prism2_set_lockdep_class_one(struct net_device *dev,

static void prism2_set_lockdep_class(struct net_device *dev)
{
lockdep_set_class(&dev->addr_list_lock,
&hostap_netdev_addr_lock_key);
netdev_for_each_tx_queue(dev, prism2_set_lockdep_class_one, NULL);
}

Expand Down
11 changes: 5 additions & 6 deletions trunk/fs/proc/proc_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
#include "internal.h"


static struct net *get_proc_net(const struct inode *inode)
{
return maybe_get_net(PDE_NET(PDE(inode)));
}

int seq_open_net(struct inode *ino, struct file *f,
const struct seq_operations *ops, int size)
{
Expand Down Expand Up @@ -185,12 +190,6 @@ void proc_net_remove(struct net *net, const char *name)
}
EXPORT_SYMBOL_GPL(proc_net_remove);

struct net *get_proc_net(const struct inode *inode)
{
return maybe_get_net(PDE_NET(PDE(inode)));
}
EXPORT_SYMBOL_GPL(get_proc_net);

static __net_init int proc_net_ns_init(struct net *net)
{
struct proc_dir_entry *netd, *net_statd;
Expand Down
58 changes: 29 additions & 29 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -996,17 +996,17 @@ static inline void netif_tx_schedule_all(struct net_device *dev)
netif_schedule_queue(netdev_get_tx_queue(dev, i));
}

static inline void netif_tx_start_queue(struct netdev_queue *dev_queue)
{
clear_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
}

/**
* netif_start_queue - allow transmit
* @dev: network device
*
* Allow upper layers to call the device hard_start_xmit routine.
*/
static inline void netif_tx_start_queue(struct netdev_queue *dev_queue)
{
clear_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
}

static inline void netif_start_queue(struct net_device *dev)
{
netif_tx_start_queue(netdev_get_tx_queue(dev, 0));
Expand All @@ -1022,13 +1022,6 @@ static inline void netif_tx_start_all_queues(struct net_device *dev)
}
}

/**
* netif_wake_queue - restart transmit
* @dev: network device
*
* Allow upper layers to call the device hard_start_xmit routine.
* Used for flow control when transmit resources are available.
*/
static inline void netif_tx_wake_queue(struct netdev_queue *dev_queue)
{
#ifdef CONFIG_NETPOLL_TRAP
Expand All @@ -1041,6 +1034,13 @@ static inline void netif_tx_wake_queue(struct netdev_queue *dev_queue)
__netif_schedule(dev_queue->qdisc);
}

/**
* netif_wake_queue - restart transmit
* @dev: network device
*
* Allow upper layers to call the device hard_start_xmit routine.
* Used for flow control when transmit resources are available.
*/
static inline void netif_wake_queue(struct net_device *dev)
{
netif_tx_wake_queue(netdev_get_tx_queue(dev, 0));
Expand All @@ -1056,18 +1056,18 @@ static inline void netif_tx_wake_all_queues(struct net_device *dev)
}
}

static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue)
{
set_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
}

/**
* netif_stop_queue - stop transmitted packets
* @dev: network device
*
* Stop upper layers calling the device hard_start_xmit routine.
* Used for flow control when transmit resources are unavailable.
*/
static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue)
{
set_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
}

static inline void netif_stop_queue(struct net_device *dev)
{
netif_tx_stop_queue(netdev_get_tx_queue(dev, 0));
Expand All @@ -1083,17 +1083,17 @@ static inline void netif_tx_stop_all_queues(struct net_device *dev)
}
}

static inline int netif_tx_queue_stopped(const struct netdev_queue *dev_queue)
{
return test_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
}

/**
* netif_queue_stopped - test if transmit queue is flowblocked
* @dev: network device
*
* Test if transmit queue on device is currently unable to send.
*/
static inline int netif_tx_queue_stopped(const struct netdev_queue *dev_queue)
{
return test_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
}

static inline int netif_queue_stopped(const struct net_device *dev)
{
return netif_tx_queue_stopped(netdev_get_tx_queue(dev, 0));
Expand Down Expand Up @@ -1463,13 +1463,6 @@ static inline void netif_rx_complete(struct net_device *dev,
local_irq_restore(flags);
}

/**
* netif_tx_lock - grab network device transmit lock
* @dev: network device
* @cpu: cpu number of lock owner
*
* Get network device transmit lock
*/
static inline void __netif_tx_lock(struct netdev_queue *txq, int cpu)
{
spin_lock(&txq->_xmit_lock);
Expand All @@ -1482,6 +1475,13 @@ static inline void __netif_tx_lock_bh(struct netdev_queue *txq)
txq->xmit_lock_owner = smp_processor_id();
}

/**
* netif_tx_lock - grab network device transmit lock
* @dev: network device
* @cpu: cpu number of lock owner
*
* Get network device transmit lock
*/
static inline void netif_tx_lock(struct net_device *dev)
{
int cpu = smp_processor_id();
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/proc_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,6 @@ static inline struct net *PDE_NET(struct proc_dir_entry *pde)
return pde->parent->data;
}

struct net *get_proc_net(const struct inode *inode);

struct proc_maps_private {
struct pid *pid;
struct task_struct *task;
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/net/if_inet6.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ struct inet6_dev
struct rcu_head rcu;
};

extern struct ipv6_devconf ipv6_devconf;

static inline void ipv6_eth_mc_map(struct in6_addr *addr, char *buf)
{
/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/ip6_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extern struct rt6_info *rt6_lookup(struct net *net,
extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
struct neighbour *neigh,
const struct in6_addr *addr);
extern int icmp6_dst_gc(int *more);
extern int icmp6_dst_gc(void);

extern void fib6_force_start_gc(struct net *net);

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/netns/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct netns_ipv6 {
#endif
struct rt6_info *ip6_null_entry;
struct rt6_statistics *rt6_stats;
struct timer_list *ip6_fib_timer;
struct timer_list ip6_fib_timer;
struct hlist_head *fib_table_hash;
struct fib6_table *fib6_main_tbl;
struct dst_ops *ip6_dst_ops;
Expand Down
1 change: 0 additions & 1 deletion trunk/include/net/sctp/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,6 @@ void sctp_outq_init(struct sctp_association *, struct sctp_outq *);
void sctp_outq_teardown(struct sctp_outq *);
void sctp_outq_free(struct sctp_outq*);
int sctp_outq_tail(struct sctp_outq *, struct sctp_chunk *chunk);
int sctp_outq_flush(struct sctp_outq *, int);
int sctp_outq_sack(struct sctp_outq *, struct sctp_sackhdr *);
int sctp_outq_is_empty(const struct sctp_outq *);
void sctp_outq_restart(struct sctp_outq *);
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ static void vlan_dev_set_rx_mode(struct net_device *vlan_dev)
* separate class since they always nest.
*/
static struct lock_class_key vlan_netdev_xmit_lock_key;
static struct lock_class_key vlan_netdev_addr_lock_key;

static void vlan_dev_set_lockdep_one(struct net_device *dev,
struct netdev_queue *txq,
Expand All @@ -581,6 +582,9 @@ static void vlan_dev_set_lockdep_one(struct net_device *dev,

static void vlan_dev_set_lockdep_class(struct net_device *dev, int subclass)
{
lockdep_set_class_and_subclass(&dev->addr_list_lock,
&vlan_netdev_addr_lock_key,
subclass);
netdev_for_each_tx_queue(dev, vlan_dev_set_lockdep_one, &subclass);
}

Expand Down
Loading

0 comments on commit 23ce155

Please sign in to comment.