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
nexedi
linux
Commits
52683c56
Commit
52683c56
authored
Feb 04, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v2.4.7.5 -> v2.4.7.6
- me: better dirty balancing - David Miller: sparc and network updates
parent
a931b32f
Changes
37
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
290 additions
and
248 deletions
+290
-248
MAINTAINERS
MAINTAINERS
+1
-1
arch/sparc/kernel/ebus.c
arch/sparc/kernel/ebus.c
+3
-1
arch/sparc/mm/extable.c
arch/sparc/mm/extable.c
+9
-6
arch/sparc64/defconfig
arch/sparc64/defconfig
+4
-0
arch/sparc64/kernel/ioctl32.c
arch/sparc64/kernel/ioctl32.c
+44
-5
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/smp.c
+19
-6
arch/sparc64/mm/extable.c
arch/sparc64/mm/extable.c
+11
-6
arch/sparc64/mm/init.c
arch/sparc64/mm/init.c
+2
-7
drivers/net/pci-skeleton.c
drivers/net/pci-skeleton.c
+1
-0
drivers/net/sk98lin/skge.c
drivers/net/sk98lin/skge.c
+12
-12
drivers/net/sk98lin/skproc.c
drivers/net/sk98lin/skproc.c
+2
-2
drivers/net/sungem.c
drivers/net/sungem.c
+3
-1
drivers/net/sunhme.h
drivers/net/sunhme.h
+4
-121
drivers/net/tulip/tulip_core.c
drivers/net/tulip/tulip_core.c
+5
-1
drivers/net/tun.c
drivers/net/tun.c
+1
-1
drivers/video/aty/atyfb_base.c
drivers/video/aty/atyfb_base.c
+1
-0
fs/buffer.c
fs/buffer.c
+41
-21
include/asm-sparc/pgtable.h
include/asm-sparc/pgtable.h
+2
-1
include/asm-sparc64/mmu_context.h
include/asm-sparc64/mmu_context.h
+2
-1
include/linux/netdevice.h
include/linux/netdevice.h
+11
-0
include/net/addrconf.h
include/net/addrconf.h
+4
-0
mm/shmem.c
mm/shmem.c
+24
-24
net/core/skbuff.c
net/core/skbuff.c
+2
-2
net/ipv4/af_inet.c
net/ipv4/af_inet.c
+4
-5
net/ipv4/icmp.c
net/ipv4/icmp.c
+8
-7
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+13
-4
net/ipv4/netfilter/ip_conntrack_core.c
net/ipv4/netfilter/ip_conntrack_core.c
+1
-1
net/ipv4/netfilter/ip_nat_proto_tcp.c
net/ipv4/netfilter/ip_nat_proto_tcp.c
+8
-1
net/ipv4/tcp_minisocks.c
net/ipv4/tcp_minisocks.c
+3
-2
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+21
-1
net/ipv6/netfilter/Makefile
net/ipv6/netfilter/Makefile
+1
-1
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6_tables.c
+8
-0
net/netsyms.c
net/netsyms.c
+4
-0
net/packet/af_packet.c
net/packet/af_packet.c
+5
-4
net/sched/cls_route.c
net/sched/cls_route.c
+2
-1
net/sched/cls_u32.c
net/sched/cls_u32.c
+1
-1
net/sched/sch_cbq.c
net/sched/sch_cbq.c
+3
-1
No files found.
MAINTAINERS
View file @
52683c56
...
...
@@ -486,7 +486,7 @@ ETHERNET BRIDGE
P: Lennert Buytenhek
M: buytenh@gnu.org
L: bridge@math.leidenuniv.nl
W: http://
www.math.leidenuniv.nl/~buytenh/bridge
W: http://
bridge.sourceforge.net/
S: Maintained
ETHERTEAM 16I DRIVER
...
...
arch/sparc/kernel/ebus.c
View file @
52683c56
/* $Id: ebus.c,v 1.1
6 2001/02/13 01:16:43
davem Exp $
/* $Id: ebus.c,v 1.1
7 2001/08/06 13:12:57
davem Exp $
* ebus.c: PCI to EBus bridge device.
*
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
...
...
@@ -27,6 +27,7 @@ struct linux_ebus *ebus_chain = 0;
#ifdef CONFIG_SUN_AUXIO
extern
void
auxio_probe
(
void
);
#endif
extern
void
rs_init
(
void
);
/* We are together with pcic.c under CONFIG_PCI. */
extern
unsigned
int
pcic_pin_to_irq
(
unsigned
int
,
char
*
name
);
...
...
@@ -358,6 +359,7 @@ void __init ebus_init(void)
++
num_ebus
;
}
rs_init
();
#ifdef CONFIG_SUN_AUXIO
auxio_probe
();
#endif
...
...
arch/sparc/mm/extable.c
View file @
52683c56
...
...
@@ -46,24 +46,27 @@ search_one_table(const struct exception_table_entry *start,
unsigned
long
search_exception_table
(
unsigned
long
addr
,
unsigned
long
*
g2
)
{
unsigned
long
ret
;
unsigned
long
ret
=
0
,
flags
;
#ifndef CONFIG_MODULES
/* There is only the kernel to search. */
ret
=
search_one_table
(
__start___ex_table
,
__stop___ex_table
-
1
,
addr
,
g2
);
if
(
ret
)
return
ret
;
return
ret
;
#else
/* The kernel is the last "module" -- no need to treat it special. */
struct
module
*
mp
;
spin_lock_irqsave
(
&
modlist_lock
,
flags
);
for
(
mp
=
module_list
;
mp
!=
NULL
;
mp
=
mp
->
next
)
{
if
(
mp
->
ex_table_start
==
NULL
)
if
(
mp
->
ex_table_start
==
NULL
||
!
(
mp
->
flags
&
(
MOD_RUNNING
|
MOD_INITIALIZING
))
)
continue
;
ret
=
search_one_table
(
mp
->
ex_table_start
,
mp
->
ex_table_end
-
1
,
addr
,
g2
);
if
(
ret
)
return
ret
;
if
(
ret
)
break
;
}
spin_unlock_irqrestore
(
&
modlist_lock
,
flags
);
return
ret
;
#endif
return
0
;
}
arch/sparc64/defconfig
View file @
52683c56
...
...
@@ -101,6 +101,8 @@ CONFIG_FB_PM2_PCI=y
# CONFIG_FB_E1355 is not set
# CONFIG_FB_MATROX is not set
CONFIG_FB_ATY=y
# CONFIG_FB_ATY_GX is not set
CONFIG_FB_ATY_CT=y
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_SIS is not set
...
...
@@ -112,6 +114,7 @@ CONFIG_FB_CGSIX=y
# CONFIG_FB_LEO is not set
CONFIG_FB_PCI=y
CONFIG_FB_ATY=y
CONFIG_FB_ATY_CT=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FBCON_ADVANCED is not set
CONFIG_FBCON_CFB8=y
...
...
@@ -407,6 +410,7 @@ CONFIG_TUN=m
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_ARM_AM79C961A is not set
CONFIG_SUNLANCE=y
CONFIG_HAPPYMEAL=y
CONFIG_SUNBMAC=m
...
...
arch/sparc64/kernel/ioctl32.c
View file @
52683c56
/* $Id: ioctl32.c,v 1.1
19 2001/07/21 00:28:25
davem Exp $
/* $Id: ioctl32.c,v 1.1
21 2001/08/03 14:27:21
davem Exp $
* ioctl32.c: Conversion between 32bit and 64bit native ioctls.
*
* Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com)
...
...
@@ -51,9 +51,6 @@
#include <linux/rtc.h>
#include <linux/pci.h>
#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
/* Ugh. This header really is not clean */
#define min min
#define max max
#include <linux/lvm.h>
#endif
/* LVM */
...
...
@@ -73,6 +70,7 @@
#include <asm/envctrl.h>
#include <asm/audioio.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <asm/display7seg.h>
#include <asm/watchdog.h>
#include <asm/module.h>
...
...
@@ -544,7 +542,7 @@ static inline int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long ar
return
err
;
}
static
in
line
in
t
ethtool_ioctl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
static
int
ethtool_ioctl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
ifreq
ifr
;
mm_segment_t
old_fs
;
...
...
@@ -593,6 +591,44 @@ static inline int ethtool_ioctl(unsigned int fd, unsigned int cmd, unsigned long
return
err
;
}
static
int
mii_ioctl
(
unsigned
long
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
ifreq
ifr
;
mm_segment_t
old_fs
;
int
err
;
u32
data
;
if
(
copy_from_user
(
&
ifr
,
(
struct
ifreq32
*
)
arg
,
sizeof
(
struct
ifreq32
)))
return
-
EFAULT
;
ifr
.
ifr_data
=
(
__kernel_caddr_t
)
kmalloc
(
sizeof
(
struct
mii_ioctl_data
),
GFP_KERNEL
);
if
(
!
ifr
.
ifr_data
)
return
-
EAGAIN
;
__get_user
(
data
,
&
(((
struct
ifreq32
*
)
arg
)
->
ifr_ifru
.
ifru_data
));
if
(
copy_from_user
(
ifr
.
ifr_data
,
(
char
*
)
A
(
data
),
sizeof
(
struct
mii_ioctl_data
)))
{
err
=
-
EFAULT
;
goto
out
;
}
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
err
=
sys_ioctl
(
fd
,
cmd
,
(
unsigned
long
)
&
ifr
);
set_fs
(
old_fs
);
if
(
!
err
)
{
if
(
copy_to_user
((
char
*
)
A
(
data
),
ifr
.
ifr_data
,
sizeof
(
struct
mii_ioctl_data
)))
err
=
-
EFAULT
;
}
out:
kfree
(
ifr
.
ifr_data
);
return
err
;
}
static
inline
int
dev_ifsioc
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
ifreq
ifr
;
...
...
@@ -4250,6 +4286,9 @@ HANDLE_IOCTL(SIOCGPPPVER, dev_ifsioc)
HANDLE_IOCTL
(
SIOCGIFTXQLEN
,
dev_ifsioc
)
HANDLE_IOCTL
(
SIOCSIFTXQLEN
,
dev_ifsioc
)
HANDLE_IOCTL
(
SIOCETHTOOL
,
ethtool_ioctl
)
HANDLE_IOCTL
(
SIOCGMIIPHY
,
mii_ioctl
)
HANDLE_IOCTL
(
SIOCGMIIREG
,
mii_ioctl
)
HANDLE_IOCTL
(
SIOCSMIIREG
,
mii_ioctl
)
HANDLE_IOCTL
(
SIOCADDRT
,
routing_ioctl
)
HANDLE_IOCTL
(
SIOCDELRT
,
routing_ioctl
)
/* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
...
...
arch/sparc64/kernel/smp.c
View file @
52683c56
...
...
@@ -604,9 +604,6 @@ void smp_flush_tlb_all(void)
* are flush_tlb_*() routines, and these run after flush_cache_*()
* which performs the flushw.
*
* XXX I diked out the fancy flush avoidance code for the
* XXX swapping cases for now until the new MM code stabilizes. -DaveM
*
* The SMP TLB coherency scheme we use works as follows:
*
* 1) mm->cpu_vm_mask is a bit mask of which cpus an address
...
...
@@ -642,10 +639,20 @@ void smp_flush_tlb_all(void)
* call won't even show up on the performance radar. But in any case we do get
* rid of the cross-call when the task has a dead context or the task has only
* ever run on the local cpu.
*
* 4) If the mm never had a valid context yet, there is nothing to
* flush. CTX_NEVER_WAS_VALID checks this.
*
* This check used to be done with CTX_VALID(), but Kanoj Sarcar has
* pointed out that this is an invalid optimization. It can cause
* stale translations to be left in the TLB.
*/
void
smp_flush_tlb_mm
(
struct
mm_struct
*
mm
)
{
if
(
CTX_VALID
(
mm
->
context
))
{
if
(
CTX_NEVER_WAS_VALID
(
mm
->
context
))
return
;
{
u32
ctx
=
CTX_HWBITS
(
mm
->
context
);
int
cpu
=
smp_processor_id
();
...
...
@@ -665,7 +672,10 @@ void smp_flush_tlb_mm(struct mm_struct *mm)
void
smp_flush_tlb_range
(
struct
mm_struct
*
mm
,
unsigned
long
start
,
unsigned
long
end
)
{
if
(
CTX_VALID
(
mm
->
context
))
{
if
(
CTX_NEVER_WAS_VALID
(
mm
->
context
))
return
;
{
u32
ctx
=
CTX_HWBITS
(
mm
->
context
);
int
cpu
=
smp_processor_id
();
...
...
@@ -686,7 +696,10 @@ void smp_flush_tlb_range(struct mm_struct *mm, unsigned long start,
void
smp_flush_tlb_page
(
struct
mm_struct
*
mm
,
unsigned
long
page
)
{
if
(
CTX_VALID
(
mm
->
context
))
{
if
(
CTX_NEVER_WAS_VALID
(
mm
->
context
))
return
;
{
u32
ctx
=
CTX_HWBITS
(
mm
->
context
);
int
cpu
=
smp_processor_id
();
...
...
arch/sparc64/mm/extable.c
View file @
52683c56
...
...
@@ -43,27 +43,32 @@ search_one_table(const struct exception_table_entry *start,
return
0
;
}
extern
spinlock_t
modlist_lock
;
unsigned
long
search_exception_table
(
unsigned
long
addr
,
unsigned
long
*
g2
)
{
unsigned
long
ret
;
unsigned
long
ret
=
0
,
flags
;
#ifndef CONFIG_MODULES
/* There is only the kernel to search. */
ret
=
search_one_table
(
__start___ex_table
,
__stop___ex_table
-
1
,
addr
,
g2
);
if
(
ret
)
return
ret
;
return
ret
;
#else
/* The kernel is the last "module" -- no need to treat it special. */
struct
module
*
mp
;
spin_lock_irqsave
(
&
modlist_lock
,
flags
);
for
(
mp
=
module_list
;
mp
!=
NULL
;
mp
=
mp
->
next
)
{
if
(
mp
->
ex_table_start
==
NULL
)
if
(
mp
->
ex_table_start
==
NULL
||
!
(
mp
->
flags
&
(
MOD_RUNNING
|
MOD_INITIALIZING
))
)
continue
;
ret
=
search_one_table
(
mp
->
ex_table_start
,
mp
->
ex_table_end
-
1
,
addr
,
g2
);
if
(
ret
)
return
ret
;
if
(
ret
)
break
;
}
spin_unlock_irqrestore
(
&
modlist_lock
,
flags
);
return
ret
;
#endif
return
0
;
}
arch/sparc64/mm/init.c
View file @
52683c56
/* $Id: init.c,v 1.17
6 2001/05/16 15:07:11
davem Exp $
/* $Id: init.c,v 1.17
8 2001/08/06 13:09:00
davem Exp $
* arch/sparc64/mm/init.c
*
* Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu)
...
...
@@ -833,6 +833,7 @@ void __flush_tlb_all(void)
}
/* Caller does TLB context flushing on local CPU if necessary.
* The caller also ensures that CTX_VALID(mm->context) is false.
*
* We must be careful about boundary cases so that we never
* let the user have CTX 0 (nucleus) or we ever use a CTX
...
...
@@ -845,12 +846,6 @@ void get_new_mmu_context(struct mm_struct *mm)
spin_lock
(
&
ctx_alloc_lock
);
ctx
=
CTX_HWBITS
(
tlb_context_cache
+
1
);
if
(
ctx
==
0
)
ctx
=
1
;
if
(
CTX_VALID
(
mm
->
context
))
{
unsigned
long
nr
=
CTX_HWBITS
(
mm
->
context
);
mmu_context_bmap
[
nr
>>
6
]
&=
~
(
1UL
<<
(
nr
&
63
));
}
new_ctx
=
find_next_zero_bit
(
mmu_context_bmap
,
1UL
<<
CTX_VERSION_SHIFT
,
ctx
);
if
(
new_ctx
>=
(
1UL
<<
CTX_VERSION_SHIFT
))
{
new_ctx
=
find_next_zero_bit
(
mmu_context_bmap
,
ctx
,
1
);
...
...
drivers/net/pci-skeleton.c
View file @
52683c56
...
...
@@ -94,6 +94,7 @@ IVc. Errata
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <asm/io.h>
...
...
drivers/net/sk98lin/skge.c
View file @
52683c56
...
...
@@ -368,7 +368,7 @@ static void DumpLong(char*, int);
/* global variables *********************************************************/
static
const
char
*
BootString
=
BOOT_STRING
;
st
atic
struct
net_device
*
root_dev
=
NULL
;
st
ruct
net_device
*
sk98lin_
root_dev
=
NULL
;
static
int
probed
__initdata
=
0
;
struct
inode_operations
SkInodeOps
;
//static struct file_operations SkFileOps; /* with open/relase */
...
...
@@ -685,7 +685,7 @@ static int options[SK_MAX_CARD_PARAM] = {0, }; /* not used */
static
int
__init
skge_init_module
(
void
)
{
int
cards
;
root_dev
=
NULL
;
sk98lin_
root_dev
=
NULL
;
/* just to avoid warnings ... */
debug
=
0
;
...
...
@@ -717,12 +717,12 @@ struct net_device *next;
unsigned
long
Flags
;
SK_EVPARA
EvPara
;
while
(
root_dev
)
{
pNet
=
(
DEV_NET
*
)
root_dev
->
priv
;
while
(
sk98lin_
root_dev
)
{
pNet
=
(
DEV_NET
*
)
sk98lin_
root_dev
->
priv
;
pAC
=
pNet
->
pAC
;
next
=
pAC
->
Next
;
netif_stop_queue
(
root_dev
);
netif_stop_queue
(
sk98lin_
root_dev
);
SkGeYellowLED
(
pAC
,
pAC
->
IoBase
,
0
);
if
(
pAC
->
BoardLevel
==
2
)
{
...
...
@@ -754,17 +754,17 @@ SK_EVPARA EvPara;
kfree
(
pAC
->
dev
[
1
]);
}
FreeResources
(
root_dev
);
FreeResources
(
sk98lin_
root_dev
);
root_dev
->
get_stats
=
NULL
;
sk98lin_
root_dev
->
get_stats
=
NULL
;
/*
* otherwise unregister_netdev calls get_stats with
* invalid IO ... :-(
*/
unregister_netdev
(
root_dev
);
kfree
(
root_dev
);
unregister_netdev
(
sk98lin_
root_dev
);
kfree
(
sk98lin_
root_dev
);
kfree
(
pAC
);
root_dev
=
next
;
sk98lin_
root_dev
=
next
;
}
/* clear proc-dir */
...
...
@@ -911,8 +911,8 @@ int Ret; /* return code of request_irq */
/*
* Register the device here
*/
pAC
->
Next
=
root_dev
;
root_dev
=
dev
;
pAC
->
Next
=
sk98lin_
root_dev
;
sk98lin_
root_dev
=
dev
;
return
(
0
);
}
/* SkGeBoardInit */
...
...
drivers/net/sk98lin/skproc.c
View file @
52683c56
...
...
@@ -65,7 +65,7 @@ int proc_read(char *buffer,
void
*
data
);
static
const
char
SK_Root_Dir_entry
[]
=
"sk98lin"
;
extern
struct
net_device
*
root_dev
;
extern
struct
net_device
*
sk98lin_
root_dev
;
struct
proc_dir_entry
pSkRootDir
=
{
...
...
@@ -106,7 +106,7 @@ void *data)
unsigned
long
Flags
;
unsigned
int
Size
;
struct
net_device
*
next
;
struct
net_device
*
SkgeProcDev
=
root_dev
;
struct
net_device
*
SkgeProcDev
=
sk98lin_
root_dev
;
SK_PNMI_STRUCT_DATA
*
pPnmiStruct
;
SK_PNMI_STAT
*
pPnmiStat
;
...
...
drivers/net/sungem.c
View file @
52683c56
/* $Id: sungem.c,v 1.1
7 2001/06/17 09:22:46 jgarzik
Exp $
/* $Id: sungem.c,v 1.1
8 2001/08/06 13:34:47 davem
Exp $
* sungem.c: Sun GEM ethernet driver.
*
* Copyright (C) 2000, 2001 David S. Miller (davem@redhat.com)
...
...
@@ -1576,8 +1576,10 @@ static int __devinit gem_check_invariants(struct gem *gp)
static
int
__devinit
gem_get_device_address
(
struct
gem
*
gp
)
{
#if defined(__sparc__) || defined(__powerpc__)
struct
net_device
*
dev
=
gp
->
dev
;
struct
pci_dev
*
pdev
=
gp
->
pdev
;
#endif
#ifdef __sparc__
struct
pcidev_cookie
*
pcp
=
pdev
->
sysdata
;
...
...
drivers/net/sunhme.h
View file @
52683c56
/* $Id: sunhme.h,v 1.3
2 2000/12/13 18:31:47
davem Exp $
/* $Id: sunhme.h,v 1.3
3 2001/08/03 06:23:04
davem Exp $
* sunhme.h: Definitions for Sparc HME/BigMac 10/100baseT ethernet driver.
* Also known as the "Happy Meal".
*
...
...
@@ -276,92 +276,10 @@
* Debugging eeprom burnt code is more fun than programming this chip!
*/
/* First, the DP83840 register numbers. */
#define DP83840_BMCR 0x00
/* Basic mode control register */
#define DP83840_BMSR 0x01
/* Basic mode status register */
#define DP83840_PHYSID1 0x02
/* PHYS ID 1 */
#define DP83840_PHYSID2 0x03
/* PHYS ID 2 */
#define DP83840_ADVERTISE 0x04
/* Advertisement control reg */
#define DP83840_LPA 0x05
/* Link partner ability reg */
#define DP83840_EXPANSION 0x06
/* Expansion register */
#define DP83840_DCOUNTER 0x12
/* Disconnect counter */
#define DP83840_FCSCOUNTER 0x13
/* False carrier counter */
#define DP83840_NWAYTEST 0x14
/* N-way auto-neg test reg */
#define DP83840_RERRCOUNTER 0x15
/* Receive error counter */
#define DP83840_SREVISION 0x16
/* Silicon revision */
/* Generic MII registers defined in linux/mii.h, these below
* are DP83840 specific.
*/
#define DP83840_CSCONFIG 0x17
/* CS configuration */
#define DP83840_LBRERROR 0x18
/* Lpback, rx, bypass error */
#define DP83840_PHYADDR 0x19
/* PHY address */
#define DP83840_RESERVED 0x1a
/* Unused... */
#define DP83840_TPISTATUS 0x1b
/* TPI status for 10mbps */
#define DP83840_NCONFIG 0x1c
/* Network interface config */
/* Basic mode control register. */
#define BMCR_RESV 0x007f
/* Unused... */
#define BMCR_CTST 0x0080
/* Collision test */
#define BMCR_FULLDPLX 0x0100
/* Full duplex */
#define BMCR_ANRESTART 0x0200
/* Auto negotiation restart */
#define BMCR_ISOLATE 0x0400
/* Disconnect DP83840 from MII */
#define BMCR_PDOWN 0x0800
/* Powerdown the DP83840 */
#define BMCR_ANENABLE 0x1000
/* Enable auto negotiation */
#define BMCR_SPEED100 0x2000
/* Select 100Mbps */
#define BMCR_LOOPBACK 0x4000
/* TXD loopback bits */
#define BMCR_RESET 0x8000
/* Reset the DP83840 */
/* Basic mode status register. */
#define BMSR_ERCAP 0x0001
/* Ext-reg capability */
#define BMSR_JCD 0x0002
/* Jabber detected */
#define BMSR_LSTATUS 0x0004
/* Link status */
#define BMSR_ANEGCAPABLE 0x0008
/* Able to do auto-negotiation */
#define BMSR_RFAULT 0x0010
/* Remote fault detected */
#define BMSR_ANEGCOMPLETE 0x0020
/* Auto-negotiation complete */
#define BMSR_RESV 0x07c0
/* Unused... */
#define BMSR_10HALF 0x0800
/* Can do 10mbps, half-duplex */
#define BMSR_10FULL 0x1000
/* Can do 10mbps, full-duplex */
#define BMSR_100HALF 0x2000
/* Can do 100mbps, half-duplex */
#define BMSR_100FULL 0x4000
/* Can do 100mbps, full-duplex */
#define BMSR_100BASE4 0x8000
/* Can do 100mbps, 4k packets */
/* Advertisement control register. */
#define ADVERTISE_SLCT 0x001f
/* Selector bits */
#define ADVERTISE_CSMA 0x0001
/* Only selector supported */
#define ADVERTISE_10HALF 0x0020
/* Try for 10mbps half-duplex */
#define ADVERTISE_10FULL 0x0040
/* Try for 10mbps full-duplex */
#define ADVERTISE_100HALF 0x0080
/* Try for 100mbps half-duplex */
#define ADVERTISE_100FULL 0x0100
/* Try for 100mbps full-duplex */
#define ADVERTISE_100BASE4 0x0200
/* Try for 100mbps 4k packets */
#define ADVERTISE_RESV 0x1c00
/* Unused... */
#define ADVERTISE_RFAULT 0x2000
/* Say we can detect faults */
#define ADVERTISE_LPACK 0x4000
/* Ack link partners response */
#define ADVERTISE_NPAGE 0x8000
/* Next page bit */
#define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \
ADVERTISE_100HALF | ADVERTISE_100FULL)
/* Link partner ability register. */
#define LPA_SLCT 0x001f
/* Same as advertise selector */
#define LPA_10HALF 0x0020
/* Can do 10mbps half-duplex */
#define LPA_10FULL 0x0040
/* Can do 10mbps full-duplex */
#define LPA_100HALF 0x0080
/* Can do 100mbps half-duplex */
#define LPA_100FULL 0x0100
/* Can do 100mbps full-duplex */
#define LPA_100BASE4 0x0200
/* Can do 100mbps 4k packets */
#define LPA_RESV 0x1c00
/* Unused... */
#define LPA_RFAULT 0x2000
/* Link partner faulted */
#define LPA_LPACK 0x4000
/* Link partner acked us */
#define LPA_NPAGE 0x8000
/* Next page bit */
/* Expansion register for auto-negotiation. */
#define EXPANSION_NWAY 0x0001
/* Can do N-way auto-nego */
#define EXPANSION_LCWP 0x0002
/* Got new RX page code word */
#define EXPANSION_ENABLENPAGE 0x0004
/* This enables npage words */
#define EXPANSION_NPCAPABLE 0x0008
/* Link partner supports npage */
#define EXPANSION_MFAULTS 0x0010
/* Multiple faults detected */
#define EXPANSION_RESV 0xffe0
/* Unused... */
/* N-way test register. */
#define NWAYTEST_RESV1 0x00ff
/* Unused... */
#define NWAYTEST_LOOPBACK 0x0100
/* Enable loopback for N-way */
#define NWAYTEST_RESV2 0xfe00
/* Unused... */
/* The Carrier Sense config register. */
#define CSCONFIG_RESV1 0x0001
/* Unused... */
...
...
@@ -379,41 +297,6 @@
#define CSCONFIG_RESV4 0x4000
/* Unused... */
#define CSCONFIG_NDISABLE 0x8000
/* Disable NRZI */
/* Loopback, receive, bypass error register. */
#define LBRERROR_EBUFFER 0x0001
/* Show elasticity buf errors */
#define LBRERROR_PACKET 0x0002
/* Show packet errors */
#define LBRERROR_LINK 0x0004
/* Show link errors */
#define LBRERROR_END 0x0008
/* Show premature end errors */
#define LBRERROR_CODE 0x0010
/* Show code errors */
#define LBRERROR_RESV1 0x00e0
/* Unused... */
#define LBRERROR_LBACK 0x0300
/* Remote and twister loopback */
#define LBRERROR_10TX 0x0400
/* Transceiver loopback 10mbps */
#define LBRERROR_ENDEC 0x0800
/* ENDEC loopback 10mbps */
#define LBRERROR_ALIGN 0x1000
/* Bypass symbol alignment */
#define LBRERROR_SCRAMBLER 0x2000
/* Bypass (de)scrambler */
#define LBRERROR_ENCODER 0x4000
/* Bypass 4B5B/5B4B encoders */
#define LBRERROR_BEBUF 0x8000
/* Bypass elasticity buffers */
/* Physical address register. */
#define PHYADDR_ADDRESS 0x001f
/* The address itself */
#define PHYADDR_DISCONNECT 0x0020
/* Disconnect status */
#define PHYADDR_10MBPS 0x0040
/* 1=10mbps, 0=100mbps */
#define PHYADDR_RESV 0xff80
/* Unused... */
/* TPI status register for 10mbps. */
#define TPISTATUS_RESV1 0x01ff
/* Unused... */
#define TPISTATUS_SERIAL 0x0200
/* Enable 10mbps serial mode */
#define TPISTATUS_RESV2 0xfc00
/* Unused... */
/* Network interface config register. */
#define NCONFIG_JENABLE 0x0001
/* Jabber enable */
#define NCONFIG_RESV1 0x0002
/* Unused... */
#define NCONFIG_SQUELCH 0x0004
/* Use low squelch */
#define NCONFIG_UTP 0x0008
/* 1=UTP, 0=STP */
#define NCONFIG_HBEAT 0x0010
/* Heart-beat enable */
#define NCONFIG_LDISABLE 0x0020
/* Disable the link */
#define NCONFIG_RESV2 0xffc0
/* Unused... */
/* Happy Meal descriptor rings and such.
* All descriptor rings must be aligned on a 2K boundry.
* All receive buffers must be 64 byte aligned.
...
...
drivers/net/tulip/tulip_core.c
View file @
52683c56
...
...
@@ -1420,6 +1420,10 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
if
(
chip_idx
==
LC82C168
)
csr0
&=
~
0xfff10000
;
/* zero reserved bits 31:20, 16 */
/* DM9102A has troubles with MRM, clear bit 24 too. */
if
(
pdev
->
vendor
==
0x1282
&&
pdev
->
device
==
0x9102
)
csr0
&=
~
0x01200000
;
/*
* And back to business
*/
...
...
@@ -1762,9 +1766,9 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
kfree
(
tp
->
mtable
);
#ifndef USE_IO_OPS
iounmap
((
void
*
)
ioaddr
);
#endif
err_out_free_res:
#endif
pci_release_regions
(
pdev
);
err_out_free_netdev:
...
...
drivers/net/tun.c
View file @
52683c56
...
...
@@ -218,7 +218,7 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, const char *buf,
if
(
tun
->
flags
&
TUN_NOCHECKSUM
)
skb
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
netif_rx
(
skb
);
netif_rx
_ni
(
skb
);
tun
->
stats
.
rx_packets
++
;
tun
->
stats
.
rx_bytes
+=
len
;
...
...
drivers/video/aty/atyfb_base.c
View file @
52683c56
...
...
@@ -61,6 +61,7 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/vt_kern.h>
#include <linux/kd.h>
#include <asm/io.h>
#include <asm/uaccess.h>
...
...
fs/buffer.c
View file @
52683c56
...
...
@@ -219,9 +219,9 @@ static int write_some_buffers(kdev_t dev)
continue
;
if
(
test_and_set_bit
(
BH_Lock
,
&
bh
->
b_state
))
continue
;
get_bh
(
bh
);
if
(
atomic_set_buffer_clean
(
bh
))
{
__refile_buffer
(
bh
);
get_bh
(
bh
);
array
[
count
++
]
=
bh
;
if
(
count
<
NRSYNC
)
continue
;
...
...
@@ -231,7 +231,6 @@ static int write_some_buffers(kdev_t dev)
return
-
EAGAIN
;
}
unlock_buffer
(
bh
);
put_bh
(
bh
);
}
spin_unlock
(
&
lru_list_lock
);
...
...
@@ -251,13 +250,17 @@ static void write_unlocked_buffers(kdev_t dev)
run_task_queue
(
&
tq_disk
);
}
static
int
wait_for_locked_buffers
(
kdev_t
dev
,
int
index
,
int
refile
)
/*
* Wait for a buffer on the proper list.
*
* This must be called with the LRU lock held, and
* will return with it released.
*/
static
int
wait_for_buffers
(
kdev_t
dev
,
int
index
,
int
refile
)
{
struct
buffer_head
*
next
;
int
nr
;
repeat:
spin_lock
(
&
lru_list_lock
);
next
=
lru_list
[
index
];
nr
=
nr_buffers_type
[
index
]
*
2
;
while
(
next
&&
--
nr
>=
0
)
{
...
...
@@ -276,12 +279,26 @@ static int wait_for_locked_buffers(kdev_t dev, int index, int refile)
spin_unlock
(
&
lru_list_lock
);
wait_on_buffer
(
bh
);
put_bh
(
bh
);
goto
repeat
;
return
-
EAGAIN
;
}
spin_unlock
(
&
lru_list_lock
);
return
0
;
}
static
inline
void
wait_for_some_buffers
(
kdev_t
dev
)
{
spin_lock
(
&
lru_list_lock
);
wait_for_buffers
(
dev
,
BUF_LOCKED
,
1
);
}
static
int
wait_for_locked_buffers
(
kdev_t
dev
,
int
index
,
int
refile
)
{
do
{
spin_lock
(
&
lru_list_lock
);
}
while
(
wait_for_buffers
(
dev
,
index
,
refile
));
return
0
;
}
/* Call sync_buffers with wait!=0 to ensure that the call does not
* return until all buffer writes have completed. Sync() may return
* before the writes have finished; fsync() may not.
...
...
@@ -775,15 +792,16 @@ void set_blocksize(kdev_t dev, int size)
/*
* We used to try various strange things. Let's not.
* We'll just try to balance dirty buffers, and possibly
* launder some pages.
* launder some pages and do our best to make more memory
* available.
*/
static
void
refill_freelist
(
int
size
)
{
if
(
!
grow_buffers
(
size
))
{
balance_dirty
(
NODEV
);
if
(
free_shortage
())
page_launder
(
GFP_NOFS
,
0
);
if
(
!
grow_buffers
(
size
))
{
wakeup_bdflush
();
wakeup_kswapd
();
current
->
policy
|=
SCHED_YIELD
;
__set_current_state
(
TASK_RUNNING
);
schedule
();
...
...
@@ -1094,19 +1112,19 @@ void balance_dirty(kdev_t dev)
if
(
state
<
0
)
return
;
/* If we're getting into imbalance, start write-out */
spin_lock
(
&
lru_list_lock
);
write_some_buffers
(
dev
);
wakeup_bdflush
();
/*
* If we're getting a lot out of balance, start some IO ourselves.
*
* This only queues it, and does not actually start it - we'll let
* bdflush do that, or let it happen as a result of a lot of calls
* to balance_dirty() filling up the request queues.
* And if we're _really_ out of balance, wait for
* some of the dirty/locked buffers ourselves.
* This will throttle heavy writers.
*/
if
(
state
>
0
)
{
spin_lock
(
&
lru_list_lock
);
write_some_buffers
(
dev
);
}
if
(
state
>
0
)
wait_for_some_buffers
(
dev
);
}
static
__inline__
void
__mark_dirty
(
struct
buffer_head
*
bh
)
...
...
@@ -2581,7 +2599,7 @@ static int sync_old_buffers(void)
spin_lock
(
&
lru_list_lock
);
bh
=
lru_list
[
BUF_DIRTY
];
if
(
!
time_before
(
jiffies
,
bh
->
b_flushtime
))
if
(
bh
&&
!
time_before
(
jiffies
,
bh
->
b_flushtime
))
continue
;
spin_unlock
(
&
lru_list_lock
);
}
...
...
@@ -2682,7 +2700,7 @@ int bdflush(void *startup)
spin_lock
(
&
lru_list_lock
);
if
(
!
write_some_buffers
(
NODEV
)
||
balance_dirty_state
(
NODEV
)
<
0
)
{
run_task_queue
(
&
tq_disk
);
wait_for_some_buffers
(
NODEV
);
interruptible_sleep_on
(
&
bdflush_wait
);
}
}
...
...
@@ -2713,6 +2731,8 @@ int kupdate(void *startup)
complete
((
struct
completion
*
)
startup
);
for
(;;)
{
wait_for_some_buffers
(
NODEV
);
/* update interval */
interval
=
bdf_prm
.
b_un
.
interval
;
if
(
interval
)
{
...
...
include/asm-sparc/pgtable.h
View file @
52683c56
/* $Id: pgtable.h,v 1.10
6 2000/11/08 04:49:24
davem Exp $ */
/* $Id: pgtable.h,v 1.10
7 2001/08/06 13:16:37
davem Exp $ */
#ifndef _SPARC_PGTABLE_H
#define _SPARC_PGTABLE_H
...
...
@@ -27,6 +27,7 @@
#ifndef __ASSEMBLY__
extern
void
load_mmu
(
void
);
extern
unsigned
long
calc_highpages
(
void
);
BTFIXUPDEF_CALL
(
void
,
quick_kernel_fault
,
unsigned
long
)
...
...
include/asm-sparc64/mmu_context.h
View file @
52683c56
/* $Id: mmu_context.h,v 1.4
7 2001/03/22 07:26:04
davem Exp $ */
/* $Id: mmu_context.h,v 1.4
8 2001/08/03 06:18:52
davem Exp $ */
#ifndef __SPARC64_MMU_CONTEXT_H
#define __SPARC64_MMU_CONTEXT_H
...
...
@@ -23,6 +23,7 @@ extern unsigned long mmu_context_bmap[];
#define CTX_FIRST_VERSION ((1UL << CTX_VERSION_SHIFT) + 1UL)
#define CTX_VALID(__ctx) \
(!(((__ctx) ^ tlb_context_cache) & CTX_VERSION_MASK))
#define CTX_NEVER_WAS_VALID(__ctx) ((__ctx) == 0UL)
#define CTX_HWBITS(__ctx) ((__ctx) & ~CTX_VERSION_MASK)
extern
void
get_new_mmu_context
(
struct
mm_struct
*
mm
);
...
...
include/linux/netdevice.h
View file @
52683c56
...
...
@@ -562,6 +562,17 @@ extern void dev_init(void);
extern
int
netdev_nit
;
/* Post buffer to the network code from _non interrupt_ context.
* see net/core/dev.c for netif_rx description.
*/
static
inline
int
netif_rx_ni
(
struct
sk_buff
*
skb
)
{
int
err
=
netif_rx
(
skb
);
if
(
softirq_pending
(
smp_processor_id
()))
do_softirq
();
return
err
;
}
static
inline
void
dev_init_buffers
(
struct
net_device
*
dev
)
{
/* WILL BE REMOVED IN 2.5.0 */
...
...
include/net/addrconf.h
View file @
52683c56
...
...
@@ -88,6 +88,10 @@ extern int ipv6_chk_mcast_addr(struct net_device *dev,
extern
void
addrconf_prefix_rcv
(
struct
net_device
*
dev
,
u8
*
opt
,
int
len
);
/* Device notifier */
extern
int
register_inet6addr_notifier
(
struct
notifier_block
*
nb
);
extern
int
unregister_inet6addr_notifier
(
struct
notifier_block
*
nb
);
static
inline
struct
inet6_dev
*
__in6_dev_get
(
struct
net_device
*
dev
)
{
...
...
mm/shmem.c
View file @
52683c56
...
...
@@ -537,6 +537,30 @@ struct inode *shmem_get_inode(struct super_block *sb, int mode, int dev)
return
inode
;
}
static
int
shmem_set_size
(
struct
shmem_sb_info
*
info
,
unsigned
long
max_blocks
,
unsigned
long
max_inodes
)
{
int
error
;
unsigned
long
blocks
,
inodes
;
spin_lock
(
&
info
->
stat_lock
);
blocks
=
info
->
max_blocks
-
info
->
free_blocks
;
inodes
=
info
->
max_inodes
-
info
->
free_inodes
;
error
=
-
EINVAL
;
if
(
max_blocks
<
blocks
)
goto
out
;
if
(
max_inodes
<
inodes
)
goto
out
;
error
=
0
;
info
->
max_blocks
=
max_blocks
;
info
->
free_blocks
=
max_blocks
-
blocks
;
info
->
max_inodes
=
max_inodes
;
info
->
free_inodes
=
max_inodes
-
inodes
;
out:
spin_unlock
(
&
info
->
stat_lock
);
return
error
;
}
#ifdef CONFIG_TMPFS
static
ssize_t
shmem_file_write
(
struct
file
*
file
,
const
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
...
...
@@ -1003,30 +1027,6 @@ static int shmem_parse_options(char *options, int *mode, unsigned long * blocks,
return
0
;
}
static
int
shmem_set_size
(
struct
shmem_sb_info
*
info
,
unsigned
long
max_blocks
,
unsigned
long
max_inodes
)
{
int
error
;
unsigned
long
blocks
,
inodes
;
spin_lock
(
&
info
->
stat_lock
);
blocks
=
info
->
max_blocks
-
info
->
free_blocks
;
inodes
=
info
->
max_inodes
-
info
->
free_inodes
;
error
=
-
EINVAL
;
if
(
max_blocks
<
blocks
)
goto
out
;
if
(
max_inodes
<
inodes
)
goto
out
;
error
=
0
;
info
->
max_blocks
=
max_blocks
;
info
->
free_blocks
=
max_blocks
-
blocks
;
info
->
max_inodes
=
max_inodes
;
info
->
free_inodes
=
max_inodes
-
inodes
;
out:
spin_unlock
(
&
info
->
stat_lock
);
return
error
;
}
static
int
shmem_remount_fs
(
struct
super_block
*
sb
,
int
*
flags
,
char
*
data
)
{
struct
shmem_sb_info
*
info
=
&
sb
->
u
.
shmem_sb
;
...
...
net/core/skbuff.c
View file @
52683c56
...
...
@@ -4,7 +4,7 @@
* Authors: Alan Cox <iiitac@pyr.swan.ac.uk>
* Florian La Roche <rzsfl@rz.uni-sb.de>
*
* Version: $Id: skbuff.c,v 1.8
8 2001/07/09 23:19:14
davem Exp $
* Version: $Id: skbuff.c,v 1.8
9 2001/08/06 13:25:02
davem Exp $
*
* Fixes:
* Alan Cox : Fixed the worst of the load balancer bugs.
...
...
@@ -180,7 +180,7 @@ struct sk_buff *alloc_skb(unsigned int size,int gfp_mask)
/* Get the HEAD */
skb
=
skb_head_from_pool
();
if
(
skb
==
NULL
)
{
skb
=
kmem_cache_alloc
(
skbuff_head_cache
,
gfp_mask
);
skb
=
kmem_cache_alloc
(
skbuff_head_cache
,
gfp_mask
&
~
__GFP_DMA
);
if
(
skb
==
NULL
)
goto
nohead
;
}
...
...
net/ipv4/af_inet.c
View file @
52683c56
...
...
@@ -5,7 +5,7 @@
*
* PF_INET protocol family socket handler.
*
* Version: $Id: af_inet.c,v 1.13
1 2001/06/13 16:25:03
davem Exp $
* Version: $Id: af_inet.c,v 1.13
3 2001/08/06 13:21:16
davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
...
...
@@ -117,8 +117,6 @@
#include <linux/wireless.h>
/* Note : will define WIRELESS_EXT */
#endif
/* CONFIG_NET_RADIO || CONFIG_NET_PCMCIA_RADIO */
#define min(a,b) ((a)<(b)?(a):(b))
struct
linux_mib
net_statistics
[
NR_CPUS
*
2
];
#ifdef INET_REFCNT_DEBUG
...
...
@@ -882,14 +880,15 @@ static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
if
(
br_ioctl_hook
!=
NULL
)
return
br_ioctl_hook
(
arg
);
#endif
return
-
ENOPKG
;
case
SIOCGIFDIVERT
:
case
SIOCSIFDIVERT
:
#ifdef CONFIG_NET_DIVERT
return
(
divert_ioctl
(
cmd
,
(
struct
divert_cf
*
)
arg
)
);
return
divert_ioctl
(
cmd
,
(
struct
divert_cf
*
)
arg
);
#else
return
-
ENOPKG
;
#endif
/* CONFIG_NET_DIVERT */
return
-
ENOPKG
;
case
SIOCADDDLCI
:
case
SIOCDELDLCI
:
...
...
net/ipv4/icmp.c
View file @
52683c56
...
...
@@ -3,7 +3,7 @@
*
* Alan Cox, <alan@redhat.com>
*
* Version: $Id: icmp.c,v 1.7
7 2001/06/14 13:40:46
davem Exp $
* Version: $Id: icmp.c,v 1.7
9 2001/08/03 22:20:39
davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -88,8 +88,6 @@
#include <asm/uaccess.h>
#include <net/checksum.h>
#define min(a,b) ((a)<(b)?(a):(b))
/*
* Build xmit assembly blocks
*/
...
...
@@ -240,12 +238,15 @@ static __inline__ void icmp_xmit_unlock(void)
int
xrlim_allow
(
struct
dst_entry
*
dst
,
int
timeout
)
{
unsigned
long
now
;
static
int
burst
=
HZ
;
now
=
jiffies
;
dst
->
rate_tokens
+=
now
-
dst
->
rate_last
;
dst
->
rate_last
=
now
;
if
(
dst
->
rate_tokens
>
XRLIM_BURST_FACTOR
*
timeout
)
dst
->
rate_tokens
=
XRLIM_BURST_FACTOR
*
timeout
;
if
(
burst
<
XRLIM_BURST_FACTOR
*
timeout
)
burst
=
XRLIM_BURST_FACTOR
*
timeout
;
if
(
dst
->
rate_tokens
>
burst
)
dst
->
rate_tokens
=
burst
;
if
(
dst
->
rate_tokens
>=
timeout
)
{
dst
->
rate_tokens
-=
timeout
;
return
1
;
...
...
@@ -635,8 +636,8 @@ static void icmp_unreach(struct sk_buff *skb)
read_lock
(
&
raw_v4_lock
);
if
((
raw_sk
=
raw_v4_htable
[
hash
])
!=
NULL
)
{
while
((
raw_sk
=
__raw_v4_lookup
(
raw_sk
,
protocol
,
iph
->
s
addr
,
iph
->
d
addr
,
skb
->
dev
->
ifindex
))
!=
NULL
)
{
while
((
raw_sk
=
__raw_v4_lookup
(
raw_sk
,
protocol
,
iph
->
d
addr
,
iph
->
s
addr
,
skb
->
dev
->
ifindex
))
!=
NULL
)
{
raw_err
(
raw_sk
,
skb
,
info
);
raw_sk
=
raw_sk
->
next
;
iph
=
(
struct
iphdr
*
)
skb
->
data
;
...
...
net/ipv4/ip_output.c
View file @
52683c56
...
...
@@ -5,7 +5,7 @@
*
* The Internet Protocol (IP) output module.
*
* Version: $Id: ip_output.c,v 1.9
4 2001/07/10 00:40:13
davem Exp $
* Version: $Id: ip_output.c,v 1.9
6 2001/08/03 22:20:39
davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
...
...
@@ -211,7 +211,8 @@ int ip_mc_output(struct sk_buff *skb)
* Multicasts are looped back for other local users
*/
if
(
rt
->
rt_flags
&
RTCF_MULTICAST
&&
(
!
sk
||
sk
->
protinfo
.
af_inet
.
mc_loop
))
{
if
(
rt
->
rt_flags
&
RTCF_MULTICAST
)
{
if
((
!
sk
||
sk
->
protinfo
.
af_inet
.
mc_loop
)
#ifdef CONFIG_IP_MROUTE
/* Small optimization: do not loopback not local frames,
which returned after forwarding; they will be dropped
...
...
@@ -221,9 +222,9 @@ int ip_mc_output(struct sk_buff *skb)
This check is duplicated in ip_mr_input at the moment.
*/
if
((
rt
->
rt_flags
&
RTCF_LOCAL
)
||
!
(
IPCB
(
skb
)
->
flags
&
IPSKB_FORWARDED
))
&&
((
rt
->
rt_flags
&
RTCF_LOCAL
)
||
!
(
IPCB
(
skb
)
->
flags
&
IPSKB_FORWARDED
))
#endif
{
)
{
struct
sk_buff
*
newskb
=
skb_clone
(
skb
,
GFP_ATOMIC
);
if
(
newskb
)
NF_HOOK
(
PF_INET
,
NF_IP_POST_ROUTING
,
newskb
,
NULL
,
...
...
@@ -342,6 +343,13 @@ int ip_queue_xmit(struct sk_buff *skb)
struct
rtable
*
rt
;
struct
iphdr
*
iph
;
/* Skip all of this if the packet is already routed,
* f.e. by something like SCTP.
*/
rt
=
(
struct
rtable
*
)
skb
->
dst
;
if
(
rt
!=
NULL
)
goto
packet_routed
;
/* Make sure we can route this packet. */
rt
=
(
struct
rtable
*
)
__sk_dst_check
(
sk
,
0
);
if
(
rt
==
NULL
)
{
...
...
@@ -365,6 +373,7 @@ int ip_queue_xmit(struct sk_buff *skb)
}
skb
->
dst
=
dst_clone
(
&
rt
->
u
.
dst
);
packet_routed:
if
(
opt
&&
opt
->
is_strictroute
&&
rt
->
rt_dst
!=
rt
->
rt_gateway
)
goto
no_route
;
...
...
net/ipv4/netfilter/ip_conntrack_core.c
View file @
52683c56
...
...
@@ -356,7 +356,7 @@ icmp_error_track(struct sk_buff *skb,
inner
=
(
struct
iphdr
*
)(
hdr
+
1
);
datalen
=
skb
->
len
-
iph
->
ihl
*
4
-
sizeof
(
*
hdr
);
if
(
skb
->
len
<
iph
->
ihl
*
4
+
sizeof
(
struct
icmphdr
))
{
if
(
skb
->
len
<
iph
->
ihl
*
4
+
sizeof
(
*
hdr
)
+
sizeof
(
*
iph
))
{
DEBUGP
(
"icmp_error_track: too short
\n
"
);
return
NULL
;
}
...
...
net/ipv4/netfilter/ip_nat_proto_tcp.c
View file @
52683c56
...
...
@@ -92,10 +92,17 @@ tcp_manip_pkt(struct iphdr *iph, size_t len,
oldip
=
iph
->
daddr
;
portptr
=
&
hdr
->
dest
;
}
/* this could be a inner header returned in icmp packet; in such
cases we cannot update the checksum field since it is outside of
the 8 bytes of transport layer headers we are guaranteed */
if
(((
void
*
)
&
hdr
->
check
+
sizeof
(
hdr
->
check
)
-
(
void
*
)
iph
)
<=
len
)
{
hdr
->
check
=
ip_nat_cheat_check
(
~
oldip
,
manip
->
ip
,
ip_nat_cheat_check
(
*
portptr
^
0xFFFF
,
manip
->
u
.
tcp
.
port
,
hdr
->
check
));
}
*
portptr
=
manip
->
u
.
tcp
.
port
;
}
...
...
net/ipv4/tcp_minisocks.c
View file @
52683c56
...
...
@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
* Version: $Id: tcp_minisocks.c,v 1.
9 2001/03/06 22:42:56
davem Exp $
* Version: $Id: tcp_minisocks.c,v 1.
11 2001/08/03 14:27:25
davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
...
...
@@ -371,7 +371,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
tw
->
family
=
sk
->
family
;
tw
->
reuse
=
sk
->
reuse
;
tw
->
rcv_wscale
=
tp
->
rcv_wscale
;
atomic_set
(
&
tw
->
refcnt
,
0
);
atomic_set
(
&
tw
->
refcnt
,
1
);
tw
->
hashent
=
sk
->
hashent
;
tw
->
rcv_nxt
=
tp
->
rcv_nxt
;
...
...
@@ -407,6 +407,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
}
tcp_tw_schedule
(
tw
,
timeo
);
tcp_tw_put
(
tw
);
}
else
{
/* Sorry, if we're out of memory, just CLOSE this
* socket up. We've got bigger problems than
...
...
net/ipv6/addrconf.c
View file @
52683c56
...
...
@@ -6,7 +6,7 @@
* Pedro Roque <roque@di.fc.ul.pt>
* Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
*
* $Id: addrconf.c,v 1.6
6 2001/06/11 00:39:29
davem Exp $
* $Id: addrconf.c,v 1.6
7 2001/08/03 09:32:17
davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -45,6 +45,7 @@
#include <linux/sysctl.h>
#endif
#include <linux/delay.h>
#include <linux/notifier.h>
#include <linux/proc_fs.h>
#include <net/sock.h>
...
...
@@ -99,6 +100,8 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp);
static
void
addrconf_rs_timer
(
unsigned
long
data
);
static
void
ipv6_ifa_notify
(
int
event
,
struct
inet6_ifaddr
*
ifa
);
static
struct
notifier_block
*
inet6addr_chain
;
struct
ipv6_devconf
ipv6_devconf
=
{
0
,
/* forwarding */
...
...
@@ -392,6 +395,8 @@ ipv6_add_addr(struct inet6_dev *idev, struct in6_addr *addr, int pfxlen,
write_unlock_bh
(
&
idev
->
lock
);
read_unlock
(
&
addrconf_lock
);
notifier_call_chain
(
&
inet6addr_chain
,
NETDEV_UP
,
ifa
);
return
ifa
;
}
...
...
@@ -433,6 +438,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
ipv6_ifa_notify
(
RTM_DELADDR
,
ifp
);
notifier_call_chain
(
&
inet6addr_chain
,
NETDEV_DOWN
,
ifp
);
addrconf_del_timer
(
ifp
);
...
...
@@ -1959,6 +1965,20 @@ static void addrconf_sysctl_unregister(struct ipv6_devconf *p)
#endif
/*
* Device notifier
*/
int
register_inet6addr_notifier
(
struct
notifier_block
*
nb
)
{
return
notifier_chain_register
(
&
inet6addr_chain
,
nb
);
}
int
unregister_inet6addr_notifier
(
struct
notifier_block
*
nb
)
{
return
notifier_chain_unregister
(
&
inet6addr_chain
,
nb
);
}
/*
* Init / cleanup code
*/
...
...
net/ipv6/netfilter/Makefile
View file @
52683c56
...
...
@@ -9,7 +9,7 @@
O_TARGET
:=
netfilter.o
export-objs
:=
export-objs
:=
ip6_tables.o
# Link order matters here.
obj-$(CONFIG_IP6_NF_IPTABLES)
+=
ip6_tables.o
...
...
net/ipv6/netfilter/ip6_tables.c
View file @
52683c56
...
...
@@ -1791,5 +1791,13 @@ static void __exit fini(void)
#endif
}
EXPORT_SYMBOL
(
ip6t_register_table
);
EXPORT_SYMBOL
(
ip6t_unregister_table
);
EXPORT_SYMBOL
(
ip6t_do_table
);
EXPORT_SYMBOL
(
ip6t_register_match
);
EXPORT_SYMBOL
(
ip6t_unregister_match
);
EXPORT_SYMBOL
(
ip6t_register_target
);
EXPORT_SYMBOL
(
ip6t_unregister_target
);
module_init
(
init
);
module_exit
(
fini
);
net/netsyms.c
View file @
52683c56
...
...
@@ -61,6 +61,7 @@ extern struct net_proto_family inet_family_ops;
#include <net/ipv6.h>
#include <net/ndisc.h>
#include <net/transp_v6.h>
#include <net/addrconf.h>
extern
int
sysctl_local_port_range
[
2
];
extern
int
tcp_port_rover
;
...
...
@@ -280,6 +281,9 @@ EXPORT_SYMBOL(dlci_ioctl_hook);
#ifdef CONFIG_IPV6
EXPORT_SYMBOL
(
ipv6_addr_type
);
EXPORT_SYMBOL
(
icmpv6_send
);
EXPORT_SYMBOL
(
ndisc_mc_map
);
EXPORT_SYMBOL
(
register_inet6addr_notifier
);
EXPORT_SYMBOL
(
unregister_inet6addr_notifier
);
#endif
#if defined (CONFIG_IPV6_MODULE) || defined (CONFIG_KHTTPD) || defined (CONFIG_KHTTPD_MODULE)
/* inet functions common to v4 and v6 */
...
...
net/packet/af_packet.c
View file @
52683c56
...
...
@@ -5,7 +5,7 @@
*
* PACKET - implements raw packet sockets.
*
* Version: $Id: af_packet.c,v 1.5
5 2001/06/28 01:34:29
davem Exp $
* Version: $Id: af_packet.c,v 1.5
6 2001/08/06 13:21:16
davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
...
...
@@ -1488,14 +1488,15 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
return
br_ioctl_hook
(
arg
);
#endif
#endif
return
-
ENOPKG
;
case
SIOCGIFDIVERT
:
case
SIOCSIFDIVERT
:
#ifdef CONFIG_NET_DIVERT
return
(
divert_ioctl
(
cmd
,
(
struct
divert_cf
*
)
arg
));
#endif
/* CONFIG_NET_DIVERT */
return
divert_ioctl
(
cmd
,
(
struct
divert_cf
*
)
arg
);
#else
return
-
ENOPKG
;
#endif
/* CONFIG_NET_DIVERT */
#ifdef CONFIG_INET
case
SIOCADDRT
:
...
...
net/sched/cls_route.c
View file @
52683c56
...
...
@@ -316,13 +316,14 @@ static int route4_delete(struct tcf_proto *tp, unsigned long arg)
{
struct
route4_head
*
head
=
(
struct
route4_head
*
)
tp
->
root
;
struct
route4_filter
**
fp
,
*
f
=
(
struct
route4_filter
*
)
arg
;
unsigned
h
=
f
->
handle
;
unsigned
h
=
0
;
struct
route4_bucket
*
b
;
int
i
;
if
(
!
head
||
!
f
)
return
-
EINVAL
;
h
=
f
->
handle
;
b
=
f
->
bkt
;
for
(
fp
=
&
b
->
ht
[
from_hash
(
h
>>
16
)];
*
fp
;
fp
=
&
(
*
fp
)
->
next
)
{
...
...
net/sched/cls_u32.c
View file @
52683c56
...
...
@@ -162,7 +162,7 @@ static int u32_classify(struct sk_buff *skb, struct tcf_proto *tp, struct tcf_re
if
(
!
(
n
->
sel
.
flags
&
(
TC_U32_VAROFFSET
|
TC_U32_OFFSET
|
TC_U32_EAT
)))
goto
next_ht
;
if
(
n
->
sel
.
flags
&
(
TC_U32_
EA
T
|
TC_U32_VAROFFSET
))
{
if
(
n
->
sel
.
flags
&
(
TC_U32_
OFFSE
T
|
TC_U32_VAROFFSET
))
{
off2
=
n
->
sel
.
off
+
3
;
if
(
n
->
sel
.
flags
&
TC_U32_VAROFFSET
)
off2
+=
ntohs
(
n
->
sel
.
offmask
&
*
(
u16
*
)(
ptr
+
n
->
sel
.
offoff
))
>>
n
->
sel
.
offshift
;
...
...
net/sched/sch_cbq.c
View file @
52683c56
...
...
@@ -1245,8 +1245,10 @@ static int cbq_drop(struct Qdisc* sch)
cl
=
cl_head
;
do
{
if
(
cl
->
q
->
ops
->
drop
&&
cl
->
q
->
ops
->
drop
(
cl
->
q
))
if
(
cl
->
q
->
ops
->
drop
&&
cl
->
q
->
ops
->
drop
(
cl
->
q
))
{
sch
->
q
.
qlen
--
;
return
1
;
}
}
while
((
cl
=
cl
->
next_alive
)
!=
cl_head
);
}
return
0
;
...
...
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