Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352752
b: refs/heads/master
c: 40d1ae5
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Feb 18, 2013
1 parent c413a2e commit bedbee7
Show file tree
Hide file tree
Showing 72 changed files with 239 additions and 268 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: 98d5fac2330779e6eea6431a90b44c7476260dcc
refs/heads/master: 40d1ae57a0eb2ea8196e15cd2d54ffc186497522
4 changes: 2 additions & 2 deletions trunk/drivers/connector/connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ static int cn_init(void)

cn_already_initialized = 1;

proc_net_fops_create(&init_net, "connector", S_IRUGO, &cn_file_ops);
proc_create("connector", S_IRUGO, init_net.proc_net, &cn_file_ops);

return 0;
}
Expand All @@ -287,7 +287,7 @@ static void cn_fini(void)

cn_already_initialized = 0;

proc_net_remove(&init_net, "connector");
remove_proc_entry("connector", init_net.proc_net);

cn_queue_free_dev(dev->cbdev);
netlink_kernel_release(dev->nls);
Expand Down
25 changes: 16 additions & 9 deletions trunk/drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,19 +510,21 @@ static int cpsw_poll(struct napi_struct *napi, int budget)
int num_tx, num_rx;

num_tx = cpdma_chan_process(priv->txch, 128);
num_rx = cpdma_chan_process(priv->rxch, budget);

if (num_rx || num_tx)
cpsw_dbg(priv, intr, "poll %d rx, %d tx pkts\n",
num_rx, num_tx);
if (num_tx)
cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX);

num_rx = cpdma_chan_process(priv->rxch, budget);
if (num_rx < budget) {
napi_complete(napi);
cpsw_intr_enable(priv);
cpdma_ctlr_eoi(priv->dma);
cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX);
cpsw_enable_irq(priv);
}

if (num_rx || num_tx)
cpsw_dbg(priv, intr, "poll %d rx, %d tx pkts\n",
num_rx, num_tx);

return num_rx;
}

Expand Down Expand Up @@ -835,7 +837,8 @@ static int cpsw_ndo_open(struct net_device *ndev)
cpdma_ctlr_start(priv->dma);
cpsw_intr_enable(priv);
napi_enable(&priv->napi);
cpdma_ctlr_eoi(priv->dma);
cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX);
cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX);

if (priv->data.dual_emac)
priv->slaves[priv->emac_port].open_stat = true;
Expand Down Expand Up @@ -1075,7 +1078,9 @@ static void cpsw_ndo_tx_timeout(struct net_device *ndev)
cpdma_chan_start(priv->txch);
cpdma_ctlr_int_ctrl(priv->dma, true);
cpsw_intr_enable(priv);
cpdma_ctlr_eoi(priv->dma);
cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX);
cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX);

}

static struct net_device_stats *cpsw_ndo_get_stats(struct net_device *ndev)
Expand All @@ -1094,7 +1099,9 @@ static void cpsw_ndo_poll_controller(struct net_device *ndev)
cpsw_interrupt(ndev->irq, priv);
cpdma_ctlr_int_ctrl(priv->dma, true);
cpsw_intr_enable(priv);
cpdma_ctlr_eoi(priv->dma);
cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX);
cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX);

}
#endif

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ethernet/ti/davinci_cpdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,9 @@ int cpdma_ctlr_int_ctrl(struct cpdma_ctlr *ctlr, bool enable)
return 0;
}

void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr)
void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr, u32 value)
{
dma_reg_write(ctlr, CPDMA_MACEOIVECTOR, 0);
dma_reg_write(ctlr, CPDMA_MACEOIVECTOR, value);
}

struct cpdma_chan *cpdma_chan_create(struct cpdma_ctlr *ctlr, int chan_num,
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/net/ethernet/ti/davinci_cpdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@

#define CPDMA_RX_SOURCE_PORT(__status__) ((__status__ >> 16) & 0x7)

#define CPDMA_EOI_RX_THRESH 0x0
#define CPDMA_EOI_RX 0x1
#define CPDMA_EOI_TX 0x2
#define CPDMA_EOI_MISC 0x3

struct cpdma_params {
struct device *dev;
void __iomem *dmaregs;
Expand Down Expand Up @@ -88,7 +93,7 @@ int cpdma_chan_submit(struct cpdma_chan *chan, void *token, void *data,
int cpdma_chan_process(struct cpdma_chan *chan, int quota);

int cpdma_ctlr_int_ctrl(struct cpdma_ctlr *ctlr, bool enable);
void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr);
void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr, u32 value);
int cpdma_chan_int_ctrl(struct cpdma_chan *chan, bool enable);
bool cpdma_check_free_tx_desc(struct cpdma_chan *chan);

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/hamradio/bpqether.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ static int bpq_device_event(struct notifier_block *this,unsigned long event, voi
static int __init bpq_init_driver(void)
{
#ifdef CONFIG_PROC_FS
if (!proc_net_fops_create(&init_net, "bpqether", S_IRUGO, &bpq_info_fops)) {
if (!proc_create("bpqether", S_IRUGO, init_net.proc_net,
&bpq_info_fops)) {
printk(KERN_ERR
"bpq: cannot create /proc/net/bpqether entry.\n");
return -ENOENT;
Expand All @@ -610,7 +611,7 @@ static void __exit bpq_cleanup_driver(void)

unregister_netdevice_notifier(&bpq_dev_notifier);

proc_net_remove(&init_net, "bpqether");
remove_proc_entry("bpqether", init_net.proc_net);

rtnl_lock();
while (!list_empty(&bpq_devices)) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/hamradio/scc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,7 @@ static int __init scc_init_driver (void)
}
rtnl_unlock();

proc_net_fops_create(&init_net, "z8530drv", 0, &scc_net_seq_fops);
proc_create("z8530drv", 0, init_net.proc_net, &scc_net_seq_fops);

return 0;
}
Expand Down Expand Up @@ -2173,7 +2173,7 @@ static void __exit scc_cleanup_driver(void)
if (Vector_Latch)
release_region(Vector_Latch, 1);

proc_net_remove(&init_net, "z8530drv");
remove_proc_entry("z8530drv", init_net.proc_net);
}

MODULE_AUTHOR("Joerg Reuter <jreuter@yaina.de>");
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/hamradio/yam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ static int __init yam_init_driver(void)
yam_timer.expires = jiffies + HZ / 100;
add_timer(&yam_timer);

proc_net_fops_create(&init_net, "yam", S_IRUGO, &yam_info_fops);
proc_create("yam", S_IRUGO, init_net.proc_net, &yam_info_fops);
return 0;
error:
while (--i >= 0) {
Expand Down Expand Up @@ -1199,7 +1199,7 @@ static void __exit yam_cleanup_driver(void)
kfree(p);
}

proc_net_remove(&init_net, "yam");
remove_proc_entry("yam", init_net.proc_net);
}

/* --------------------------------------------------------------------- */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ppp/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ static __net_init int pppoe_init_net(struct net *net)

rwlock_init(&pn->hash_lock);

pde = proc_net_fops_create(net, "pppoe", S_IRUGO, &pppoe_seq_fops);
pde = proc_create("pppoe", S_IRUGO, net->proc_net, &pppoe_seq_fops);
#ifdef CONFIG_PROC_FS
if (!pde)
return -ENOMEM;
Expand All @@ -1145,7 +1145,7 @@ static __net_init int pppoe_init_net(struct net *net)

static __net_exit void pppoe_exit_net(struct net *net)
{
proc_net_remove(net, "pppoe");
remove_proc_entry("pppoe", net->proc_net);
}

static struct pernet_operations pppoe_net_ops = {
Expand Down
14 changes: 0 additions & 14 deletions trunk/fs/proc/proc_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,6 @@ const struct file_operations proc_net_operations = {
.readdir = proc_tgid_net_readdir,
};


struct proc_dir_entry *proc_net_fops_create(struct net *net,
const char *name, umode_t mode, const struct file_operations *fops)
{
return proc_create(name, mode, net->proc_net, fops);
}
EXPORT_SYMBOL_GPL(proc_net_fops_create);

void proc_net_remove(struct net *net, const char *name)
{
remove_proc_entry(name, net->proc_net);
}
EXPORT_SYMBOL_GPL(proc_net_remove);

static __net_init int proc_net_ns_init(struct net *net)
{
struct proc_dir_entry *netd, *net_statd;
Expand Down
6 changes: 0 additions & 6 deletions trunk/include/linux/proc_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
return res;
}

extern struct proc_dir_entry *proc_net_fops_create(struct net *net,
const char *name, umode_t mode, const struct file_operations *fops);
extern void proc_net_remove(struct net *net, const char *name);
extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name,
struct proc_dir_entry *parent);

Expand All @@ -184,9 +181,6 @@ extern int proc_alloc_inum(unsigned int *pino);
extern void proc_free_inum(unsigned int inum);
#else

#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; })
static inline void proc_net_remove(struct net *net, const char *name) {}

static inline void proc_flush_task(struct task_struct *task)
{
}
Expand Down
8 changes: 0 additions & 8 deletions trunk/include/uapi/linux/vm_sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@

#define SO_VM_SOCKETS_PEER_HOST_VM_ID 3

/* Option name for socket's service label. Use as the option name in
* setsockopt(3) or getsockopt(3) to set or get the service label for a socket.
* The service label is a C-style NUL-terminated string. Only available for
* hypervisor endpoints.
*/

#define SO_VM_SOCKETS_SERVICE_LABEL 4

/* Option name for determining if a socket is trusted. Use as the option name
* in getsockopt(3) to determine if a socket is trusted. The value is a
* signed integer.
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/8021q/vlanproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void vlan_proc_cleanup(struct net *net)
remove_proc_entry(name_conf, vn->proc_vlan_dir);

if (vn->proc_vlan_dir)
proc_net_remove(net, name_root);
remove_proc_entry(name_root, net->proc_net);

/* Dynamically added entries should be cleaned up as their vlan_device
* is removed, so we should not have to take care of it here...
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/atm/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ static void atm_proc_dirs_remove(void)
if (e->dirent)
remove_proc_entry(e->name, atm_proc_root);
}
proc_net_remove(&init_net, "atm");
remove_proc_entry("atm", init_net.proc_net);
}

int __init atm_proc_init(void)
Expand Down
13 changes: 7 additions & 6 deletions trunk/net/ax25/af_ax25.c
Original file line number Diff line number Diff line change
Expand Up @@ -1992,9 +1992,10 @@ static int __init ax25_init(void)
dev_add_pack(&ax25_packet_type);
register_netdevice_notifier(&ax25_dev_notifier);

proc_net_fops_create(&init_net, "ax25_route", S_IRUGO, &ax25_route_fops);
proc_net_fops_create(&init_net, "ax25", S_IRUGO, &ax25_info_fops);
proc_net_fops_create(&init_net, "ax25_calls", S_IRUGO, &ax25_uid_fops);
proc_create("ax25_route", S_IRUGO, init_net.proc_net,
&ax25_route_fops);
proc_create("ax25", S_IRUGO, init_net.proc_net, &ax25_info_fops);
proc_create("ax25_calls", S_IRUGO, init_net.proc_net, &ax25_uid_fops);
out:
return rc;
}
Expand All @@ -2008,9 +2009,9 @@ MODULE_ALIAS_NETPROTO(PF_AX25);

static void __exit ax25_exit(void)
{
proc_net_remove(&init_net, "ax25_route");
proc_net_remove(&init_net, "ax25");
proc_net_remove(&init_net, "ax25_calls");
remove_proc_entry("ax25_route", init_net.proc_net);
remove_proc_entry("ax25", init_net.proc_net);
remove_proc_entry("ax25_calls", init_net.proc_net);

unregister_netdevice_notifier(&ax25_dev_notifier);

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/bluetooth/af_bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ int bt_procfs_init(struct module* module, struct net *net, const char *name,
sk_list->fops.llseek = seq_lseek;
sk_list->fops.release = seq_release_private;

pde = proc_net_fops_create(net, name, 0, &sk_list->fops);
pde = proc_create(name, 0, net->proc_net, &sk_list->fops);
if (!pde)
return -ENOMEM;

Expand All @@ -652,7 +652,7 @@ int bt_procfs_init(struct module* module, struct net *net, const char *name,

void bt_procfs_cleanup(struct net *net, const char *name)
{
proc_net_remove(net, name);
remove_proc_entry(name, net->proc_net);
}
#else
int bt_procfs_init(struct module* module, struct net *net, const char *name,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/can/bcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ static void __exit bcm_module_exit(void)
can_proto_unregister(&bcm_can_proto);

if (proc_dir)
proc_net_remove(&init_net, "can-bcm");
remove_proc_entry("can-bcm", init_net.proc_net);
}

module_init(bcm_module_init);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/can/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,5 +531,5 @@ void can_remove_proc(void)
can_remove_proc_readentry(CAN_PROC_RCVLIST_SFF);

if (can_dir)
proc_net_remove(&init_net, "can");
remove_proc_entry("can", init_net.proc_net);
}
19 changes: 10 additions & 9 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4518,11 +4518,12 @@ static int __net_init dev_proc_net_init(struct net *net)
{
int rc = -ENOMEM;

if (!proc_net_fops_create(net, "dev", S_IRUGO, &dev_seq_fops))
if (!proc_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops))
goto out;
if (!proc_net_fops_create(net, "softnet_stat", S_IRUGO, &softnet_seq_fops))
if (!proc_create("softnet_stat", S_IRUGO, net->proc_net,
&softnet_seq_fops))
goto out_dev;
if (!proc_net_fops_create(net, "ptype", S_IRUGO, &ptype_seq_fops))
if (!proc_create("ptype", S_IRUGO, net->proc_net, &ptype_seq_fops))
goto out_softnet;

if (wext_proc_init(net))
Expand All @@ -4531,21 +4532,21 @@ static int __net_init dev_proc_net_init(struct net *net)
out:
return rc;
out_ptype:
proc_net_remove(net, "ptype");
remove_proc_entry("ptype", net->proc_net);
out_softnet:
proc_net_remove(net, "softnet_stat");
remove_proc_entry("softnet_stat", net->proc_net);
out_dev:
proc_net_remove(net, "dev");
remove_proc_entry("dev", net->proc_net);
goto out;
}

static void __net_exit dev_proc_net_exit(struct net *net)
{
wext_proc_exit(net);

proc_net_remove(net, "ptype");
proc_net_remove(net, "softnet_stat");
proc_net_remove(net, "dev");
remove_proc_entry("ptype", net->proc_net);
remove_proc_entry("softnet_stat", net->proc_net);
remove_proc_entry("dev", net->proc_net);
}

static struct pernet_operations __net_initdata dev_proc_ops = {
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/core/dev_addr_lists.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,14 +780,14 @@ static const struct file_operations dev_mc_seq_fops = {

static int __net_init dev_mc_net_init(struct net *net)
{
if (!proc_net_fops_create(net, "dev_mcast", 0, &dev_mc_seq_fops))
if (!proc_create("dev_mcast", 0, net->proc_net, &dev_mc_seq_fops))
return -ENOMEM;
return 0;
}

static void __net_exit dev_mc_net_exit(struct net *net)
{
proc_net_remove(net, "dev_mcast");
remove_proc_entry("dev_mcast", net->proc_net);
}

static struct pernet_operations __net_initdata dev_mc_net_ops = {
Expand Down
Loading

0 comments on commit bedbee7

Please sign in to comment.