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
6efe5c37
Commit
6efe5c37
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.1.50
parent
ecfcc06e
Changes
44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
1055 additions
and
426 deletions
+1055
-426
Documentation/Configure.help
Documentation/Configure.help
+31
-6
Documentation/devices.tex
Documentation/devices.tex
+43
-4
Documentation/devices.txt
Documentation/devices.txt
+32
-3
Documentation/hayes-esp.txt
Documentation/hayes-esp.txt
+47
-12
Makefile
Makefile
+3
-3
arch/i386/lib/checksum.c
arch/i386/lib/checksum.c
+9
-9
drivers/block/ide.c
drivers/block/ide.c
+3
-1
drivers/char/Config.in
drivers/char/Config.in
+5
-1
drivers/char/Makefile
drivers/char/Makefile
+7
-6
drivers/char/conmakehash.c
drivers/char/conmakehash.c
+13
-16
drivers/char/consolemap.c
drivers/char/consolemap.c
+3
-2
drivers/char/esp.c
drivers/char/esp.c
+147
-65
drivers/char/tty_ioctl.c
drivers/char/tty_ioctl.c
+6
-7
drivers/char/uni_hash.tbl
drivers/char/uni_hash.tbl
+89
-0
drivers/char/vt.c
drivers/char/vt.c
+1
-1
drivers/pci/pci.c
drivers/pci/pci.c
+52
-2
drivers/scsi/Config.in
drivers/scsi/Config.in
+5
-2
drivers/scsi/aic7xxx.c
drivers/scsi/aic7xxx.c
+17
-0
drivers/scsi/aic7xxx/aic7xxx.reg
drivers/scsi/aic7xxx/aic7xxx.reg
+15
-0
drivers/scsi/aic7xxx/aic7xxx.seq
drivers/scsi/aic7xxx/aic7xxx.seq
+9
-0
drivers/scsi/aic7xxx_reg.h
drivers/scsi/aic7xxx_reg.h
+9
-5
drivers/scsi/aic7xxx_seq.h
drivers/scsi/aic7xxx_seq.h
+133
-129
drivers/scsi/ncr53c8xx.c
drivers/scsi/ncr53c8xx.c
+1
-1
drivers/scsi/sd.c
drivers/scsi/sd.c
+4
-2
drivers/scsi/ultrastor.c
drivers/scsi/ultrastor.c
+6
-1
fs/autofs/root.c
fs/autofs/root.c
+17
-2
fs/buffer.c
fs/buffer.c
+2
-2
fs/dcache.c
fs/dcache.c
+8
-3
fs/devices.c
fs/devices.c
+3
-1
fs/inode.c
fs/inode.c
+11
-35
fs/msdos/namei.c
fs/msdos/namei.c
+86
-20
fs/namei.c
fs/namei.c
+17
-15
fs/nfs/dir.c
fs/nfs/dir.c
+7
-1
fs/super.c
fs/super.c
+50
-23
fs/vfat/namei.c
fs/vfat/namei.c
+1
-1
include/asm-i386/pgtable.h
include/asm-i386/pgtable.h
+1
-0
include/linux/dcache.h
include/linux/dcache.h
+15
-0
include/linux/fs.h
include/linux/fs.h
+1
-1
include/linux/pci.h
include/linux/pci.h
+63
-2
include/net/tcp.h
include/net/tcp.h
+16
-0
kernel/fork.c
kernel/fork.c
+1
-0
kernel/ksyms.c
kernel/ksyms.c
+2
-0
mm/slab.c
mm/slab.c
+15
-2
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_ipv4.c
+49
-40
No files found.
Documentation/Configure.help
View file @
6efe5c37
...
...
@@ -4399,12 +4399,37 @@ CONFIG_ESPSERIAL_DMA_CHANNEL
host. One DMA channel is shared between all the ESP ports. Valid
values are 1 and 3.
Hayes ESP serial port trigger level
CONFIG_ESPSERIAL_TRIGGER_LEVEL
This is the trigger level (in bytes) of the transmit FIFO and the
receive FIFO. Larger values may result in fewer interrupts;
however, a value too high could result in data loss. Valid values
are 1 through 1015.
Hayes ESP serial port receive trigger level
CONFIG_ESPSERIAL_RX_TRIGGER
This is the trigger level (in bytes) of the receive FIFO. Larger values
may result in fewer interrupts; however, a value too high could result in
data loss. Valid values are 1 through 1023.
Hayes ESP serial port transmit trigger level
CONFIG_ESPSERIAL_TX_TRIGGER
This is the trigger level (in bytes) of the transmit FIFO. Larger values
may result in fewer interrupts; however, a value too high could result in
degraded trasmit performance. Valid values are 1 through 1023.
Hayes ESP serial port flow off level
CONFIG_ESPSERIAL_FLOW_OFF
This is the level (in bytes) at which the ESP port will flow off the remote
transmitter. Valid values are 1 through 1023. This value should be greater
than the receive trigger level and the flow on level.
Hayes ESP serial port flow on level
CONFIG_ESPSERIAL_FLOW_ON
This is the level (in bytes) at which the ESP port will flow on the remote
transmitter after having flowed it off. Valid values are 1 through 1023.
This value should be less than the flow off level, but greater than the
receive trigger level.
Hayes ESP serial port receiver timeout
CONFIG_ESPSERIAL_RX_TMOUT
This is the amount of time that the ESP port will wait after receiving the
final character before signalling an interrupt. Valid values are 0 through
255. A value too high will increase latency, and a value too low will cause
unnecessary interrupts.
Parallel printer support
CONFIG_PRINTER
...
...
Documentation/devices.tex
View file @
6efe5c37
...
...
@@ -47,7 +47,7 @@ foo \kill}%
%
\title
{{
\bf
Linux Allocated Devices
}}
\author
{
Maintained by H. Peter Anvin
$
<
$
hpa@zytor.com
$
>
$}
\date
{
Last revised:
May 20
, 1997
}
\date
{
Last revised:
July 28
, 1997
}
\maketitle
%
\noindent
...
...
@@ -213,7 +213,10 @@ reply.
\major
{
82
}{}{
char
}{
WiNRADiO communications receiver card
}
\major
{
83
}{}{
char
}{
Teletext/videotext interfaces
}
\major
{
84
}{}{
char
}{
Ikon 1011[57] Versatec Greensheet Interface
}
\major
{
85
}{
--119
}{}{
Unallocated
}
\major
{
85
}{}{
char
}{
Linux/SGI shared memory input queue
}
\major
{
86
}{}{
char
}{
SCSI media changer
}
\major
{
87
}{}{
char
}{
Sony Control-A1 stereo control bus
}
\major
{
88
}{
--119
}{}{
Unallocated
}
\major
{
120
}{
--127
}{}{
Local/experimental use
}
\major
{
128
}{
--239
}{}{
Unallocated
}
\major
{
240
}{
--254
}{}{
Local/experimental use
}
...
...
@@ -356,7 +359,7 @@ the numbers vary.
\begin{devicelist}
\major
{
4
}{}{
char
}{
TTY devices
}
\minor
{
0
}{
/dev/
console
}{
Console devic
e
}
\minor
{
0
}{
/dev/
tty0
}{
Current virtual consol
e
}
\minor
{
1
}{
/dev/tty1
}{
First virtual console
}
\minordots
\minor
{
63
}{
/dev/tty63
}{
63rd virtual console
}
...
...
@@ -380,11 +383,16 @@ Linux. To ensure proper operation, do not mix old and new PTY devices.
\begin{devicelist}
\major
{
5
}{}{
char
}{
Alternate TTY devices
}
\minor
{
0
}{
/dev/tty
}{
Current TTY device
}
\minor
{
1
}{}{
Reserved for console device
}
\minor
{
64
}{
/dev/cua0
}{
Callout device corresponding to
{
\file
ttyS0
}}
\minordots
\minor
{
127
}{
/dev/cua63
}{
Callout device corresponding to
{
\file
ttyS63
}}
\end{devicelist}
\noindent
Minor number 1 is reserved for a kernel-managed
{
\file
/dev/console
}
in a future version of Linux.
\begin{devicelist}
\major
{
6
}{}{
char
}{
Parallel printer devices
}
\minor
{
0
}{
/dev/lp0
}{
First parallel printer (
{
\hex
0x3bc
}
)
}
...
...
@@ -511,6 +519,12 @@ physical disks.
\minor
{
142
}{
/dev/msr
}{
x86 model specific registers
}
\minor
{
143
}{
/dev/pciconf
}{
PCI configuration space
}
\minor
{
144
}{
/dev/nvram
}{
Non-volatile configuration RAM
}
\minor
{
145
}{
/dev/hfmodem
}{
Soundcard shortwave modem control
}
\minor
{
146
}{
/dev/graphics
}{
Linux/SGI graphics device
}
\minor
{
147
}{
/dev/opengl
}{
Linux/SGI OpenGL pipe
}
\minor
{
148
}{
/dev/gfx
}{
Linux/SGI graphics effects device
}
\minor
{
149
}{
/dev/input/mouse
}{
Linux/SGI Irix emulation mouse
}
\minor
{
150
}{
/dev/input/keyboard
}{
Linux/SGI Irix emulation keyboard
}
\end{devicelist}
\begin{devicelist}
...
...
@@ -1050,6 +1064,9 @@ use the local/experimental range. The sudden addition or removal of a
driver with this number should not cause ill effects to the system
(bugs excepted.)
IN PARTICULAR, ANY DISTRIBUTION WHICH CONTAINS A DEVICE DRIVER USING
MAJOR NUMBER 42 IS NONCOMPLIANT.
\begin{devicelist}
\major
{
43
}{}{
char
}{
isdn4linux virtual modem
}
\minor
{
0
}{
/dev/ttyI0
}{
First virtual modem
}
...
...
@@ -1426,7 +1443,29 @@ on {\url http://home.pages.de/~videotext/\/}.
\end{devicelist}
\begin{devicelist}
\major
{
85
}{
--119
}{}{
Unallocated
}
\major
{
85
}{}{
char
}{
Linux/SGI shared memory input queue
}
\minor
{
0
}{
/dev/shmiq
}{
Master shared input queue
}
\minor
{
1
}{
/dev/qcntl0
}{
First device pushed
}
\minor
{
2
}{
/dev/qcntl1
}{
Second device pushed
}
\minordots
\end{devicelist}
\begin{devicelist}
\major
{
86
}{}{
char
}{
SCSI media changer
}
\minor
{
0
}{
/dev/sch0
}{
First SCSI media changer
}
\minor
{
1
}{
/dev/sch1
}{
Second SCSI media changer
}
\minordots
\end{devicelist}
\begin{devicelist}
\major
{
87
}{}{
char
}{
Sony Control-A1 stereo control bus
}
\minor
{
0
}{
/dev/controla0
}{
First device on chain
}
\minor
{
1
}{
/dev/controla1
}{
Second device on chain
}
\minordots
\end{devicelist}
\begin{devicelist}
\major
{
88
}{
--119
}{}{
Unallocated
}
\end{devicelist}
\begin{devicelist}
...
...
Documentation/devices.txt
View file @
6efe5c37
LINUX ALLOCATED DEVICES
Maintained by H. Peter Anvin <hpa@zytor.com>
Last revised: May 20
, 1997
Last revised: July 28
, 1997
This list is the successor to Rick Miller's Linux Device List, which
he stopped maintaining when he got busy with other things in 1993. It
...
...
@@ -154,7 +154,7 @@ reply.
appropriate to their respective architectures.
4 char TTY devices
0 = /dev/
console Console devic
e
0 = /dev/
tty0 Current virtual consol
e
1 = /dev/tty1 First virtual console
...
...
...
@@ -178,10 +178,14 @@ reply.
5 char Alternate TTY devices
0 = /dev/tty Current TTY device
1 Reserved for console device
64 = /dev/cua0 Callout device corresponding to ttyS0
...
127 = /dev/cua63 Callout device corresponding to ttyS63
Minor number 1 is reserved for a kernel-managed
/dev/console in a future version of Linux.
6 char Parallel printer devices
0 = /dev/lp0 First parallel printer (0x3bc)
1 = /dev/lp1 Second parallel printer (0x378)
...
...
@@ -291,6 +295,12 @@ reply.
142 = /dev/msr x86 model-specific registers
143 = /dev/pciconf PCI configuration space
144 = /dev/nvram Non-volatile configuration RAM
145 = /dev/hfmodem Soundcard shortwave modem control
146 = /dev/graphics Linux/SGI graphics device
147 = /dev/opengl Linux/SGI OpenGL pipe
148 = /dev/gfx Linux/SGI graphics effects device
149 = /dev/input/mouse Linux/SGI Irix emulation mouse
150 = /dev/input/keyboard Linux/SGI Irix emulation keyboard
11 char Raw keyboard device
0 = /dev/kbd Raw keyboard device
...
...
@@ -714,6 +724,9 @@ reply.
removal of a driver with this number should not cause
ill effects to the system (bugs excepted.)
IN PARTICULAR, ANY DISTRIBUTION WHICH CONTAINS A
DEVICE DRIVER USING MAJOR NUMBER 42 IS NONCOMPLIANT.
43 char isdn4linux virtual modem
0 = /dev/ttyI0 First virtual modem
...
...
...
@@ -1002,7 +1015,23 @@ reply.
0 = /dev/ihcp0 First Greensheet port
1 = /dev/ihcp1 Second Greensheet port
85-119 UNALLOCATED
85 char Linux/SGI shared memory input queue
0 = /dev/shmiq Master shared input queue
1 = /dev/qcntl0 First device pushed
2 = /dev/qcntl1 Second device pushed
...
86 char SCSI media changer
0 = /dev/sch0 First SCSI media changer
1 = /dev/sch1 Second SCSI media changer
...
87 char Sony Control-A1 stereo control bus
0 = /dev/controla0 First device on chain
1 = /dev/controla1 Second device on chain
...
88-119 UNALLOCATED
120-127 LOCAL/EXPERIMENTAL USE
...
...
drivers/char/README.esp
→
Documentation/hayes-esp.txt
View file @
6efe5c37
HAYES ESP DRIVER
S VERSION 1.0
HAYES ESP DRIVER
VERSION 1.6
Features:
...
...
@@ -6,9 +6,24 @@ Features:
interrupts and features than compatibilty mode
- Uses DMA to transfer data to and from the ESP's FIFOs, reducing CPU load
- Supports primary and secondary ports
- Special version of setserial can be used to view/change the enhanced mode
configuration. The setserial patch is distributed with the standalone
driver distribution. See http://www.nyx.net/~arobinso for more information.
The driver can be compiled as a module. The module will be called 'esp.o'.
The IRQs to use can be specified by using the irq= option. The format is:
To compile/install:
Examine the first section of esp.h to verify that the definitions are
acceptable. If they are not, change them.
DMA_CHANNEL must be either 1 or 3.
ESP_BH should be set to a value not in use by the system. If the system
is not configured with RISCOM8 support, the default should be fine.
Examine the Makefile, and make any appropriate changes.
Type 'make' to compile the module. The module will be called 'esp.o'. Typing
'make install' will install the module in /lib/modules/misc. The module can
be inserted and removed as usual (insmod, rmmod, etc.). The IRQs to use can
be specified by using the irq= option. The format is:
irq=[0x100],[0x140],[0x180],[0x200],[0x240],[0x280],[0x300],[0x380]
...
...
@@ -24,9 +39,10 @@ same as for the irq= option. Each divisor value is a series of hex digits,
with each digit representing the divisor to use for a corresponding port. The
divisor value is constructed RIGHT TO LEFT. Specifying a nonzero divisor value
will automatically set the spd_cust flag. To calculate the divisor to use for
a certain baud rate, divide the port's base baud (921600) by the desired rate.
For example, to set the divisor of the primary port at 0x300 to 4 and the
divisor of the secondary port at 0x308 to 8, the insmod command would be:
a certain baud rate, divide the port's base baud (generally 921600) by the
desired rate. For example, to set the divisor of the primary port at 0x300 to
4 and the divisor of the secondary port at 0x308 to 8, the insmod command would
be:
insmod esp divisor=0,0,0,0,0,0,0x84,0
...
...
@@ -35,13 +51,32 @@ The dma= option can be used to set the DMA channel. The channel can be either
insmod esp dma=3
The trigger= option can be used to set the FIFO trigger levels. This specifies
when the ESP card should send an interrupt. Larger values will decrease the
number of interrupts; however, a value too high may result in data loss.
Valid values are 1 through 1015, with 768 being the default. For example, to
set the trigger levels to 512 bytes, the insmod command would be:
The rx_trigger= and tx_trigger= options can be used to set the FIFO trigger
levels. They specifie when the ESP card should send an interrupt. Larger
values will decrease the number of interrupts; however, a value too high may
result in data loss. Valid values are 1 through 1023, with 768 being the
default. For example, to set the receive trigger level to 512 bytes and the
transmit trigger level to 700 bytes, the insmod command would be:
insmod esp rx_trigger=512 tx_trigger=700
The flow_off= and flow_on= options can be used to set the hardware flow off/
flow on levels. The flow on level must be lower than the flow off level, and
the flow off level should be higher than rx_trigger. Valid values are 1
through 1023, with 1016 being the default flow off level and 944 being the
default flow on level. For example, to set the flow off level to 1000 bytes
and the flow on level to 935 bytes, the insmod command would be:
insmod esp flow_off=1000 flow_on=935
The rx_timeout= option can be used to set the receive timeout value. This
value indicates how long after receiving the last character that the ESP card
should wait before signalling an interrupt. Valid values are 0 though 255,
with 128 being the default. A value too high will increase latency, and a
value too low will cause unnecessary interrupts. For example, to set the
receive timeout to 255, the insmod command would be:
insmod esp
trigger=512
insmod esp
rx_timeout=255
Multiple options can be listed on the insmod command line by separating each
option with a space. For example:
...
...
Makefile
View file @
6efe5c37
VERSION
=
2
PATCHLEVEL
=
1
SUBLEVEL
=
49
SUBLEVEL
=
50
ARCH
:=
$(
shell
uname
-m
|
sed
-e
s/i.86/i386/
-e
s/sun4u/sparc64/
)
...
...
@@ -198,6 +198,7 @@ symlinks:
fi
oldconfig
:
symlinks
$(MAKE)
-C
drivers/sound mkscript
$(CONFIG_SHELL)
scripts/Configure
-d
arch
/
$(ARCH)
/config.in
xconfig
:
symlinks
...
...
@@ -329,13 +330,13 @@ clean: archclean
rm
-f
core
`
find
.
-type
f
-name
'core'
-print
`
rm
-f
vmlinux System.map
rm
-f
.tmp
*
drivers/sound/configure
rm
-f
drivers/char/consolemap_deftbl.c drivers/char/conmakehash
rm
-f
`
find modules/
-type
f
-print
`
rm
-f
submenu
*
mrproper
:
clean
rm
-f
include/linux/autoconf.h include/linux/version.h
rm
-f
drivers/sound/local.h drivers/sound/.defines
rm
-f
drivers/char/uni_hash.tbl drivers/char/conmakehash
rm
-f
drivers/net/soundmodem/sm_tbl_
{
afsk1200,afsk2666,fsk9600
}
.h
rm
-f
drivers/net/soundmodem/sm_tbl_
{
hapn4800,psk4800
}
.h
rm
-f
drivers/net/soundmodem/sm_tbl_
{
afsk2400_7,afsk2400_8
}
.h
...
...
@@ -352,7 +353,6 @@ mrproper: clean
rm
-rf
$(TOPDIR)
/include/linux/modules
rm
-rf
modules
distclean
:
mrproper
rm
-f
core
`
find
.
\(
-name
'*.orig'
-o
-name
'*.rej'
-o
-name
'*~'
\
-o
-name
'*.bak'
-o
-name
'#*#'
-o
-name
'.*.orig'
\
...
...
arch/i386/lib/checksum.c
View file @
6efe5c37
...
...
@@ -111,13 +111,13 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
#define SRC(y...) \
" 9999: "#y"; \n \
.section __ex_table, \"a\"; \n \
.long 9999b,
src_access_fault
\n \
.long 9999b,
6001f
\n \
.previous"
#define DST(y...) \
" 9999: "#y"; \n \
.section __ex_table, \"a\"; \n \
.long 9999b,
dst_access_fault
\n \
.long 9999b,
6002f
\n \
.previous"
unsigned
int
csum_partial_copy_generic
(
const
char
*
src
,
char
*
dst
,
...
...
@@ -203,28 +203,28 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst,
adcl $0, %%eax
7:
end_of_body
:
5000
:
# Exception handler:
################################################
#
.section .fixup,
\"
a
\"
#
#
common_fixup:
#
6000:
#
#
movl %7, (%%ebx) #
#
# FIXME: do zeroing of rest of the buffer here. #
#
jmp
end_of_body
#
jmp
5000b
#
#
src_access_fault:
#
6001:
#
movl %1, %%ebx #
jmp
common_fixup
#
jmp
6000b
#
#
dst_access_fault:
#
6002:
#
movl %2, %%ebx #
jmp
common_fixup
#
jmp
6000b
#
#
.previous #
#
...
...
drivers/block/ide.c
View file @
6efe5c37
...
...
@@ -1611,8 +1611,10 @@ int ide_revalidate_disk(kdev_t i_rdev)
for
(
p
=
0
;
p
<
(
1
<<
PARTN_BITS
);
++
p
)
{
if
(
drive
->
part
[
p
].
nr_sects
>
0
)
{
kdev_t
devp
=
MKDEV
(
major
,
minor
+
p
);
struct
super_block
*
sb
=
get_super
(
devp
);
fsync_dev
(
devp
);
invalidate_inodes
(
devp
);
if
(
sb
)
invalidate_inodes
(
sb
);
invalidate_buffers
(
devp
);
}
drive
->
part
[
p
].
start_sect
=
0
;
...
...
drivers/char/Config.in
View file @
6efe5c37
...
...
@@ -34,7 +34,11 @@ if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
tristate 'Hayes ESP serial port support' CONFIG_ESPSERIAL
if [ "$CONFIG_ESPSERIAL" = "y" -o "$CONFIG_ESPSERIAL" = "m" ]; then
int ' DMA channel' CONFIG_ESPSERIAL_DMA_CHANNEL 1
int ' FIFO trigger level' CONFIG_ESPSERIAL_TRIGGER_LEVEL 768
int ' Receive FIFO trigger level' CONFIG_ESPSERIAL_RX_TRIGGER 768
int ' Transmit FIFO trigger level' CONFIG_ESPSERIAL_TX_TRIGGER 768
int ' Hardware flow off level' CONFIG_ESPSERIAL_FLOW_OFF 1016
int ' Hardware flow on level' CONFIG_ESPSERIAL_FLOW_ON 944
int ' Receiver timeout' CONFIG_ESPSERIAL_RX_TMOUT 128
fi
fi
if [ "$CONFIG_PARPORT" != "n" ]; then
...
...
drivers/char/Makefile
View file @
6efe5c37
...
...
@@ -23,7 +23,7 @@ M_OBJS :=
L_OBJS
:=
tty_io.o n_tty.o tty_ioctl.o pty.o mem.o random.o
ifdef
CONFIG_VT
L_OBJS
+=
console.o vt.o vc_screen.o consolemap.o
L_OBJS
+=
console.o vt.o vc_screen.o consolemap.o
consolemap_deftbl.o
LX_OBJS
+=
selection.o
endif
...
...
@@ -324,15 +324,16 @@ endif
include
$(TOPDIR)/Rules.make
fastdep
:
uni_hash.tbl
consolemap.o
:
fastdep
:
conmakehash
:
conmakehash.c
$(HOSTCC)
-o
conmakehash conmakehash.c
uni_hash.tbl
:
$(FONTMAPFILE) conmakehash
./conmakehash
$(FONTMAPFILE)
>
uni_hash.tbl
consolemap_deftbl.c
:
$(FONTMAPFILE) conmakehash
./conmakehash
$(FONTMAPFILE)
>
consolemap_deftbl.c
consolemap_deftbl.o
:
consolemap_deftbl.c $(TOPDIR)/include/linux/types.h
defkeymap.c
:
defkeymap.map
loadkeys
--mktable
defkeymap.map
>
defkeymap.c
drivers/char/conmakehash.c
View file @
6efe5c37
...
...
@@ -7,7 +7,7 @@
* memory not allocated by kmalloc(), and doing our own memory management
* just for this seems like massive overkill.
*
* Copyright (C) 1995 H. Peter Anvin
* Copyright (C) 1995
-1997
H. Peter Anvin
*
* This program is a part of the Linux kernel, and may be freely
* copied under the terms of the GNU General Public License (GPL),
...
...
@@ -248,18 +248,15 @@ int main(int argc, char *argv[])
printf
(
"\
/*
\n
\
* uni_hash.tbl
\n
\
*
\n
\
* Do not edit this file; it was automatically generated by
\n
\
*
\n
\
* conmakehash %s >
uni_hash.tbl
\n
\
* conmakehash %s >
[this file]
\n
\
*
\n
\
*/
\n
\
\n
\
#include <linux/types.h>
\n
\
#include <linux/kd.h>
\n
\
\n
\
static
u8 dfont_unicount[%d] =
\n
\
u8 dfont_unicount[%d] =
\n
\
{
\n\t
"
,
argv
[
1
],
fontlen
);
for
(
i
=
0
;
i
<
fontlen
;
i
++
)
...
...
@@ -272,20 +269,20 @@ static u8 dfont_unicount[%d] = \n\
else
printf
(
", "
);
}
printf
(
"
\n
static
u16 dfont_unitable[%d] =
\n
{
\n\t
"
,
nuni
);
printf
(
"
\n
u16 dfont_unitable[%d] =
\n
{
\n\t
"
,
nuni
);
fp0
=
0
;
nent
=
0
;
for
(
i
=
0
;
i
<
nuni
;
i
++
)
{
while
(
nent
>=
unicount
[
fp0
]
)
{
fp0
++
;
nent
=
0
;
}
printf
(
"0x%04x"
,
unitable
[
fp0
][
nent
++
]);
if
(
i
==
nuni
-
1
)
while
(
nent
>=
unicount
[
fp0
]
)
{
fp0
++
;
nent
=
0
;
}
printf
(
"0x%04x"
,
unitable
[
fp0
][
nent
++
]);
if
(
i
==
nuni
-
1
)
printf
(
"
\n
};"
);
else
if
(
i
%
8
==
7
)
printf
(
",
\n\t
"
);
...
...
drivers/char/consolemap.c
View file @
6efe5c37
...
...
@@ -307,9 +307,10 @@ int con_get_trans_new(ushort * arg)
* this 3-level paged table scheme to be comparable to a hash table.
*/
#include "uni_hash.tbl"
/* Include hash tables & parameters */
extern
u8
dfont_unicount
[];
/* Defined in console_defmap.c */
extern
u16
dfont_unitable
[];
int
hashtable_contents_valid
=
0
;
/* Use ASCII-only mode for bootup*/
int
hashtable_contents_valid
=
0
;
/* Use ASCII-only mode for bootup
*/
static
u16
**
uni_pagedir
[
32
]
=
{
...
...
drivers/char/esp.c
View file @
6efe5c37
This diff is collapsed.
Click to expand it.
drivers/char/tty_ioctl.c
View file @
6efe5c37
...
...
@@ -374,7 +374,6 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
{
struct
tty_struct
*
real_tty
;
int
retval
;
int
opt
=
0
;
if
(
tty
->
driver
.
type
==
TTY_DRIVER_TYPE_PTY
&&
tty
->
driver
.
subtype
==
PTY_TYPE_MASTER
)
...
...
@@ -407,19 +406,19 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
return
-
EFAULT
;
return
0
;
case
TCSETSF
:
opt
|=
TERMIOS_FLUSH
;
return
set_termios
(
real_tty
,
arg
,
TERMIOS_FLUSH
)
;
case
TCSETSW
:
opt
|=
TERMIOS_WAIT
;
return
set_termios
(
real_tty
,
arg
,
TERMIOS_WAIT
)
;
case
TCSETS
:
return
set_termios
(
real_tty
,
arg
,
opt
);
return
set_termios
(
real_tty
,
arg
,
0
);
case
TCGETA
:
return
get_termio
(
real_tty
,(
struct
termio
*
)
arg
);
case
TCSETAF
:
opt
|=
TERMIOS_FLUSH
;
return
set_termios
(
real_tty
,
arg
,
TERMIOS_FLUSH
|
TERMIOS_TERMIO
)
;
case
TCSETAW
:
opt
|=
TERMIOS_WAIT
;
return
set_termios
(
real_tty
,
arg
,
TERMIOS_WAIT
|
TERMIOS_TERMIO
)
;
case
TCSETA
:
return
set_termios
(
real_tty
,
arg
,
opt
|
TERMIOS_TERMIO
);
return
set_termios
(
real_tty
,
arg
,
TERMIOS_TERMIO
);
case
TCXONC
:
retval
=
tty_check_change
(
tty
);
if
(
retval
)
...
...
drivers/char/uni_hash.tbl
0 → 100644
View file @
6efe5c37
/*
* uni_hash.tbl
*
* Do not edit this file; it was automatically generated by
*
* conmakehash cp437.uni > uni_hash.tbl
*
*/
#include <linux/types.h>
#include <linux/kd.h>
static u8 dfont_unicount[256] =
{
1, 1, 1, 1, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 5, 1, 2, 1, 4, 1, 1,
1, 5, 1, 2, 1, 1, 1, 5,
1, 1, 2, 1, 1, 4, 1, 1,
1, 2, 1, 1, 1, 1, 1, 2,
1, 2, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 1, 1, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 1, 1, 1, 2, 1,
2, 1, 2, 1, 1, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 2, 1
};
static u16 dfont_unitable[297] =
{
0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x25c6, 0x2663, 0x2660,
0x2022, 0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b,
0x263c, 0x25b6, 0x25ba, 0x25c0, 0x25c4, 0x2195, 0x203c, 0x00b6,
0x00a7, 0x25ac, 0x21a8, 0x2191, 0x2193, 0x2192, 0x2190, 0x221f,
0x2194, 0x25b2, 0x25bc, 0x0020, 0x0021, 0x0022, 0x00a8, 0x0023,
0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b,
0x002c, 0x00b8, 0x002d, 0x00ad, 0x002e, 0x002f, 0x0030, 0x0031,
0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039,
0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, 0x0040, 0x0041,
0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x0042, 0x0043, 0x00a9, 0x0044,
0x0045, 0x00c8, 0x00ca, 0x00cb, 0x0046, 0x0047, 0x0048, 0x0049,
0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x004a, 0x004b, 0x212a, 0x004c,
0x004d, 0x004e, 0x004f, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x0050,
0x0051, 0x0052, 0x00ae, 0x0053, 0x0054, 0x0055, 0x00d9, 0x00da,
0x00db, 0x0056, 0x0057, 0x0058, 0x0059, 0x00dd, 0x005a, 0x005b,
0x005c, 0x005d, 0x005e, 0x005f, 0xf804, 0x0060, 0x0061, 0x00e3,
0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069,
0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x00f5, 0x0070,
0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078,
0x00d7, 0x0079, 0x00fd, 0x007a, 0x007b, 0x007c, 0x00a5, 0x007d,
0x007e, 0x2302, 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0,
0x00e5, 0x00e7, 0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec,
0x00c4, 0x00c5, 0x212b, 0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6,
0x00f2, 0x00fb, 0x00f9, 0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3,
0x00a5, 0x20a7, 0x0192, 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1,
0x00d1, 0x00aa, 0x00ba, 0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc,
0x00a1, 0x00ab, 0x00bb, 0x2591, 0x2592, 0x2593, 0x2502, 0x2524,
0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255d,
0x255c, 0x255b, 0x2510, 0x2514, 0x2534, 0x252c, 0x251c, 0x2500,
0x253c, 0x255e, 0x255f, 0x255a, 0x2554, 0x2569, 0x2566, 0x2560,
0x2550, 0x256c, 0x2567, 0x2568, 0x2564, 0x2565, 0x2559, 0x2558,
0x2552, 0x2553, 0x256b, 0x256a, 0x2518, 0x250c, 0x2588, 0x2584,
0x258c, 0x2590, 0x2580, 0x03b1, 0x03b2, 0x00df, 0x0393, 0x03c0,
0x03a3, 0x03c3, 0x00b5, 0x03bc, 0x03c4, 0x03a6, 0x00d8, 0x0398,
0x03a9, 0x2126, 0x03b4, 0x221e, 0x03c6, 0x00f8, 0x03b5, 0x2229,
0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248,
0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0xfffd,
0x00a0
};
\ No newline at end of file
drivers/char/vt.c
View file @
6efe5c37
...
...
@@ -504,7 +504,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
* If the time is zero, turn off sound ourselves.
*/
ticks
=
HZ
*
((
arg
>>
16
)
&
0xffff
)
/
1000
;
count
=
ticks
?
arg
:
0
;
count
=
ticks
?
(
arg
&
0xffff
)
:
0
;
kd_mksound
(
count
,
ticks
);
return
0
;
}
...
...
drivers/pci/pci.c
View file @
6efe5c37
This diff is collapsed.
Click to expand it.
drivers/scsi/Config.in
View file @
6efe5c37
...
...
@@ -24,10 +24,13 @@ dep_tristate 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 $CONFIG_SCSI
dep_tristate 'Adaptec AIC7xxx support' CONFIG_SCSI_AIC7XXX $CONFIG_SCSI
if [ "$CONFIG_SCSI_AIC7XXX" != "n" ]; then
bool ' Enable tagged command queueing' CONFIG_AIC7XXX_TAGGED_QUEUEING Y
int ' Maximum number of commands per LUN' CONFIG_AIC7XXX_CMDS_PER_LUN 8
dep_tristate ' Override driver defaults for commands per LUN' CONFIG_OVERRIDE_CMDS N
if [ "$CONFIG_OVERRIDE_CMDS" != "n" ]; then
int ' Maximum number of commands per LUN' CONFIG_AIC7XXX_CMDS_PER_LUN 8
fi
bool ' Enable SCB paging' CONFIG_AIC7XXX_PAGE_ENABLE N
bool ' Collect statistics to report in /proc' CONFIG_AIC7XXX_PROC_STATS N
int '
d
elay in seconds after SCSI bus reset' CONFIG_AIC7XXX_RESET_DELAY 15
int '
D
elay in seconds after SCSI bus reset' CONFIG_AIC7XXX_RESET_DELAY 15
fi
dep_tristate 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS $CONFIG_SCSI
dep_tristate 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 $CONFIG_SCSI
...
...
drivers/scsi/aic7xxx.c
View file @
6efe5c37
...
...
@@ -829,6 +829,7 @@ struct aic7xxx_host {
unsigned
char
pause
;
/* pause value for HCNTRL */
unsigned
char
qcntmask
;
unsigned
char
qfullcount
;
unsigned
char
cmdoutcnt
;
unsigned
char
curqincnt
;
struct
Scsi_Host
*
next
;
/* allow for multiple IRQs */
unsigned
char
activescbs
;
/* active scbs */
...
...
@@ -3880,6 +3881,19 @@ aic7xxx_isr(int irq, void *dev_id, struct pt_regs *regs)
#endif
while
(
qoutcnt
>
0
)
{
if
((
p
->
flags
&
PAGE_ENABLED
)
!=
0
)
{
p
->
cmdoutcnt
+=
qoutcnt
;
if
(
p
->
cmdoutcnt
>=
p
->
qfullcount
)
{
/*
* Since paging only occurs on aic78x0 chips, we can use
* Auto Access Pause to clear the command count.
*/
outb
(
0
,
p
->
base
+
CMDOUTCNT
);
p
->
cmdoutcnt
=
0
;
}
}
for
(
i
=
0
;
i
<
qoutcnt
;
i
++
)
{
scb_index
=
inb
(
p
->
base
+
QOUTFIFO
);
...
...
@@ -5291,6 +5305,9 @@ aic7xxx_register(Scsi_Host_Template *template, struct aic7xxx_host *p)
*/
outb
(
p
->
qcntmask
,
p
->
base
+
QCNTMASK
);
outb
(
p
->
qfullcount
,
p
->
base
+
FIFODEPTH
);
outb
(
0
,
p
->
base
+
CMDOUTCNT
);
/*
* We don't have any waiting selections or disconnected SCBs.
*/
...
...
drivers/scsi/aic7xxx/aic7xxx.reg
View file @
6efe5c37
...
...
@@ -1079,6 +1079,21 @@ scratch_ram {
CUR_SCBID {
size 1
}
/*
* Running count of commands placed in
* the QOUTFIFO. This is cleared by the
* kernel driver every FIFODEPTH commands.
*/
CMDOUTCNT {
size 1
}
/*
* Maximum number of entries allowed in
* the QOUT/INFIFO.
*/
FIFODEPTH {
size 1
}
ARG_1 {
size 1
mask SEND_MSG 0x80
...
...
drivers/scsi/aic7xxx/aic7xxx.seq
View file @
6efe5c37
...
...
@@ -643,6 +643,15 @@ status_ok:
complete:
/* Post the SCB and issue an interrupt */
.if ( SCB_PAGING )
/*
* Spin loop until there is space
* in the QOUTFIFO.
*/
mov A, FIFODEPTH;
cmp CMDOUTCNT, A je .;
inc CMDOUTCNT;
.endif
mov QOUTFIFO,SCB_TAG;
mvi INTSTAT,CMDCMPLT;
test SCB_CONTROL, ABORT_SCB jz dma_next_scb;
...
...
drivers/scsi/aic7xxx_reg.h
View file @
6efe5c37
...
...
@@ -252,15 +252,19 @@
#define CUR_SCBID 0x58
#define ARG_1 0x59
#define RETURN_1 0x59
#define SEND_MSG 0x80
#define SEND_SENSE 0x40
#define SEND_REJ 0x20
#define CMDOUTCNT 0x59
#define SCSICONF 0x5a
#define RESET_SCSI 0x40
#define FIFODEPTH 0x5a
#define ARG_1 0x5b
#define RETURN_1 0x5b
#define SEND_MSG 0x80
#define SEND_SENSE 0x40
#define SEND_REJ 0x20
#define HOSTCONF 0x5d
#define HA_274_BIOSCTRL 0x5f
...
...
drivers/scsi/aic7xxx_seq.h
View file @
6efe5c37
This diff is collapsed.
Click to expand it.
drivers/scsi/ncr53c8xx.c
View file @
6efe5c37
...
...
@@ -9283,7 +9283,7 @@ static int ncr53c8xx_pci_init(Scsi_Host_Template *tpnt,
*/
#ifdef NCR_IOMAPPED
request_region
(
io_port
,
128
,
"ncr53c8xx"
);
device
->
slot
.
port
=
ioport
;
device
->
slot
.
port
=
io
_
port
;
#else
device
->
slot
.
reg
=
(
struct
ncr_reg
*
)
remap_pci_mem
((
ulong
)
base
,
128
);
if
(
!
device
->
slot
.
reg
)
...
...
drivers/scsi/sd.c
View file @
6efe5c37
...
...
@@ -1509,8 +1509,9 @@ int revalidate_scsidisk(kdev_t dev, int maxusage){
for
(
i
=
max_p
-
1
;
i
>=
0
;
i
--
)
{
int
minor
=
start
+
i
;
kdev_t
devi
=
MKDEV
(
MAJOR_NR
,
minor
);
struct
super_block
*
sb
=
get_super
(
devi
);
sync_dev
(
devi
);
i
nvalidate_inodes
(
devi
);
i
f
(
sb
)
invalidate_inodes
(
sb
);
invalidate_buffers
(
devi
);
gdev
->
part
[
minor
].
start_sect
=
0
;
gdev
->
part
[
minor
].
nr_sects
=
0
;
...
...
@@ -1561,8 +1562,9 @@ static void sd_detach(Scsi_Device * SDp)
for
(
i
=
max_p
-
1
;
i
>=
0
;
i
--
)
{
int
minor
=
start
+
i
;
kdev_t
devi
=
MKDEV
(
MAJOR_NR
,
minor
);
struct
super_block
*
sb
=
get_super
(
devi
);
sync_dev
(
devi
);
i
nvalidate_inodes
(
devi
);
i
f
(
sb
)
invalidate_inodes
(
sb
);
invalidate_buffers
(
devi
);
sd_gendisk
.
part
[
minor
].
start_sect
=
0
;
sd_gendisk
.
part
[
minor
].
nr_sects
=
0
;
...
...
drivers/scsi/ultrastor.c
View file @
6efe5c37
...
...
@@ -1144,8 +1144,13 @@ static void ultrastor_interrupt(int irq, void *dev_id, struct pt_regs *regs)
else
printk
(
"US14F: interrupt: unexpected interrupt
\n
"
);
if
(
config
.
slot
?
inb
(
config
.
icm_address
-
1
)
:
(
inb
(
SYS_DOORBELL_INTR
(
config
.
doorbell_address
))
&
1
))
if
(
config
.
slot
?
inb
(
config
.
icm_address
-
1
)
:
(
inb
(
SYS_DOORBELL_INTR
(
config
.
doorbell_address
))
&
1
))
#if (ULTRASTOR_DEBUG & UD_MULTI_CMD)
printk
(
"Ux4F: multiple commands completed
\n
"
);
#else
;
#endif
#if (ULTRASTOR_DEBUG & UD_INTERRUPT)
printk
(
"USx4F: interrupt: returning
\n
"
);
...
...
fs/autofs/root.c
View file @
6efe5c37
...
...
@@ -176,6 +176,12 @@ static int autofs_revalidate(struct dentry * dentry)
return
1
;
}
static
struct
dentry_operations
autofs_dentry_operations
=
{
autofs_revalidate
,
NULL
,
/* d_hash */
NULL
,
/* d_compare */
};
static
int
autofs_root_lookup
(
struct
inode
*
dir
,
struct
dentry
*
dentry
)
{
struct
autofs_sb_info
*
sbi
;
...
...
@@ -204,14 +210,23 @@ static int autofs_root_lookup(struct inode *dir, struct dentry * dentry)
*
* We need to do this before we release the directory semaphore.
*/
dentry
->
d_
revalidate
=
autofs_revalidate
;
dentry
->
d_
op
=
&
autofs_dentry_operations
;
dentry
->
d_flags
|=
DCACHE_AUTOFS_PENDING
;
d_add
(
dentry
,
NULL
);
up
(
&
dir
->
i_sem
);
autofs_revalidate
(
dentry
);
down
(
&
dir
->
i_sem
);
/*
* If we are still pending, check if we had to handle
* a signal. If so we can force a restart..
*/
if
(
dentry
->
d_flags
&
DCACHE_AUTOFS_PENDING
)
{
if
(
current
->
signal
&
~
current
->
blocked
)
return
-
ERESTARTNOINTR
;
}
return
0
;
}
...
...
fs/buffer.c
View file @
6efe5c37
...
...
@@ -113,7 +113,7 @@ union bdflush_param{
int
bdflush_min
[
N_PARAM
]
=
{
0
,
10
,
5
,
25
,
0
,
100
,
100
,
1
,
1
};
int
bdflush_max
[
N_PARAM
]
=
{
100
,
5000
,
2000
,
2000
,
100
,
60000
,
60000
,
2047
,
5
};
static
void
wakeup_bdflush
(
int
);
void
wakeup_bdflush
(
int
);
/*
* Rewrote the wait-routines to use the "new" wait-queue functionality,
...
...
@@ -1663,7 +1663,7 @@ static struct wait_queue * bdflush_wait = NULL;
static
struct
wait_queue
*
bdflush_done
=
NULL
;
struct
task_struct
*
bdflush_tsk
=
0
;
static
void
wakeup_bdflush
(
int
wait
)
void
wakeup_bdflush
(
int
wait
)
{
if
(
current
==
bdflush_tsk
)
return
;
...
...
fs/dcache.c
View file @
6efe5c37
...
...
@@ -178,7 +178,7 @@ struct dentry * d_alloc(struct dentry * parent, const struct qstr *name)
dentry
->
d_name
.
name
=
str
;
dentry
->
d_name
.
len
=
name
->
len
;
dentry
->
d_name
.
hash
=
name
->
hash
;
dentry
->
d_
revalidate
=
NULL
;
dentry
->
d_
op
=
NULL
;
return
dentry
;
}
...
...
@@ -233,10 +233,15 @@ static inline struct dentry * __dlookup(struct list_head *head, struct dentry *
tmp
=
tmp
->
next
;
if
(
dentry
->
d_name
.
hash
!=
hash
)
continue
;
if
(
dentry
->
d_name
.
len
!=
len
)
continue
;
if
(
dentry
->
d_parent
!=
parent
)
continue
;
if
(
parent
->
d_op
&&
parent
->
d_op
->
d_compare
)
{
if
(
parent
->
d_op
->
d_compare
(
parent
,
&
dentry
->
d_name
,
name
))
continue
;
return
dentry
;
}
if
(
dentry
->
d_name
.
len
!=
len
)
continue
;
if
(
memcmp
(
dentry
->
d_name
.
name
,
str
,
len
))
continue
;
return
dentry
;
...
...
fs/devices.c
View file @
6efe5c37
...
...
@@ -198,6 +198,7 @@ int check_disk_change(kdev_t dev)
{
int
i
;
struct
file_operations
*
fops
;
struct
super_block
*
sb
;
i
=
MAJOR
(
dev
);
if
(
i
>=
MAX_BLKDEV
||
(
fops
=
blkdevs
[
i
].
fops
)
==
NULL
)
...
...
@@ -210,7 +211,8 @@ int check_disk_change(kdev_t dev)
printk
(
KERN_DEBUG
"VFS: Disk change detected on device %s
\n
"
,
kdevname
(
dev
));
if
(
invalidate_inodes
(
dev
))
sb
=
get_super
(
dev
);
if
(
sb
&&
invalidate_inodes
(
sb
))
printk
(
"VFS: busy inodes on changed media..
\n
"
);
invalidate_buffers
(
dev
);
...
...
fs/inode.c
View file @
6efe5c37
...
...
@@ -260,10 +260,9 @@ static void dispose_list(struct list_head * head)
}
/*
* Invalidate all inodes for a device
, except for the root inode.
* Invalidate all inodes for a device
.
*/
static
int
invalidate_list
(
struct
list_head
*
head
,
kdev_t
dev
,
struct
inode
*
root
,
struct
list_head
*
dispose
)
static
int
invalidate_list
(
struct
list_head
*
head
,
struct
super_block
*
sb
,
struct
list_head
*
dispose
)
{
struct
list_head
*
next
;
int
busy
=
0
;
...
...
@@ -277,11 +276,9 @@ static int invalidate_list(struct list_head *head, kdev_t dev,
if
(
tmp
==
head
)
break
;
inode
=
list_entry
(
tmp
,
struct
inode
,
i_list
);
if
(
inode
->
i_dev
!=
dev
)
continue
;
if
(
inode
==
root
)
if
(
inode
->
i_sb
!=
sb
)
continue
;
if
(
!
inode
->
i_count
&&
!
inode
->
i_state
)
{
if
(
!
inode
->
i_count
)
{
list_del
(
&
inode
->
i_hash
);
INIT_LIST_HEAD
(
&
inode
->
i_hash
);
list_del
(
&
inode
->
i_list
);
...
...
@@ -300,16 +297,14 @@ static int invalidate_list(struct list_head *head, kdev_t dev,
* is because we don't want to sleep while messing
* with the global lists..
*/
static
int
invalidate_inodes_except
(
kdev_t
dev
,
struct
inode
*
root
)
int
invalidate_inodes
(
struct
super_block
*
sb
)
{
struct
super_block
*
sb
=
get_super
(
dev
);
int
busy
;
LIST_HEAD
(
throw_away
);
spin_lock
(
&
inode_lock
);
busy
=
invalidate_list
(
&
inode_in_use
,
dev
,
root
,
&
throw_away
);
if
(
sb
)
busy
|=
invalidate_list
(
&
sb
->
s_dirty
,
dev
,
root
,
&
throw_away
);
busy
=
invalidate_list
(
&
inode_in_use
,
sb
,
&
throw_away
);
busy
|=
invalidate_list
(
&
sb
->
s_dirty
,
sb
,
&
throw_away
);
spin_unlock
(
&
inode_lock
);
dispose_list
(
&
throw_away
);
...
...
@@ -317,11 +312,6 @@ static int invalidate_inodes_except(kdev_t dev, struct inode * root)
return
busy
;
}
int
invalidate_inodes
(
kdev_t
dev
)
{
return
invalidate_inodes_except
(
dev
,
NULL
);
}
/*
* This is called with the inode lock held. It just looks at the last
* inode on the in-use list, and if the inode is trivially freeable
...
...
@@ -421,6 +411,7 @@ struct inode * get_empty_inode(void)
inode
=
list_entry
(
tmp
,
struct
inode
,
i_list
);
add_new_inode:
inode
->
i_sb
=
NULL
;
inode
->
i_dev
=
0
;
inode
->
i_ino
=
++
last_ino
;
inode
->
i_count
=
1
;
list_add
(
&
inode
->
i_list
,
&
inode_in_use
);
...
...
@@ -578,7 +569,7 @@ void inode_init(void)
*/
int
fs_may_mount
(
kdev_t
dev
)
{
return
!
invalidate_inodes
(
dev
)
;
return
1
;
}
/*
...
...
@@ -586,29 +577,14 @@ int fs_may_mount(kdev_t dev)
*/
int
fs_may_umount
(
struct
super_block
*
sb
,
struct
dentry
*
root
)
{
int
busy
;
shrink_dcache
();
if
(
!
root
->
d_inode
||
root
->
d_inode
->
i_dev
!=
sb
->
s_dev
)
{
printk
(
"fs_may_umount: root inode not on device??
\n
"
);
return
0
;
}
/*
* Invalidate the inodes for this device. Device has been synced
* prior to call, so there should be no dirty inodes.
*/
busy
=
invalidate_inodes_except
(
sb
->
s_dev
,
root
->
d_inode
);
return
(
root
->
d_count
==
1
)
&&
!
busy
;
return
root
->
d_count
==
1
;
}
/* This belongs in file_table.c, not here... */
int
fs_may_remount_ro
(
struct
super_block
*
sb
)
{
struct
file
*
file
;
kdev_t
dev
=
sb
->
s_dev
;
/* Check that no files are currently opened for writing. */
for
(
file
=
inuse_filps
;
file
;
file
=
file
->
f_next
)
{
...
...
@@ -616,7 +592,7 @@ int fs_may_remount_ro(struct super_block *sb)
if
(
!
file
->
f_dentry
)
continue
;
inode
=
file
->
f_dentry
->
d_inode
;
if
(
!
inode
||
inode
->
i_
dev
!=
dev
)
if
(
!
inode
||
inode
->
i_
sb
!=
sb
)
continue
;
if
(
S_ISREG
(
inode
->
i_mode
)
&&
file
->
f_mode
&
FMODE_WRITE
)
return
0
;
...
...
fs/msdos/namei.c
View file @
6efe5c37
...
...
@@ -63,24 +63,6 @@ struct super_operations msdos_sops = {
NULL
};
struct
super_block
*
msdos_read_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
super_block
*
res
;
MOD_INC_USE_COUNT
;
sb
->
s_op
=
&
msdos_sops
;
res
=
fat_read_super
(
sb
,
data
,
silent
);
if
(
res
==
NULL
)
MOD_DEC_USE_COUNT
;
return
res
;
}
/***** Formats an MS-DOS file name. Rejects invalid names. */
static
int
msdos_format_name
(
char
conv
,
const
char
*
name
,
int
len
,
char
*
res
,
int
dot_dirs
,
char
dotsOK
)
...
...
@@ -190,6 +172,73 @@ static int msdos_find(struct inode *dir,const char *name,int len,
return
fat_scan
(
dir
,
msdos_name
,
bh
,
de
,
ino
,
scantype
);
}
static
int
msdos_hash
(
struct
dentry
*
dentry
,
struct
qstr
*
qstr
)
{
unsigned
long
hash
;
char
msdos_name
[
MSDOS_NAME
];
int
error
;
int
i
;
struct
fat_mount_options
*
options
=
&
(
MSDOS_SB
(
dentry
->
d_inode
->
i_sb
)
->
options
);
error
=
msdos_format_name
(
options
->
name_check
,
qstr
->
name
,
qstr
->
len
,
msdos_name
,
1
,
options
->
dotsOK
);
if
(
error
)
return
error
;
hash
=
init_name_hash
();
for
(
i
=
0
;
i
<
MSDOS_NAME
;
i
++
)
hash
=
partial_name_hash
(
msdos_name
[
i
],
hash
);
qstr
->
hash
=
end_name_hash
(
hash
);
return
0
;
}
static
int
msdos_cmp
(
struct
dentry
*
dentry
,
struct
qstr
*
a
,
struct
qstr
*
b
)
{
char
a_msdos_name
[
MSDOS_NAME
],
b_msdos_name
[
MSDOS_NAME
];
int
error
;
struct
fat_mount_options
*
options
=
&
(
MSDOS_SB
(
dentry
->
d_inode
->
i_sb
)
->
options
);
error
=
msdos_format_name
(
options
->
name_check
,
a
->
name
,
a
->
len
,
a_msdos_name
,
1
,
options
->
dotsOK
);
if
(
error
)
return
error
;
error
=
msdos_format_name
(
options
->
name_check
,
b
->
name
,
b
->
len
,
b_msdos_name
,
1
,
options
->
dotsOK
);
if
(
error
)
return
error
;
return
memcmp
(
a_msdos_name
,
b_msdos_name
,
MSDOS_NAME
);
}
static
struct
dentry_operations
msdos_dentry_operations
=
{
0
,
/* d_revalidate */
msdos_hash
,
msdos_cmp
};
struct
super_block
*
msdos_read_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
super_block
*
res
;
MOD_INC_USE_COUNT
;
sb
->
s_op
=
&
msdos_sops
;
res
=
fat_read_super
(
sb
,
data
,
silent
);
if
(
res
==
NULL
)
MOD_DEC_USE_COUNT
;
sb
->
s_root
->
d_op
=
&
msdos_dentry_operations
;
return
res
;
}
/***** Get inode using directory and name */
int
msdos_lookup
(
struct
inode
*
dir
,
struct
dentry
*
dentry
)
{
...
...
@@ -201,10 +250,20 @@ int msdos_lookup(struct inode *dir,struct dentry *dentry)
PRINTK
((
"msdos_lookup
\n
"
));
if
((
res
=
msdos_find
(
dir
,
dentry
->
d_name
.
name
,
dentry
->
d_name
.
len
,
&
bh
,
&
de
,
&
ino
))
<
0
)
{
dentry
->
d_op
=
&
msdos_dentry_operations
;
if
(
!
dir
)
{
d_add
(
dentry
,
NULL
);
return
0
;
}
if
((
res
=
msdos_find
(
dir
,
dentry
->
d_name
.
name
,
dentry
->
d_name
.
len
,
&
bh
,
&
de
,
&
ino
))
<
0
)
{
if
(
res
==
-
ENOENT
)
{
d_add
(
dentry
,
NULL
);
res
=
0
;
}
return
res
;
}
PRINTK
((
"msdos_lookup 4
\n
"
));
if
(
bh
)
fat_brelse
(
sb
,
bh
);
...
...
@@ -229,6 +288,7 @@ int msdos_lookup(struct inode *dir,struct dentry *dentry)
iput
(
inode
);
if
(
!
(
inode
=
iget
(
next
->
i_sb
,
next
->
i_ino
)))
{
fat_fs_panic
(
dir
->
i_sb
,
"msdos_lookup: Can't happen"
);
d_add
(
dentry
,
NULL
);
return
-
ENOENT
;
}
}
...
...
@@ -248,6 +308,9 @@ static int msdos_create_entry(struct inode *dir, const char *name,
struct
msdos_dir_entry
*
de
;
int
res
,
ino
;
if
(
!
dir
)
return
-
ENOENT
;
*
result
=
NULL
;
if
((
res
=
fat_scan
(
dir
,
NULL
,
&
bh
,
&
de
,
&
ino
,
SCAN_ANY
))
<
0
)
{
if
(
res
!=
-
ENOENT
)
return
res
;
...
...
@@ -748,7 +811,10 @@ struct inode_operations msdos_dir_inode_operations = {
NULL
,
/* writepage */
fat_bmap
,
/* bmap */
NULL
,
/* truncate */
NULL
/* permission */
NULL
,
/* permission */
NULL
,
/* smap */
NULL
,
/* updatepage */
NULL
,
/* revalidate */
};
...
...
fs/namei.c
View file @
6efe5c37
...
...
@@ -268,8 +268,8 @@ static struct dentry * cached_lookup(struct dentry * parent, struct qstr * name)
{
struct
dentry
*
dentry
=
d_lookup
(
parent
,
name
);
if
(
dentry
&&
dentry
->
d_revalidate
)
{
int
validated
,
(
*
revalidate
)(
struct
dentry
*
)
=
dentry
->
d_revalidate
;
if
(
dentry
&&
dentry
->
d_
op
&&
dentry
->
d_op
->
d_
revalidate
)
{
int
validated
,
(
*
revalidate
)(
struct
dentry
*
)
=
dentry
->
d_
op
->
d_
revalidate
;
dentry
->
d_count
++
;
validated
=
revalidate
(
dentry
)
||
d_invalidate
(
dentry
);
...
...
@@ -349,16 +349,6 @@ static struct dentry * do_follow_link(struct dentry *base, struct dentry *dentry
return
dentry
;
}
/*
* Allow a filesystem to translate the character set of
* a file name. This allows for filesystems that are not
* case-sensitive, for example.
*
* This is only a dummy define right now, but eventually
* it might become something like "(parent)->d_charmap[c]"
*/
#define name_translate_char(parent, c) (c)
/*
* Name resolution.
*
...
...
@@ -406,16 +396,15 @@ struct dentry * lookup_dentry(const char * name, struct dentry * base, int follo
break
;
this
.
name
=
name
;
hash
=
init_name_hash
();
len
=
0
;
c
=
*
name
;
hash
=
init_name_hash
();
do
{
len
++
;
name
++
;
c
=
name_translate_char
(
base
,
c
);
hash
=
partial_name_hash
(
c
,
hash
);
c
=
*
name
;
}
while
(
c
&&
(
c
!=
'/'
));
this
.
len
=
len
;
this
.
hash
=
end_name_hash
(
hash
);
...
...
@@ -428,6 +417,19 @@ struct dentry * lookup_dentry(const char * name, struct dentry * base, int follo
}
while
(
c
==
'/'
);
}
/*
* See if the low-level filesystem might want
* to use its own hash..
*/
if
(
base
->
d_op
&&
base
->
d_op
->
d_hash
)
{
int
error
;
error
=
base
->
d_op
->
d_hash
(
base
,
&
this
);
if
(
error
<
0
)
{
dentry
=
ERR_PTR
(
error
);
break
;
}
}
dentry
=
lookup
(
base
,
&
this
);
if
(
IS_ERR
(
dentry
))
break
;
...
...
fs/nfs/dir.c
View file @
6efe5c37
...
...
@@ -349,6 +349,12 @@ static int nfs_lookup_revalidate(struct dentry * dentry)
return
time
<
max
;
}
static
struct
dentry_operations
nfs_dentry_operations
=
{
nfs_lookup_revalidate
,
0
,
/* d_hash */
0
,
/* d_compare */
};
static
int
nfs_lookup
(
struct
inode
*
dir
,
struct
dentry
*
dentry
)
{
struct
inode
*
inode
;
...
...
@@ -380,7 +386,7 @@ static int nfs_lookup(struct inode *dir, struct dentry * dentry)
return
error
;
dentry
->
d_time
=
jiffies
;
dentry
->
d_
revalidate
=
nfs_lookup_revalidate
;
dentry
->
d_
op
=
&
nfs_dentry_operations
;
d_add
(
dentry
,
inode
);
return
0
;
}
...
...
fs/super.c
View file @
6efe5c37
...
...
@@ -550,16 +550,25 @@ void put_unnamed_dev(kdev_t dev)
kdevname
(
dev
));
}
static
void
d_umount
(
struct
dentry
*
dentry
)
static
int
d_umount
(
struct
super_block
*
sb
)
{
struct
dentry
*
covers
=
dentry
->
d_covers
;
struct
dentry
*
root
=
sb
->
s_root
;
struct
dentry
*
covers
=
root
->
d_covers
;
if
(
covers
!=
dentry
)
{
covers
->
d_mounts
=
covers
;
dentry
->
d_covers
=
dentry
;
dput
(
covers
);
dput
(
dentry
);
}
if
(
root
->
d_count
!=
1
)
return
-
EBUSY
;
if
(
root
->
d_inode
->
i_state
)
return
-
EBUSY
;
sb
->
s_root
=
NULL
;
covers
->
d_mounts
=
covers
;
root
->
d_covers
=
root
;
dput
(
covers
);
dput
(
root
);
return
0
;
}
static
void
d_mount
(
struct
dentry
*
covers
,
struct
dentry
*
dentry
)
...
...
@@ -599,8 +608,7 @@ static int do_umount(kdev_t dev,int unmount_root)
quota_off
(
dev
,
-
1
);
fsync_dev
(
dev
);
retval
=
do_remount_sb
(
sb
,
MS_RDONLY
,
0
);
if
(
retval
)
return
retval
;
return
retval
;
}
return
0
;
}
...
...
@@ -611,15 +619,25 @@ static int do_umount(kdev_t dev,int unmount_root)
* too bad there are no quotas running anymore. Turn them on again by hand.
*/
quota_off
(
dev
,
-
1
);
if
(
!
fs_may_umount
(
sb
,
sb
->
s_root
))
return
-
EBUSY
;
/* clean up dcache .. */
d_umount
(
sb
->
s_root
);
sb
->
s_root
=
NULL
;
/*
* Shrink dcache, then fsync. This guarantees that if the
* filesystem is quiescent at this point, then (a) only the
* root entry should be in use and (b) that root entry is
* clean.
*/
shrink_dcache
();
fsync_dev
(
dev
);
retval
=
d_umount
(
sb
);
if
(
retval
)
return
retval
;
/* Forget any inodes */
invalidate_inodes
(
dev
);
if
(
invalidate_inodes
(
sb
))
{
printk
(
"VFS: Busy inodes after unmount. "
"Self-destruct in 5 seconds. Bye-bye..
\n
"
);
}
if
(
sb
->
s_op
)
{
if
(
sb
->
s_op
->
write_super
&&
sb
->
s_dirt
)
...
...
@@ -636,9 +654,14 @@ static int umount_dev(kdev_t dev)
int
retval
;
struct
inode
*
inode
=
get_empty_inode
();
retval
=
-
ENOMEM
;
if
(
!
inode
)
goto
out
;
inode
->
i_rdev
=
dev
;
retval
=
-
ENXIO
;
if
(
MAJOR
(
dev
)
>=
MAX_BLKDEV
)
return
-
ENXIO
;
goto
out_iput
;
fsync_dev
(
dev
);
retval
=
do_umount
(
dev
,
0
);
...
...
@@ -649,7 +672,9 @@ static int umount_dev(kdev_t dev)
put_unnamed_dev
(
dev
);
}
}
out_iput:
iput
(
inode
);
out:
return
retval
;
}
...
...
@@ -1118,6 +1143,8 @@ __initfunc(static int do_change_root(kdev_t new_root_dev,const char *put_old))
dput
(
dir_d
);
error
=
-
ENOTDIR
;
}
printk
(
"do_change_root: old root d_count=%d
\n
"
,
old_root
->
d_count
);
dput
(
old_root
);
dput
(
old_pwd
);
if
(
error
)
{
int
umount_error
;
...
...
@@ -1133,15 +1160,15 @@ __initfunc(static int do_change_root(kdev_t new_root_dev,const char *put_old))
}
remove_vfsmnt
(
old_root_dev
);
vfsmnt
=
add_vfsmnt
(
old_root_dev
,
"/dev/root.old"
,
put_old
);
if
(
!
vfsmnt
)
printk
(
KERN_CRIT
"Trouble: add_vfsmnt failed
\n
"
);
else
{
if
(
vfsmnt
)
{
vfsmnt
->
mnt_sb
=
old_root
->
d_inode
->
i_sb
;
d_mount
(
dir_d
,
vfsmnt
->
mnt_sb
->
s_root
);
vfsmnt
->
mnt_flags
=
vfsmnt
->
mnt_sb
->
s_flags
;
d_mount
(
dir_d
,
old_root
);
return
0
;
}
d_umount
(
old_root
);
d
_mount
(
dir_d
,
old_root
);
return
0
;
printk
(
KERN_CRIT
"Trouble: add_vfsmnt failed
\n
"
);
d
put
(
old_root
);
return
-
ENOMEM
;
}
int
change_root
(
kdev_t
new_root_dev
,
const
char
*
put_old
)
...
...
fs/vfat/namei.c
View file @
6efe5c37
...
...
@@ -1413,7 +1413,7 @@ int vfat_rename(struct inode *old_dir,struct dentry *old_dentry,
iput
(
new_inode
);
if
(
new_is_dir
)
{
PRINTK
((
"vfat_rename 7
\n
"
));
res
=
vfat_rmdirx
(
new_dir
,
&
new_dentry
);
res
=
vfat_rmdirx
(
new_dir
,
new_dentry
);
PRINTK
((
"vfat_rename 8
\n
"
));
if
(
res
<
0
)
goto
rename_done
;
}
else
{
...
...
include/asm-i386/pgtable.h
View file @
6efe5c37
...
...
@@ -201,6 +201,7 @@ static inline void flush_tlb_range(struct mm_struct *mm,
#define _PAGE_PRESENT 0x001
#define _PAGE_RW 0x002
#define _PAGE_USER 0x004
#define _PAGE_WT 0x008
#define _PAGE_PCD 0x010
#define _PAGE_ACCESSED 0x020
#define _PAGE_DIRTY 0x040
...
...
include/linux/dcache.h
View file @
6efe5c37
...
...
@@ -50,9 +50,24 @@ struct dentry {
struct
list_head
d_lru
;
/* d_count = 0 LRU list */
struct
qstr
d_name
;
unsigned
long
d_time
;
/* used by d_revalidate */
struct
dentry_operations
*
d_op
;
};
struct
dentry_operations
{
int
(
*
d_revalidate
)(
struct
dentry
*
);
int
(
*
d_hash
)
(
struct
dentry
*
,
struct
qstr
*
);
int
(
*
d_compare
)
(
struct
dentry
*
,
struct
qstr
*
,
struct
qstr
*
);
};
/* the dentry parameter passed to d_hash and d_compare is the parent
* directory of the entries to be compared. It is used in case these
* functions need any directory specific information for determining
* equivalency classes. Using the dentry itself might not work, as it
* might be a negative dentry which has no information associated with
* it */
/* d_flags entries */
#define DCACHE_AUTOFS_PENDING 0x0001
/* autofs: "under construction" */
...
...
include/linux/fs.h
View file @
6efe5c37
...
...
@@ -673,7 +673,7 @@ extern inline void mark_buffer_dirty(struct buffer_head * bh, int flag)
}
extern
int
check_disk_change
(
kdev_t
dev
);
extern
int
invalidate_inodes
(
kdev_t
dev
);
extern
int
invalidate_inodes
(
struct
super_block
*
sb
);
extern
void
invalidate_inode_pages
(
struct
inode
*
);
extern
void
invalidate_buffers
(
kdev_t
dev
);
extern
int
floppy_is_wp
(
int
minor
);
...
...
include/linux/pci.h
View file @
6efe5c37
...
...
@@ -221,6 +221,9 @@
*/
#define PCI_VENDOR_ID_COMPAQ 0x0e11
#define PCI_DEVICE_ID_COMPAQ_1280 0x3033
#define PCI_DEVICE_ID_COMPAQ_NETELL100 0xae32
#define PCI_DEVICE_ID_COMPAQ_NETELL10 0xae34
#define PCI_DEVICE_ID_COMPAQ_NETFLEX3 0xae35
#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130
#define PCI_VENDOR_ID_NCR 0x1000
...
...
@@ -247,6 +250,7 @@
#define PCI_DEVICE_ID_VLSI_82C593 0x0006
#define PCI_DEVICE_ID_VLSI_82C594 0x0007
#define PCI_DEVICE_ID_VLSI_82C597 0x0009
#define PCI_DEVICE_ID_VLSI_VAS96011 0x0702
#define PCI_VENDOR_ID_ADL 0x1005
#define PCI_DEVICE_ID_ADL_2301 0x2301
...
...
@@ -283,13 +287,17 @@
#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8
#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac
#define PCI_DEVICE_ID_CIRRUS_5446 0x00b8
#define PCI_DEVICE_ID_CIRRUS_5480 0x00bc
#define PCI_DEVICE_ID_CIRRUS_5464 0x00d4
#define PCI_DEVICE_ID_CIRRUS_5465 0x00d6
#define PCI_DEVICE_ID_CIRRUS_6729 0x1100
#define PCI_DEVICE_ID_CIRRUS_6832 0x1110
#define PCI_DEVICE_ID_CIRRUS_7542 0x1200
#define PCI_DEVICE_ID_CIRRUS_7543 0x1202
#define PCI_DEVICE_ID_CIRRUS_7541 0x1204
#define PCI_VENDOR_ID_IBM 0x1014
#define PCI_DEVICE_ID_IBM_FIRE_CORAL 0x000a
#define PCI_DEVICE_ID_IBM_82G2675 0x001d
#define PCI_DEVICE_ID_IBM_82351 0x0022
...
...
@@ -312,6 +320,7 @@
#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518
#define PCI_DEVICE_ID_MATROX_MIL 0x0519
#define PCI_DEVICE_ID_MATROX_MYS 0x051A
#define PCI_DEVICE_ID_MATROX_MIL_2 0x051b
#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10
#define PCI_VENDOR_ID_CT 0x102c
...
...
@@ -334,6 +343,7 @@
#define PCI_DEVICE_ID_SI_501 0x0406
#define PCI_DEVICE_ID_SI_496 0x0496
#define PCI_DEVICE_ID_SI_601 0x0601
#define PCI_DEVICE_ID_SI_5107 0x5107
#define PCI_DEVICE_ID_SI_5511 0x5511
#define PCI_DEVICE_ID_SI_5513 0x5513
#define PCI_DEVICE_ID_SI_5571 0x5571
...
...
@@ -366,6 +376,10 @@
#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040
#define PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT 0x8130
#define PCI_VENDOR_ID_TI 0x104c
#define PCI_DEVICE_ID_TI_PCI1130 0xac12
#define PCI_DEVICE_ID_TI_PCI1131 0xac15
#define PCI_VENDOR_ID_OAK 0x104e
#define PCI_DEVICE_ID_OAK_OTI107 0x0107
...
...
@@ -381,6 +395,11 @@
#define PCI_VENDOR_ID_PROMISE 0x105a
#define PCI_DEVICE_ID_PROMISE_5300 0x5300
#define PCI_VENDOR_ID_APPLE 0x106b
#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001
#define PCI_DEVICE_ID_APPLE_GC 0x0002
#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e
#define PCI_VENDOR_ID_N9 0x105d
#define PCI_DEVICE_ID_N9_I128 0x2309
#define PCI_DEVICE_ID_N9_I128_2 0x2339
...
...
@@ -415,10 +434,18 @@
#define PCI_VENDOR_ID_FOREX 0x1083
#define PCI_VENDOR_ID_OLICOM 0x108d
#define PCI_DEVICE_ID_OLICOM_OC3136 0x0001
#define PCI_DEVICE_ID_OLICOM_OC2315 0x0011
#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012
#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013
#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014
#define PCI_DEVICE_ID_OLICOM_OC6151 0x0021
#define PCI_VENDOR_ID_CMD 0x1095
#define PCI_DEVICE_ID_CMD_640 0x0640
#define PCI_DEVICE_ID_CMD_643 0x0643
#define PCI_DEVICE_ID_CMD_646 0x0646
#define PCI_DEVICE_ID_CMD_670 0x0670
#define PCI_VENDOR_ID_VISION 0x1098
#define PCI_DEVICE_ID_VISION_QD8500 0x0001
...
...
@@ -438,6 +465,9 @@
#define PCI_DEVICE_ID_WINBOND_82C105 0x0105
#define PCI_DEVICE_ID_WINBOND_83C553 0x0565
#define PCI_VENDOR_ID_DATABOOK 0x10b3
#define PCI_DEVICE_ID_DATABOOK_87144 0xb106
#define PCI_VENDOR_ID_3COM 0x10b7
#define PCI_DEVICE_ID_3COM_3C590 0x5900
#define PCI_DEVICE_ID_3COM_3C595TX 0x5950
...
...
@@ -447,6 +477,8 @@
#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001
#define PCI_DEVICE_ID_3COM_3C905TX 0x9050
#define PCI_VENDOR_ID_SMC 0x10b8
#define PCI_VENDOR_ID_AL 0x10b9
#define PCI_DEVICE_ID_AL_M1445 0x1445
#define PCI_DEVICE_ID_AL_M1449 0x1449
...
...
@@ -457,8 +489,11 @@
#define PCI_DEVICE_ID_AL_M1513 0x1513
#define PCI_DEVICE_ID_AL_M4803 0x5215
#define PCI_VENDOR_ID_MITSUBISHI 0x10ba
#define PCI_VENDOR_ID_NEOMAGIC 0x10c8
#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2070 0x0001
#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128V 0x0002
#define PCI_VENDOR_ID_ASP 0x10cd
#define PCI_DEVICE_ID_ASP_ABP940 0x1200
...
...
@@ -487,6 +522,10 @@
#define PCI_VENDOR_ID_REALTEK 0x10ec
#define PCI_DEVICE_ID_REALTEK_8029 0x8029
#define PCI_DEVICE_ID_REALTEK_8129 0x8129
#define PCI_VENDOR_ID_TRUEVISION 0x10fa
#define PCI_DEVICE_ID_TRUEVISION_T1000 0x000c
#define PCI_VENDOR_ID_INIT 0x1101
#define PCI_DEVICE_ID_INIT_320P 0x9100
...
...
@@ -498,6 +537,7 @@
#define PCI_DEVICE_ID_VIA_82C576 0x0576
#define PCI_DEVICE_ID_VIA_82C585 0x0585
#define PCI_DEVICE_ID_VIA_82C586 0x0586
#define PCI_DEVICE_ID_VIA_82C926 0x0926
#define PCI_DEVICE_ID_VIA_82C416 0x1571
#define PCI_VENDOR_ID_VORTEX 0x1119
...
...
@@ -527,6 +567,9 @@
#define PCI_VENDOR_ID_IMAGINGTECH 0x112f
#define PCI_DEVICE_ID_IMAGINGTECH_ICPCI 0x0000
#define PCI_VENDOR_ID_PHILIPS 0x1131
#define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146
#define PCI_VENDOR_ID_PLX 0x113c
#define PCI_DEVICE_ID_PLX_9060 0x0001
...
...
@@ -543,21 +586,35 @@
#define PCI_VENDOR_ID_MUTECH 0x1159
#define PCI_DEVICE_ID_MUTECH_MV1000 0x0001
#define PCI_VENDOR_ID_RENDITION 0x1163
#define PCI_DEVICE_ID_RENDITION_VERITE 0x0001
#define PCI_VENDOR_ID_TOSHIBA 0x1179
#define PCI_DEVICE_ID_TOSHIBA_601 0x0601
#define PCI_VENDOR_ID_RICOH 0x1180
#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466
#define PCI_VENDOR_ID_ZEITNET 0x1193
#define PCI_DEVICE_ID_ZEITNET_1221 0x0001
#define PCI_DEVICE_ID_ZEITNET_1225 0x0002
#define PCI_VENDOR_ID_OMEGA 0x119b
#define PCI_DEVICE_ID_OMEGA_PCMCIA 0x1221
#define PCI_DEVICE_ID_OMEGA_82C092G 0x1221
#define PCI_VENDOR_ID_NP 0x11bc
#define PCI_DEVICE_ID_NP_PCI_FDDI 0x0001
#define PCI_VENDOR_ID_SPECIALIX 0x11cb
#define PCI_DEVICE_ID_SPECIALIX_XIO 0x4000
#define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000
#define PCI_VENDOR_ID_IKON 0x11d5
#define PCI_DEVICE_ID_IKON_10115 0x0115
#define PCI_DEVICE_ID_IKON_10117 0x0117
#define PCI_VENDOR_ID_ZORAN 0x11de
#define PCI_DEVICE_ID_ZORAN_36057 0x6057
#define PCI_DEVICE_ID_ZORAN_36120 0x6120
#define PCI_VENDOR_ID_COMPEX 0x11f6
...
...
@@ -584,7 +641,7 @@
#define PCI_VENDOR_ID_OPTIBASE 0x1255
#define PCI_DEVICE_ID_OPTIBASE_FORGE 0x1110
#define PCI_DEVICE_ID_OPTIBASE_FUSION 0x1210
#define PCI_DEVICE_ID_OPTIBASE_VPLEX 0x21
2
0
#define PCI_DEVICE_ID_OPTIBASE_VPLEX 0x21
1
0
#define PCI_DEVICE_ID_OPTIBASE_VPLEXCC 0x2120
#define PCI_DEVICE_ID_OPTIBASE_VQUEST 0x2130
...
...
@@ -596,6 +653,7 @@
#define PCI_VENDOR_ID_3DLABS 0x3d3d
#define PCI_DEVICE_ID_3DLABS_300SX 0x0001
#define PCI_DEVICE_ID_3DLABS_500TX 0x0002
#define PCI_DEVICE_ID_3DLABS_DELTA 0x0003
#define PCI_DEVICE_ID_3DLABS_PERMEDIA 0x0004
...
...
@@ -616,6 +674,9 @@
#define PCI_DEVICE_ID_S3_964_1 0x88d0
#define PCI_DEVICE_ID_S3_964_2 0x88d1
#define PCI_DEVICE_ID_S3_968 0x88f0
#define PCI_DEVICE_ID_S3_TRIO64V2 0x8901
#define PCI_DEVICE_ID_S3_PLATO_PXG 0x8902
#define PCI_DEVICE_ID_S3_ViRGE_DXGX 0x8a01
#define PCI_VENDOR_ID_INTEL 0x8086
#define PCI_DEVICE_ID_INTEL_82375 0x0482
...
...
include/net/tcp.h
View file @
6efe5c37
...
...
@@ -60,6 +60,22 @@ static __inline__ int tcp_bhashfn(__u16 lport)
return
(
lport
^
(
lport
>>
7
))
&
(
TCP_BHTABLE_SIZE
-
1
);
}
/* Find the next port that hashes h that is larger than lport.
* If you change the hash, change this function to match, or you will
* break TCP port selection. This function must also NOT wrap around
* when the next number exceeds the largest possible port (2^16-1).
*/
static
__inline__
int
tcp_bhashnext
(
__u16
short
lport
,
__u16
h
)
{
__u32
s
;
/* don't change this to a smaller type! */
s
=
(
lport
^
(
h
^
tcp_bhashfn
(
lport
)));
if
(
s
>
lport
)
return
s
;
s
=
lport
+
TCP_BHTABLE_SIZE
;
return
(
s
^
(
h
^
tcp_bhashfn
(
s
)));
}
static
__inline__
int
tcp_sk_bhashfn
(
struct
sock
*
sk
)
{
__u16
lport
=
sk
->
num
;
...
...
kernel/fork.c
View file @
6efe5c37
...
...
@@ -266,6 +266,7 @@ static inline int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
init_new_context
(
mm
);
mm
->
count
=
1
;
mm
->
def_flags
=
0
;
mm
->
mmap_sem
=
MUTEX
;
/* It has not run yet, so cannot be present in anyone's
* cache or tlb.
...
...
kernel/ksyms.c
View file @
6efe5c37
...
...
@@ -67,6 +67,7 @@ extern unsigned char aux_device_present, kbd_read_mask;
#include <asm/irq.h>
#ifdef __SMP__
#include <linux/smp.h>
#include <linux/smp_lock.h>
#endif
extern
char
*
get_options
(
char
*
str
,
int
*
ints
);
...
...
@@ -281,6 +282,7 @@ EXPORT_SYMBOL(timer_table);
/* Various random spinlocks we want to export */
EXPORT_SYMBOL
(
tqueue_lock
);
EXPORT_SYMBOL
(
waitqueue_lock
);
EXPORT_SYMBOL
(
lk_lockmsg
);
#endif
/* autoirq from drivers/net/auto_irq.c */
...
...
mm/slab.c
View file @
6efe5c37
...
...
@@ -1582,6 +1582,12 @@ __kmem_cache_free(kmem_cache_t *cachep, const void *objp)
}
else
kmem_report_free_err
(
"Bad obj addr"
,
objp
,
cachep
);
spin_unlock_irqrestore
(
&
cachep
->
c_spinlock
,
save_flags
);
#if 1
/* FORCE A KERNEL DUMP WHEN THIS HAPPENS. SPEAK IN ALL CAPS. GET THE CALL CHAIN. */
*
(
int
*
)
0
=
0
;
#endif
return
;
null_addr:
kmem_report_free_err
(
"NULL ptr"
,
objp
,
cachep
);
...
...
@@ -1624,7 +1630,7 @@ kfree(const void *objp)
goto
null_ptr
;
nr
=
MAP_NR
(
objp
);
if
(
nr
>=
max_mapnr
)
goto
null
_ptr
;
goto
bad
_ptr
;
/* Assume we own the page structure - hence no locking.
* If someone is misbehaving (eg. someone calling us with a bad
...
...
@@ -1647,8 +1653,15 @@ kfree(const void *objp)
return
;
}
}
null
_ptr:
bad
_ptr:
printk
(
KERN_ERR
"kfree: Bad obj %p
\n
"
,
objp
);
#if 1
/* FORCE A KERNEL DUMP WHEN THIS HAPPENS. SPEAK IN ALL CAPS. GET THE CALL CHAIN. */
*
(
int
*
)
0
=
0
;
#endif
null_ptr:
return
;
}
...
...
net/ipv4/tcp_ipv4.c
View file @
6efe5c37
...
...
@@ -158,49 +158,58 @@ unsigned short tcp_good_socknum(void)
int
retval
=
0
,
i
,
end
,
bc
;
SOCKHASH_LOCK
();
i
=
tcp_bhashfn
(
start
);
end
=
i
+
TCP_BHTABLE_SIZE
;
bc
=
binding_contour
;
do
{
struct
sock
*
sk
=
tcp_bound_hash
[
tcp_bhashfn
(
i
)];
if
(
!
sk
)
{
retval
=
(
start
+
i
);
start
=
(
retval
+
1
);
/* Check for decreasing load. */
if
(
bc
!=
0
)
binding_contour
=
0
;
goto
done
;
}
else
{
int
j
=
0
;
do
{
sk
=
sk
->
bind_next
;
}
while
(
++
j
<
size
&&
sk
);
if
(
j
<
size
)
{
best
=
(
start
+
i
);
size
=
j
;
if
(
bc
&&
size
<=
bc
)
{
start
=
best
+
1
;
goto
verify
;
}
}
}
}
while
(
++
i
!=
end
);
/* Socket load is increasing, adjust our load average. */
binding_contour
=
size
;
i
=
tcp_bhashfn
(
start
);
end
=
i
+
TCP_BHTABLE_SIZE
;
bc
=
binding_contour
;
do
{
struct
sock
*
sk
=
tcp_bound_hash
[
i
&
(
TCP_BHTABLE_SIZE
-
1
)];
if
(
!
sk
)
{
/* find the smallest value no smaller than start
* that has this hash value.
*/
retval
=
tcp_bhashnext
(
start
-
1
,
i
&
(
TCP_BHTABLE_SIZE
-
1
));
/* Check for decreasing load. */
if
(
bc
!=
0
)
binding_contour
=
0
;
goto
done
;
}
else
{
int
j
=
0
;
do
{
sk
=
sk
->
bind_next
;
}
while
(
++
j
<
size
&&
sk
);
if
(
j
<
size
)
{
best
=
i
&
(
TCP_BHTABLE_SIZE
-
1
);
size
=
j
;
if
(
bc
&&
size
<=
bc
)
goto
verify
;
}
}
}
while
(
++
i
!=
end
);
i
=
best
;
/* Socket load is increasing, adjust our load average. */
binding_contour
=
size
;
verify:
if
(
size
<
binding_contour
)
binding_contour
=
size
;
if
(
best
>
32767
)
best
-=
(
32768
-
PROT_SOCK
);
if
(
size
<
binding_contour
)
binding_contour
=
size
;
retval
=
tcp_bhashnext
(
start
-
1
,
i
);
best
=
retval
;
/* mark the starting point to avoid infinite loops */
while
(
tcp_lport_inuse
(
retval
))
{
retval
=
tcp_bhashnext
(
retval
,
i
);
if
(
retval
>
32767
)
/* Upper bound */
retval
=
tcp_bhashnext
(
PROT_SOCK
,
i
);
if
(
retval
==
best
)
{
/* This hash chain is full. No answer. */
retval
=
0
;
break
;
}
}
while
(
tcp_lport_inuse
(
best
))
best
+=
TCP_BHTABLE_SIZE
;
retval
=
best
;
done:
if
(
start
>
32767
)
start
-=
(
32768
-
PROT_SOCK
);
start
=
(
retval
+
1
);
if
(
start
>
32767
||
start
<
PROT_SOCK
)
start
=
PROT_SOCK
;
SOCKHASH_UNLOCK
();
return
retval
;
...
...
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