Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
843a763d
Commit
843a763d
authored
Sep 22, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge davem@nuts.ninka.net:/disk1/davem/BK/net-2.5
into kernel.bkbits.net:/home/davem/net-2.5
parents
0873a5d6
9ca399c5
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
48 deletions
+64
-48
drivers/atm/he.c
drivers/atm/he.c
+7
-4
drivers/net/Space.c
drivers/net/Space.c
+14
-23
drivers/net/wan/sbni.c
drivers/net/wan/sbni.c
+10
-8
include/linux/rtnetlink.h
include/linux/rtnetlink.h
+22
-10
include/net/atmclip.h
include/net/atmclip.h
+8
-0
net/atm/proc.c
net/atm/proc.c
+0
-2
net/ipv4/ipvs/ip_vs_app.c
net/ipv4/ipvs/ip_vs_app.c
+2
-0
net/ipv4/ipvs/ip_vs_rr.c
net/ipv4/ipvs/ip_vs_rr.c
+1
-1
No files found.
drivers/atm/he.c
View file @
843a763d
...
...
@@ -2860,8 +2860,10 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void *arg)
if
(
!
capable
(
CAP_NET_ADMIN
))
return
-
EPERM
;
copy_from_user
(
&
reg
,
(
struct
he_ioctl_reg
*
)
arg
,
sizeof
(
struct
he_ioctl_reg
));
if
(
copy_from_user
(
&
reg
,
(
struct
he_ioctl_reg
*
)
arg
,
sizeof
(
struct
he_ioctl_reg
)))
return
-
EFAULT
;
spin_lock_irqsave
(
&
he_dev
->
global_lock
,
flags
);
switch
(
reg
.
type
)
{
case
HE_REGTYPE_PCI
:
...
...
@@ -2885,8 +2887,9 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void *arg)
}
spin_unlock_irqrestore
(
&
he_dev
->
global_lock
,
flags
);
if
(
err
==
0
)
copy_to_user
((
struct
he_ioctl_reg
*
)
arg
,
&
reg
,
sizeof
(
struct
he_ioctl_reg
));
if
(
copy_to_user
((
struct
he_ioctl_reg
*
)
arg
,
&
reg
,
sizeof
(
struct
he_ioctl_reg
)))
return
-
EFAULT
;
break
;
default:
#ifdef CONFIG_ATM_HE_USE_SUNI
...
...
drivers/net/Space.c
View file @
843a763d
...
...
@@ -12,19 +12,16 @@
* Donald J. Becker, <becker@scyld.com>
*
* Changelog:
* Stephen Hemminger (09/2003)
* - get rid of pre-linked dev list, dynamic device allocation
* Paul Gortmaker (03/2002)
- struct init cleanup, enable multiple ISA autoprobes.
*
- struct init cleanup, enable multiple ISA autoprobes.
* Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 09/1999
* - fix sbni: s/device/net_device/
* Paul Gortmaker (06/98):
* - sort probes in a sane way, make sure all (safe) probes
* get run once & failed autoprobes don't autoprobe again.
*
* FIXME:
* Phase out placeholder dev entries put in the linked list
* here in favour of drivers using init_etherdev(NULL, ...)
* combined with a single find_all_devs() function (for 2.3)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
...
...
@@ -106,7 +103,7 @@ extern int de620_probe(struct net_device *);
extern
int
iph5526_probe
(
struct
net_device
*
dev
);
/* SBNI adapters */
extern
int
sbni_probe
(
void
);
extern
int
sbni_probe
(
int
unit
);
struct
devprobe
{
...
...
@@ -125,23 +122,15 @@ static int __init probe_list(struct net_device *dev, struct devprobe *plist)
{
struct
devprobe
*
p
=
plist
;
unsigned
long
base_addr
=
dev
->
base_addr
;
int
ret
;
while
(
p
->
probe
!=
NULL
)
{
if
(
base_addr
&&
p
->
probe
(
dev
)
==
0
)
{
/* probe given addr */
ret
=
alloc_divert_blk
(
dev
);
if
(
ret
)
return
ret
;
if
(
base_addr
&&
p
->
probe
(
dev
)
==
0
)
/* probe given addr */
return
0
;
}
else
if
(
p
->
status
==
0
)
{
/* has autoprobe failed yet? */
else
if
(
p
->
status
==
0
)
{
/* has autoprobe failed yet? */
p
->
status
=
p
->
probe
(
dev
);
/* no, try autoprobe */
if
(
p
->
status
==
0
)
{
ret
=
alloc_divert_blk
(
dev
);
if
(
ret
)
return
ret
;
if
(
p
->
status
==
0
)
return
0
;
}
}
p
++
;
}
return
-
ENODEV
;
...
...
@@ -349,7 +338,7 @@ static struct devprobe mips_probes[] __initdata = {
* per bus interface. This drives the legacy devices only for now.
*/
static
int
__init
ethif_probe
(
void
)
static
int
__init
ethif_probe
(
int
unit
)
{
struct
net_device
*
dev
;
int
err
=
-
ENODEV
;
...
...
@@ -358,6 +347,7 @@ static int __init ethif_probe(void)
if
(
!
dev
)
return
-
ENOMEM
;
sprintf
(
dev
->
name
,
"eth%d"
,
unit
);
netdev_boot_setup_check
(
dev
);
/*
...
...
@@ -394,7 +384,7 @@ extern int sk_isa_probe(struct net_device *);
extern
int
proteon_probe
(
struct
net_device
*
);
extern
int
smctr_probe
(
struct
net_device
*
);
static
__init
int
trif_probe
(
void
)
static
__init
int
trif_probe
(
int
unit
)
{
struct
net_device
*
dev
;
int
err
=
-
ENODEV
;
...
...
@@ -403,6 +393,7 @@ static __init int trif_probe(void)
if
(
!
dev
)
return
-
ENOMEM
;
sprintf
(
dev
->
name
,
"tr%d"
,
unit
);
netdev_boot_setup_check
(
dev
);
if
(
#ifdef CONFIG_IBMTR
...
...
@@ -446,16 +437,16 @@ void __init probe_old_netdevs(void)
#ifdef CONFIG_SBNI
for
(
num
=
0
;
num
<
8
;
++
num
)
if
(
sbni_probe
())
if
(
sbni_probe
(
num
))
break
;
#endif
#ifdef CONFIG_TR
for
(
num
=
0
;
num
<
8
;
++
num
)
if
(
trif_probe
())
if
(
trif_probe
(
num
))
break
;
#endif
for
(
num
=
0
;
num
<
8
;
++
num
)
if
(
ethif_probe
())
if
(
ethif_probe
(
num
))
break
;
#ifdef CONFIG_COPS
cops_probe
(
0
);
...
...
drivers/net/wan/sbni.c
View file @
843a763d
...
...
@@ -221,24 +221,26 @@ static void __init sbni_devsetup(struct net_device *dev)
SET_MODULE_OWNER
(
dev
);
}
int
__init
sbni_probe
(
void
)
int
__init
sbni_probe
(
int
unit
)
{
struct
net_device
*
dev
;
static
unsigned
version_printed
__initdata
=
0
;
int
err
;
if
(
version_printed
++
==
0
)
printk
(
KERN_INFO
"%s"
,
version
);
dev
=
alloc_netdev
(
sizeof
(
struct
net_local
),
"sbni%d"
,
sbni_devsetup
);
dev
=
alloc_netdev
(
sizeof
(
struct
net_local
),
"sbni"
,
sbni_devsetup
);
if
(
!
dev
)
return
-
ENOMEM
;
sprintf
(
dev
->
name
,
"sbni%d"
,
unit
);
netdev_boot_setup_check
(
dev
);
if
(
register_netdev
(
dev
))
{
kfree
(
dev
);
return
-
ENODEV
;
err
=
register_netdev
(
dev
);
if
(
err
)
{
free_netdev
(
dev
);
return
err
;
}
if
(
version_printed
++
==
0
)
printk
(
KERN_INFO
"%s"
,
version
);
return
0
;
}
...
...
include/linux/rtnetlink.h
View file @
843a763d
...
...
@@ -618,7 +618,7 @@ enum
#include <linux/config.h>
static
__inline__
int
rtattr_strcmp
(
struct
rtattr
*
rta
,
char
*
str
)
static
__inline__
int
rtattr_strcmp
(
const
struct
rtattr
*
rta
,
const
char
*
str
)
{
int
len
=
strlen
(
str
)
+
1
;
return
len
>
rta
->
rta_len
||
memcmp
(
RTA_DATA
(
rta
),
str
,
len
);
...
...
@@ -642,7 +642,8 @@ extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics);
extern
void
__rta_fill
(
struct
sk_buff
*
skb
,
int
attrtype
,
int
attrlen
,
const
void
*
data
);
#define RTA_PUT(skb, attrtype, attrlen, data) \
({ if (skb_tailroom(skb) < (int)RTA_SPACE(attrlen)) goto rtattr_failure; \
({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
goto rtattr_failure; \
__rta_fill(skb, attrtype, attrlen, data); })
static
inline
struct
rtattr
*
...
...
@@ -658,7 +659,8 @@ __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen)
}
#define __RTA_PUT(skb, attrtype, attrlen) \
({ if (skb_tailroom(skb) < (int)RTA_SPACE(attrlen)) goto rtattr_failure; \
({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
goto rtattr_failure; \
__rta_reserve(skb, attrtype, attrlen); })
extern
void
rtmsg_ifinfo
(
int
type
,
struct
net_device
*
dev
,
unsigned
change
);
...
...
@@ -681,11 +683,21 @@ extern void rtnl_lock(void);
extern
void
rtnl_unlock
(
void
);
extern
void
rtnetlink_init
(
void
);
#define ASSERT_RTNL() do { if (down_trylock(&rtnl_sem) == 0) { up(&rtnl_sem); \
printk("RTNL: assertion failed at " __FILE__ "(%d)\n", __LINE__); } \
} while(0)
#define BUG_TRAP(x) if (!(x)) { printk("KERNEL: assertion (" #x ") failed at " __FILE__ "(%d)\n", __LINE__); }
#define ASSERT_RTNL() do { \
if (unlikely(down_trylock(&rtnl_sem) == 0)) { \
up(&rtnl_sem); \
printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", \
__FILE__, __LINE__); \
dump_stack(); \
} \
} while(0)
#define BUG_TRAP(x) do { \
if (unlikely(!(x))) { \
printk(KERN_ERR "KERNEL: assertion (%s) failed at %s (%d)\n", \
#x, __FILE__ , __LINE__); \
} \
} while(0)
#endif
/* __KERNEL__ */
...
...
include/net/atmclip.h
View file @
843a763d
...
...
@@ -67,7 +67,15 @@ struct atm_clip_ops {
};
void
atm_clip_ops_set
(
struct
atm_clip_ops
*
);
#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
int
try_atm_clip_ops
(
void
);
#else
static
inline
int
try_atm_clip_ops
(
void
)
{
return
0
;
}
#endif
extern
struct
neigh_table
*
clip_tbl_hook
;
extern
struct
atm_clip_ops
*
atm_clip_ops
;
...
...
net/atm/proc.c
View file @
843a763d
...
...
@@ -32,10 +32,8 @@
#include "common.h"
/* atm_proc_init prototype */
#include "signaling.h"
/* to get sigd - ugly too */
#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
#include <net/atmclip.h>
#include "ipcommon.h"
#endif
#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
#include "lec.h"
...
...
net/ipv4/ipvs/ip_vs_app.c
View file @
843a763d
...
...
@@ -222,6 +222,8 @@ void unregister_ip_vs_app(struct ip_vs_app *app)
ip_vs_app_inc_release
(
inc
);
}
list_del
(
&
app
->
a_list
);
up
(
&
__ip_vs_app_mutex
);
/* decrease the module use count */
...
...
net/ipv4/ipvs/ip_vs_rr.c
View file @
843a763d
...
...
@@ -73,12 +73,12 @@ ip_vs_rr_schedule(struct ip_vs_service *svc, struct iphdr *iph)
continue
;
}
dest
=
list_entry
(
q
,
struct
ip_vs_dest
,
n_list
);
if
(
!
(
dest
->
flags
&
IP_VS_DEST_F_OVERLOAD
)
&&
atomic_read
(
&
dest
->
weight
)
>
0
)
/* HIT */
goto
out
;
q
=
q
->
next
;
}
while
(
q
!=
p
);
write_unlock
(
&
svc
->
sched_lock
);
return
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment