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
40820e9a
Commit
40820e9a
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 1.1.90
parent
004b42c6
Changes
50
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
1836 additions
and
1671 deletions
+1836
-1671
CREDITS
CREDITS
+2
-2
Makefile
Makefile
+2
-2
arch/i386/config.in
arch/i386/config.in
+1
-1
arch/i386/kernel/ldt.c
arch/i386/kernel/ldt.c
+1
-0
arch/i386/kernel/signal.c
arch/i386/kernel/signal.c
+1
-0
arch/i386/kernel/traps.c
arch/i386/kernel/traps.c
+1
-10
arch/sparc/kernel/ioport.c
arch/sparc/kernel/ioport.c
+1
-1
arch/sparc/mm/init.c
arch/sparc/mm/init.c
+1
-1
drivers/block/README.fd
drivers/block/README.fd
+56
-2
drivers/block/aztcd.c
drivers/block/aztcd.c
+1
-1
drivers/block/floppy.c
drivers/block/floppy.c
+148
-78
drivers/char/ChangeLog
drivers/char/ChangeLog
+0
-28
drivers/char/cyclades.c
drivers/char/cyclades.c
+3
-3
drivers/char/keyboard.c
drivers/char/keyboard.c
+11
-11
drivers/char/n_tty.c
drivers/char/n_tty.c
+1
-1
drivers/char/serial.c
drivers/char/serial.c
+6
-48
drivers/char/tty_ioctl.c
drivers/char/tty_ioctl.c
+3
-3
drivers/net/3c501.c
drivers/net/3c501.c
+12
-10
drivers/net/Space.c
drivers/net/Space.c
+1
-1
drivers/net/de600.c
drivers/net/de600.c
+3
-4
drivers/net/de620.c
drivers/net/de620.c
+3
-4
drivers/net/ni52.c
drivers/net/ni52.c
+8
-8
drivers/net/plip.c
drivers/net/plip.c
+816
-726
drivers/scsi/eata.c
drivers/scsi/eata.c
+22
-19
drivers/scsi/eata.h
drivers/scsi/eata.h
+12
-12
drivers/scsi/eata_dma.h
drivers/scsi/eata_dma.h
+1
-1
drivers/scsi/hosts.c
drivers/scsi/hosts.c
+6
-25
drivers/scsi/script_asm.pl
drivers/scsi/script_asm.pl
+10
-9
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+418
-430
drivers/scsi/scsi.h
drivers/scsi/scsi.h
+19
-3
drivers/scsi/sr.c
drivers/scsi/sr.c
+7
-12
drivers/scsi/sr.h
drivers/scsi/sr.h
+1
-0
drivers/scsi/sr_ioctl.c
drivers/scsi/sr_ioctl.c
+2
-5
drivers/scsi/u14-34f.c
drivers/scsi/u14-34f.c
+14
-11
drivers/scsi/u14-34f.h
drivers/scsi/u14-34f.h
+5
-6
drivers/sound/Readme
drivers/sound/Readme
+9
-3
fs/isofs/inode.c
fs/isofs/inode.c
+41
-30
fs/nfs/sock.c
fs/nfs/sock.c
+1
-4
include/asm-i386/bugs.h
include/asm-i386/bugs.h
+1
-1
include/asm-sparc/cprefix.h
include/asm-sparc/cprefix.h
+1
-1
include/linux/pci.h
include/linux/pci.h
+35
-11
include/linux/serial.h
include/linux/serial.h
+3
-15
include/linux/serial_reg.h
include/linux/serial_reg.h
+0
-24
include/linux/tty.h
include/linux/tty.h
+1
-1
ipc/sem.c
ipc/sem.c
+2
-2
kernel/ksyms.c
kernel/ksyms.c
+6
-0
mm/memory.c
mm/memory.c
+124
-91
net/inet/icmp.c
net/inet/icmp.c
+4
-1
net/inet/ip_fw.c
net/inet/ip_fw.c
+1
-5
net/inet/tcp.c
net/inet/tcp.c
+8
-4
No files found.
CREDITS
View file @
40820e9a
...
...
@@ -719,8 +719,8 @@ D: Dosemu
N: Hannu Savolainen
E: hannu@voxware.pp.fi
D: Kernel sound drivers
S:
Pallaksentie 4 A 2
S: 009
7
0 Helsinki
S:
Hiekkalaiturintie 3 A 8
S: 009
8
0 Helsinki
S: Finland
N: Peter De Schrijver
...
...
Makefile
View file @
40820e9a
VERSION
=
1
PATCHLEVEL
=
1
SUBLEVEL
=
89
SUBLEVEL
=
90
ARCH
=
i386
...
...
@@ -217,7 +217,7 @@ modules_install:
\
ls
*
.o
>
.allmods
;
\
echo
$$
MODULES |
tr
' '
'\n'
|
sort
|
comm
-23
.allmods -
>
.misc
;
\
i
nst_mod .misc misc
;
\
i
f
[
-s
.misc
]
;
then
inst_mod .misc misc
;
fi
;
\
rm
-f
.misc .allmods
;
\
)
...
...
arch/i386/config.in
View file @
40820e9a
...
...
@@ -210,7 +210,7 @@ bool '/proc filesystem support' CONFIG_PROC_FS y
if [ "$CONFIG_INET" = "y" ]; then
bool 'NFS filesystem support' CONFIG_NFS_FS y
fi
if [ "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_CDU31A" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_BLK_DEV_IDECD" = "y" ]; then
if [ "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_CDU31A" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_BLK_DEV_IDECD" = "y"
-o "$CONFIG_AZTCD" = "y"
]; then
bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y
else
bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS n
...
...
arch/i386/kernel/ldt.c
View file @
40820e9a
...
...
@@ -66,6 +66,7 @@ static int write_ldt(void * ptr, unsigned long bytecount)
if
(
task
[
i
]
==
current
)
{
if
(
!
(
current
->
ldt
=
(
struct
desc_struct
*
)
vmalloc
(
LDT_ENTRIES
*
LDT_ENTRY_SIZE
)))
return
-
ENOMEM
;
memset
(
current
->
ldt
,
0
,
LDT_ENTRIES
*
LDT_ENTRY_SIZE
);
set_ldt_desc
(
gdt
+
(
i
<<
1
)
+
FIRST_LDT_ENTRY
,
current
->
ldt
,
LDT_ENTRIES
);
load_ldt
(
i
);
}
...
...
arch/i386/kernel/signal.c
View file @
40820e9a
...
...
@@ -254,6 +254,7 @@ asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs)
}
regs
->
esp
=
(
unsigned
long
)
frame
;
regs
->
eip
=
eip
;
/* "return" to the first handler */
regs
->
eflags
&=
~
TF_MASK
;
current
->
tss
.
trap_no
=
current
->
tss
.
error_code
=
0
;
return
1
;
}
arch/i386/kernel/traps.c
View file @
40820e9a
...
...
@@ -178,23 +178,14 @@ DO_ERROR(17, SIGSEGV, "alignment check", alignment_check, current)
asmlinkage
void
do_general_protection
(
struct
pt_regs
*
regs
,
long
error_code
)
{
int
signr
=
SIGSEGV
;
if
(
regs
->
eflags
&
VM_MASK
)
{
handle_vm86_fault
((
struct
vm86_regs
*
)
regs
,
error_code
);
return
;
}
die_if_kernel
(
"general protection"
,
regs
,
error_code
);
switch
(
get_seg_byte
(
regs
->
cs
,
(
char
*
)
regs
->
eip
))
{
case
0xCD
:
/* INT */
case
0xF4
:
/* HLT */
case
0xFA
:
/* CLI */
case
0xFB
:
/* STI */
signr
=
SIGILL
;
}
current
->
tss
.
error_code
=
error_code
;
current
->
tss
.
trap_no
=
13
;
send_sig
(
signr
,
current
,
1
);
send_sig
(
SIGSEGV
,
current
,
1
);
}
asmlinkage
void
do_nmi
(
struct
pt_regs
*
regs
,
long
error_code
)
...
...
arch/sparc/kernel/ioport.c
View file @
40820e9a
/* ioport.c: I/O access on the Sparc. Work in progress.. Most of the things
* in this file are for the sole purpose of getting the kernel
* through
t
the compiler. :-)
* through the compiler. :-)
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
...
...
arch/sparc/mm/init.c
View file @
40820e9a
...
...
@@ -97,7 +97,7 @@ extern unsigned long free_area_init(unsigned long, unsigned long);
* unmaps the bootup page table (as we're now in KSEG, so we don't need it).
*
* The bootup sequence put the virtual page table into high memory: that
* means that we ca
h
change the L1 page table by just using VL1p below.
* means that we ca
n
change the L1 page table by just using VL1p below.
*/
unsigned
long
paging_init
(
unsigned
long
start_mem
,
unsigned
long
end_mem
)
...
...
drivers/block/README.fd
View file @
40820e9a
...
...
@@ -35,16 +35,70 @@ restore the default behaviour.
Sets the bitmask of allowed drives to <mask>. By default, only units
0 and 1 of each floppy controller are allowed. This is done because
certain non-standard hardware (ASUS PCI motherboards) mess up the
keyboard when accessing units 2 or 3.
keyboard when accessing units 2 or 3. This option is somewhat
obsoleted by the cmos option.
floppy=all_drives
Sets the bitmask of allowed drives to all drives. Use this if you have
more than two drives connected to a floppy controller.
floppy=asus_pci
Sets the bitmask to allow only units 0 and 1. (The default)
floppy=daring
Tells the floppy driver that you have a well behaved floppy controller.
This allows more efficient and smoother operation, but may fail on
certain controllers. This may speed up certain operations.
floppy=0,daring
Tells the floppy driver that your floppy controller should be used
with caution.
floppy=one_fdc
Tells the floppy driver that you have only floppy controller (default)
floppy=two_fdc
floppy=<address>,two_fdc
Tells the floppy driver that you have two floppy controllers. The
second floppy controller is assumed to be at io address 0x370.
second floppy controller is assumed to be at <address>. If <address>
is not given, 0x370 is assumed.
floppy=thinkpad
Tells the floppy driver that you have a Thinkpad. Thinkpads use an
inverted convention for the disk change line.
floppy=0,thinkpad
Tells the floppy driver that you don't have a Thinkpad.
floppy=<drive>,<type>,cmos
Sets the cmos type of <drive> to <type>. Additionnaly, this drive is
allowed in the bitmask. This is useful if you have more than two
floppy drives (only two can be described in the physical cmos), or if
your BIOS uses non-standard CMOS types. The CMOS types are:
0 - unknown or not installed
1 - 5 1/4 DD
2 - 5 1/4 HD
3 - 3 1/2 DD
4 - 3 1/2 HD
5 - 3 1/2 ED
6 - 3 1/2 ED
(Note: there are two valid types for ED drives. This is because 5 was
initially chosen to represent floppy *tapes*, and 6 for ED drives.
AMI ignored this, and used 5 for ED drives. That's why the floppy
driver handles both)
Setting the CMOS to 0 for the first two drives (default) makes the
floppy driver read the physical cmos for those drives.
floppy=unexpected_interrupts
Print a warning message when an unexpected interrupt is received
(default behaviour)
floppy=no_unexpected_interrupts
floppy=L40SX
Don't print a message when an unexpected interrupt is received. This
is needed on IBM L40SX laptops in certain video modes. (There seems
to be an interaction between video and floppy. The unexpected interrupts
only affect performance, and can safely be ignored.)
Supporting utilities and additional documentation:
...
...
drivers/block/aztcd.c
View file @
40820e9a
...
...
@@ -638,7 +638,7 @@ azt_Play.end.min, azt_Play.end.sec, azt_Play.end.frame);
break
;
case
CDROMVOLCTRL
:
/* Volume control
* With my Aztech CD268-01A volume control does not work, I can only
turn the cannels on (any value !=0) or off (value==0). Maybe it
turn the c
h
annels on (any value !=0) or off (value==0). Maybe it
works better with your drive */
st
=
verify_area
(
VERIFY_READ
,(
void
*
)
arg
,
sizeof
(
volctrl
));
if
(
st
)
return
(
st
);
...
...
drivers/block/floppy.c
View file @
40820e9a
...
...
@@ -82,7 +82,6 @@
*/
#define CONFIG_FLOPPY_SANITY
#define CONFIG_FLOPPY_2_FDC
#undef CONFIG_FLOPPY_SILENT_DCL_CLEAR
#define REALLY_SLOW_IO
...
...
@@ -92,6 +91,9 @@
#include <linux/config.h>
/* do print messages for unexpected interupts */
static
int
print_unex
=
1
;
#ifndef FD_MODULE
/* the following is the mask of allowed drives. By default units 2 and
* 3 of both floppy controllers are disabled, because switching on the
...
...
@@ -148,14 +150,8 @@ static int initialising=1;
#define FLOPPY1_TYPE 0
#endif
#ifdef CONFIG_FLOPPY_2_FDC
#define N_FDC 2
#define N_DRIVE 8
#else
#define N_FDC 1
#define N_DRIVE 4
#endif
#define TYPE(x) ( ((x)>>2) & 0x1f )
#define DRIVE(x) ( ((x)&0x03) | (((x)&0x80 ) >> 5))
...
...
@@ -179,16 +175,16 @@ static int initialising=1;
#define USETF(x) (set_bit(x##_BIT, &UDRS->flags))
#define UTESTF(x) (test_bit(x##_BIT, &UDRS->flags))
#define DPRINT(x) printk(DEVICE_NAME "%d: " x,current_drive)
;
#define DPRINT(x) printk(DEVICE_NAME "%d: " x,current_drive)
#define DPRINT1(x,x1) \
printk(DEVICE_NAME "%d: " x,current_drive,(x1))
;
printk(DEVICE_NAME "%d: " x,current_drive,(x1))
#define DPRINT2(x,x1,x2) \
printk(DEVICE_NAME "%d: " x,current_drive,(x1),(x2))
;
printk(DEVICE_NAME "%d: " x,current_drive,(x1),(x2))
#define DPRINT3(x,x1,x2,x3) \
printk(DEVICE_NAME "%d: " x,current_drive,(x1),(x2),(x3))
;
printk(DEVICE_NAME "%d: " x,current_drive,(x1),(x2),(x3))
/* read/write */
#define COMMAND raw_cmd.cmd[0]
...
...
@@ -348,11 +344,8 @@ static struct floppy_struct floppy_type[32] = {
/* Auto-detection: Disk type used until the next media change occurs. */
struct
floppy_struct
*
current_type
[
N_DRIVE
]
=
{
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
#ifdef CONFIG_FLOPPY_2_FDC
,
NULL
,
NULL
,
NULL
,
NULL
#endif
};
/*
...
...
@@ -645,9 +638,7 @@ static void set_fdc(int drive)
current_drive
=
drive
;
}
set_dor
(
fdc
,
~
0
,
8
);
#ifdef CONFIG_FLOPPY_2_FDC
set_dor
(
1
-
fdc
,
~
8
,
0
);
#endif
if
(
FDCS
->
rawcmd
==
2
)
reset_fdc_info
(
1
);
if
(
inb_p
(
FD_STATUS
)
!=
STATUS_READY
)
...
...
@@ -713,14 +704,11 @@ static struct timer_list motor_off_timer[N_DRIVE] = {
{
NULL
,
NULL
,
0
,
0
,
motor_off_callback
},
{
NULL
,
NULL
,
0
,
1
,
motor_off_callback
},
{
NULL
,
NULL
,
0
,
2
,
motor_off_callback
},
{
NULL
,
NULL
,
0
,
3
,
motor_off_callback
}
#ifdef CONFIG_FLOPPY_2_FDC
,
{
NULL
,
NULL
,
0
,
3
,
motor_off_callback
},
{
NULL
,
NULL
,
0
,
4
,
motor_off_callback
},
{
NULL
,
NULL
,
0
,
5
,
motor_off_callback
},
{
NULL
,
NULL
,
0
,
6
,
motor_off_callback
},
{
NULL
,
NULL
,
0
,
7
,
motor_off_callback
}
#endif
};
/* schedules motor off */
...
...
@@ -1438,19 +1426,23 @@ static void unexpected_floppy_interrupt(void)
int
i
;
if
(
initialising
)
return
;
if
(
print_unex
){
DPRINT
(
"unexpected interrupt
\n
"
);
if
(
inr
>=
0
)
for
(
i
=
0
;
i
<
inr
;
i
++
)
printk
(
"%d %x
\n
"
,
i
,
reply_buffer
[
i
]
);
}
while
(
1
){
output_byte
(
FD_SENSEI
);
inr
=
result
();
if
(
inr
!=
2
)
break
;
if
(
print_unex
){
printk
(
"sensei
\n
"
);
for
(
i
=
0
;
i
<
inr
;
i
++
)
printk
(
"%d %x
\n
"
,
i
,
reply_buffer
[
i
]
);
}
}
FDCS
->
reset
=
1
;
}
...
...
@@ -2829,9 +2821,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
cnt
<
(
type
<<
2
)
+
4
;
cnt
++
)
floppy_sizes
[
cnt
]
=
#ifdef CONFIG_FLOPPY_2_FDC
floppy_sizes
[
cnt
+
0x80
]
=
#endif
floppy_type
[
type
].
size
>>
1
;
process_fd_request
();
for
(
cnt
=
0
;
cnt
<
N_DRIVE
;
cnt
++
){
...
...
@@ -2899,35 +2889,43 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
#undef IOCTL_ALLOWED
}
static
void
set_base_type
(
int
drive
,
int
code
)
{
if
(
code
>
0
&&
code
<=
NUMBER
(
default_drive_params
))
{
memcpy
((
char
*
)
UDP
,
(
char
*
)
(
&
default_drive_params
[
code
].
params
),
sizeof
(
struct
floppy_drive_params
));
printk
(
"fd%d is %s"
,
drive
,
default_drive_params
[
code
].
name
);
return
;
}
else
if
(
!
code
)
printk
(
"fd%d is not installed"
,
drive
);
else
printk
(
"fd%d is unknown type %d"
,
drive
,
code
);
}
static
void
config_types
(
void
)
{
int
first
=
1
;
int
drive
;
for
(
drive
=
0
;
drive
<
N_DRIVE
;
drive
++
){
/* default type for unidentifiable drives */
memcpy
((
char
*
)
UDP
,
(
char
*
)
(
&
default_drive_params
->
params
),
sizeof
(
struct
floppy_drive_params
));
}
/* read drive info out of physical cmos */
drive
=
0
;
if
(
!
UDP
->
cmos
)
UDP
->
cmos
=
FLOPPY0_TYPE
;
drive
=
1
;
if
(
!
UDP
->
cmos
&&
FLOPPY1_TYPE
)
UDP
->
cmos
=
FLOPPY1_TYPE
;
/* XXX */
/* additional physical CMOS drive detection should go here */
for
(
drive
=
0
;
drive
<
N_DRIVE
;
drive
++
){
if
(
UDP
->
cmos
>=
0
&&
UDP
->
cmos
<=
NUMBER
(
default_drive_params
))
memcpy
((
char
*
)
UDP
,
(
char
*
)
(
&
default_drive_params
[(
int
)
UDP
->
cmos
].
params
),
sizeof
(
struct
floppy_drive_params
));
if
(
UDP
->
cmos
){
if
(
first
)
printk
(
"Floppy drive(s): "
);
set_base_type
(
0
,
FLOPPY0_TYPE
);
if
(
FLOPPY1_TYPE
)
{
else
printk
(
", "
);
set_base_type
(
1
,
FLOPPY1_TYPE
);
first
=
0
;
if
(
UDP
->
cmos
>
0
){
ALLOWED_DRIVE_MASK
|=
1
<<
drive
;
printk
(
"fd%d is %s"
,
drive
,
default_drive_params
[(
int
)
UDP
->
cmos
].
name
);
}
else
printk
(
"fd%d is unknown type %d"
,
drive
,
UDP
->
cmos
);
}
}
if
(
!
first
)
printk
(
"
\n
"
);
}
...
...
@@ -3204,56 +3202,128 @@ static char get_fdc_version(void)
}
/* get_fdc_version */
/* lilo configuration */
static
void
invert_dcl
(
int
*
ints
)
/* we make the invert_dcl function global. One day, somebody might
want to centralize all thinkpad related options into one lilo option,
there are just so many thinpad related quirks! */
void
floppy_invert_dcl
(
int
*
ints
,
int
param
)
{
int
i
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
default_drive_params
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
default_drive_params
);
i
++
){
if
(
param
)
default_drive_params
[
i
].
params
.
flags
|=
0x80
;
else
default_drive_params
[
i
].
params
.
flags
&=
~
0x80
;
}
DPRINT
(
"Configuring drives for inverted dcl
\n
"
);
}
static
void
allow_drives
(
int
*
ints
)
static
void
daring
(
int
*
ints
,
int
param
)
{
if
(
ints
[
1
]
>=
1
){
ALLOWED_DRIVE_MASK
=
ints
[
1
];
DPRINT1
(
"setting allowed_drive_mask to 0x%x
\n
"
,
ints
[
1
]);
}
else
DPRINT
(
"allowed_drive_mask needs a parameter
\n
"
);
int
i
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
default_drive_params
);
i
++
){
if
(
param
){
default_drive_params
[
i
].
params
.
select_delay
=
0
;
default_drive_params
[
i
].
params
.
flags
|=
FD_SILENT_DCL_CLEAR
;
}
else
{
default_drive_params
[
i
].
params
.
select_delay
=
2
;
default_drive_params
[
i
].
params
.
flags
&=
~
FD_SILENT_DCL_CLEAR
;
}
}
DPRINT1
(
"Assuming %s floppy hardware
\n
"
,
param
?
"standard"
:
"broken"
);
}
#ifdef CONFIG_FLOPPY_2_FDC
static
void
twofdc
(
int
*
ints
)
static
void
allow_drives
(
int
*
ints
,
int
param
)
{
FDC2
=
0x370
;
DPRINT
(
"enabling second fdc at address 0x370
\n
"
);
ALLOWED_DRIVE_MASK
=
param
;
DPRINT1
(
"setting allowed_drive_mask to 0x%x
\n
"
,
param
);
}
static
void
fdc2_adr
(
int
*
ints
,
int
param
)
{
FDC2
=
param
;
if
(
param
)
DPRINT1
(
"enabling second fdc at address 0x%3x
\n
"
,
FDC2
);
else
DPRINT
(
"disabling second fdc
\n
"
);
}
static
void
unex
(
int
*
ints
,
int
param
)
{
print_unex
=
param
;
DPRINT1
(
"%sprinting messages for unexpected interrupts
\n
"
,
param
?
""
:
"not "
);
}
static
void
set_cmos
(
int
*
ints
,
int
dummy
)
{
int
current_drive
=
0
;
if
(
ints
[
0
]
!=
2
){
DPRINT
(
"wrong number of parameter for cmos
\n
"
);
return
;
}
current_drive
=
ints
[
1
];
if
(
current_drive
<
0
||
current_drive
>=
8
){
DPRINT
(
"bad drive for set_cmos
\n
"
);
return
;
}
if
(
ints
[
2
]
<=
0
||
ints
[
2
]
>=
NUMBER
(
default_drive_params
)){
DPRINT1
(
"bad cmos code %d
\n
"
,
ints
[
2
]);
return
;
}
DP
->
cmos
=
ints
[
2
];
DPRINT1
(
"setting cmos code to %d
\n
"
,
ints
[
2
]);
}
#endif
static
struct
param_table
{
char
*
name
;
void
(
*
fn
)(
int
*
ints
);
void
(
*
fn
)(
int
*
ints
,
int
param
);
int
def_param
;
}
config_params
[]
=
{
{
"allowed_drive_mask"
,
allow_drives
},
#ifdef CONFIG_FLOPPY_2_FDC
{
"two_fdc"
,
twofdc
},
#endif
{
"thinkpad"
,
invert_dcl
}
};
{
"allowed_drive_mask"
,
allow_drives
,
0xff
},
{
"all_drives"
,
allow_drives
,
0xff
},
{
"asus_pci"
,
allow_drives
,
0x33
},
{
"daring"
,
daring
,
1
},
{
"two_fdc"
,
fdc2_adr
,
0x370
},
{
"one_fdc"
,
fdc2_adr
,
0
},
{
"thinkpad"
,
floppy_invert_dcl
,
1
},
{
"cmos"
,
set_cmos
,
0
},
{
"unexpected_interrupts"
,
unex
,
1
},
{
"no_unexpected_interrupts"
,
unex
,
0
},
{
"L40SX"
,
unex
,
0
}
};
#define FLOPPY_SETUP
void
floppy_setup
(
char
*
str
,
int
*
ints
)
{
int
i
;
int
param
;
if
(
!
str
)
return
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
config_params
);
i
++
){
if
(
strcmp
(
str
,
config_params
[
i
].
name
)
==
0
){
config_params
[
i
].
fn
(
ints
);
if
(
ints
[
0
]
)
param
=
ints
[
1
];
else
param
=
config_params
[
i
].
def_param
;
config_params
[
i
].
fn
(
ints
,
param
);
return
;
}
}
printk
(
"unknown floppy parameter %s
\n
"
,
str
);
DPRINT1
(
"unknown floppy option %s
\n
"
,
str
);
DPRINT
(
"allowed options are:"
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
config_params
);
i
++
)
printk
(
" %s"
,
config_params
[
i
].
name
);
printk
(
"
\n
"
);
DPRINT
(
"Read linux/drivers/block/README.fd
\n
"
);
}
#define FLOPPY_SETUP
#ifdef FD_MODULE
static
...
...
drivers/char/ChangeLog
View file @
40820e9a
Thu Jan 26 09:02:49 1995 Theodore Y. Ts'o (tytso@rt-11)
* serial.c (rs_init, set_serial_info, get_serial_info, rs_close):
Support close_wait and close_wait2 in the serial driver.
This is helpful for slow devices (like serial plotters) so
that their outputs don't get flushed upon device close.
This has to be configurable because normally we don't want
ports to be hung up for long periods of time during a
close when they are not connected to a device, or the
device is powered off.
The default is to wait 30 seconds after shutting down the
receiver (to prevent echo wars). This is done by setting
close_wait=ASYNC_CLOSE_WAIT_NONE, close_wait2 = 3000. If
XON/XOFF handshaking is used, then the 30 second timeout
should happen before the receiver is shutdown; this is
done by reversing the values of close_wait and
close_wait2. In the case of a very slow device, the
timeouts for close_wait or close_wait2 should be lengthened.
If either value is set to 0, the kernel will wait forever
for all of the data to be transmitted.
Thu Jan 17 01:17:20 1995 Theodore Y. Ts'o (tytso@rt-11)
* serial.c (startup, change_speed, rs_init): Add support to detect
the StarTech 16650 chip. Treat it as a 16450 for now,
because of its FIFO bugs.
Thu Jan 5 21:21:57 1995 <dhinds@allegro.stanford.edu>
* serial.c: (receive_char): Added counter to prevent infinite loop
...
...
drivers/char/cyclades.c
View file @
40820e9a
...
...
@@ -1909,7 +1909,7 @@ cy_ioctl(struct tty_struct *tty, struct file * file,
ret_val
=
tty_check_change
(
tty
);
if
(
ret_val
)
return
ret_val
;
wait_until_sent
(
tty
,
0
);
tty_
wait_until_sent
(
tty
,
0
);
if
(
!
arg
)
send_break
(
info
,
HZ
/
4
);
/* 1/4 second */
break
;
...
...
@@ -1917,7 +1917,7 @@ cy_ioctl(struct tty_struct *tty, struct file * file,
ret_val
=
tty_check_change
(
tty
);
if
(
ret_val
)
return
ret_val
;
wait_until_sent
(
tty
,
0
);
tty_
wait_until_sent
(
tty
,
0
);
send_break
(
info
,
arg
?
arg
*
(
HZ
/
10
)
:
HZ
/
4
);
break
;
case
TIOCMBIS
:
...
...
@@ -2060,7 +2060,7 @@ cy_close(struct tty_struct * tty, struct file * filp)
if
(
info
->
flags
&
ASYNC_CALLOUT_ACTIVE
)
info
->
callout_termios
=
*
tty
->
termios
;
if
(
info
->
flags
&
ASYNC_INITIALIZED
)
wait_until_sent
(
tty
,
3000
);
/* 30 seconds timeout */
tty_
wait_until_sent
(
tty
,
3000
);
/* 30 seconds timeout */
shutdown
(
info
);
if
(
tty
->
driver
.
flush_buffer
)
tty
->
driver
.
flush_buffer
(
tty
);
...
...
drivers/char/keyboard.c
View file @
40820e9a
...
...
@@ -164,9 +164,10 @@ static inline void kb_wait(void)
{
int
i
;
for
(
i
=
0
;
i
<
0x10000
;
i
++
)
for
(
i
=
0
;
i
<
0x10000
0
;
i
++
)
if
((
inb_p
(
0x64
)
&
0x02
)
==
0
)
break
;
return
;
printk
(
"Keyboard timed out
\n
"
);
}
static
inline
void
send_cmd
(
unsigned
char
c
)
...
...
@@ -1164,15 +1165,14 @@ unsigned long kbd_init(unsigned long kmem_start)
bh_base
[
KEYBOARD_BH
].
routine
=
kbd_bh
;
request_irq
(
KEYBOARD_IRQ
,
keyboard_interrupt
,
0
,
"keyboard"
);
#ifdef __alpha__
/* enable keyboard interrupts */
outb
(
0x60
,
0x64
);
while
(
inb
(
0x64
)
&
2
)
/* nothing */
;
outb
(
0x1
,
0x60
);
while
(
inb
(
0x64
)
&
2
)
/* nothing */
;
if
(
!
send_data
(
0xf0
)
||
!
send_data
(
0x01
))
printk
(
"Scanmode 1 change failed
\n
"
);
/* enable keyboard interrupts, PC/AT mode */
kb_wait
();
outb
(
0x60
,
0x64
);
/* write PS/2 Mode Register */
kb_wait
();
outb
(
0x41
,
0x60
);
/* KCC | EKI */
kb_wait
();
if
(
!
send_data
(
0xf0
)
||
!
send_data
(
0x02
))
printk
(
"Scanmode 2 change failed
\n
"
);
#endif
mark_bh
(
KEYBOARD_BH
);
enable_bh
(
KEYBOARD_BH
);
...
...
drivers/char/n_tty.c
View file @
40820e9a
...
...
@@ -666,7 +666,7 @@ static void n_tty_set_termios(struct tty_struct *tty, struct termios * old)
static
void
n_tty_close
(
struct
tty_struct
*
tty
)
{
wait_until_sent
(
tty
,
0
);
tty_
wait_until_sent
(
tty
,
0
);
n_tty_flush_buffer
(
tty
);
if
(
tty
->
read_buf
)
{
free_page
((
unsigned
long
)
tty
->
read_buf
);
...
...
drivers/char/serial.c
View file @
40820e9a
...
...
@@ -877,15 +877,7 @@ static int startup(struct async_struct * info)
* Clear the FIFO buffers and disable them
* (they will be reenabled in change_speed())
*/
if
(
info
->
type
==
PORT_16650
)
{
serial_outp
(
info
,
UART_FCR
,
(
UART_FCR_CLEAR_RCVR
|
UART_FCR_CLEAR_XMIT
));
#if 0
info->xmit_fifo_size = 32;
#else
info
->
xmit_fifo_size
=
1
;
#endif
}
else
if
(
info
->
type
==
PORT_16550A
)
{
if
(
info
->
type
==
PORT_16550A
)
{
serial_outp
(
info
,
UART_FCR
,
(
UART_FCR_CLEAR_RCVR
|
UART_FCR_CLEAR_XMIT
));
info
->
xmit_fifo_size
=
16
;
...
...
@@ -1156,18 +1148,6 @@ static void change_speed(struct async_struct *info)
fcr
=
UART_FCR_ENABLE_FIFO
|
UART_FCR_TRIGGER_1
;
else
fcr
=
UART_FCR_ENABLE_FIFO
|
UART_FCR_TRIGGER_8
;
}
else
if
(
info
->
type
==
PORT_16650
)
{
/*
* On the 16650, we disable the FIFOs altogether
* because of a design bug in how the implement
* things. We could support it by completely changing
* how we handle the interrupt driver, but not today....
*
* N.B. Because there's no way to set a FIFO trigger
* at 1 char, we'd probably disable at speed below
* 2400 baud anyway...
*/
fcr
=
0
;
}
else
fcr
=
0
;
...
...
@@ -1424,8 +1404,6 @@ static int get_serial_info(struct async_struct * info,
tmp
.
flags
=
info
->
flags
;
tmp
.
baud_base
=
info
->
baud_base
;
tmp
.
close_delay
=
info
->
close_delay
;
tmp
.
closing_wait
=
info
->
closing_wait
;
tmp
.
closing_wait2
=
info
->
closing_wait2
;
tmp
.
custom_divisor
=
info
->
custom_divisor
;
tmp
.
hub6
=
info
->
hub6
;
memcpy_tofs
(
retinfo
,
&
tmp
,
sizeof
(
*
retinfo
));
...
...
@@ -1493,8 +1471,6 @@ static int set_serial_info(struct async_struct * info,
info
->
custom_divisor
=
new_serial
.
custom_divisor
;
info
->
type
=
new_serial
.
type
;
info
->
close_delay
=
new_serial
.
close_delay
;
info
->
closing_wait
=
new_serial
.
closing_wait
;
info
->
closing_wait2
=
new_serial
.
closing_wait2
;
release_region
(
info
->
port
,
8
);
if
(
change_port
||
change_irq
)
{
...
...
@@ -1722,7 +1698,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
retval
=
tty_check_change
(
tty
);
if
(
retval
)
return
retval
;
wait_until_sent
(
tty
,
0
);
tty_
wait_until_sent
(
tty
,
0
);
if
(
!
arg
)
send_break
(
info
,
HZ
/
4
);
/* 1/4 second */
return
0
;
...
...
@@ -1730,7 +1706,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
retval
=
tty_check_change
(
tty
);
if
(
retval
)
return
retval
;
wait_until_sent
(
tty
,
0
);
tty_
wait_until_sent
(
tty
,
0
);
send_break
(
info
,
arg
?
arg
*
(
HZ
/
10
)
:
HZ
/
4
);
return
0
;
case
TIOCGSOFTCAR
:
...
...
@@ -1895,8 +1871,6 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
info
->
normal_termios
=
*
tty
->
termios
;
if
(
info
->
flags
&
ASYNC_CALLOUT_ACTIVE
)
info
->
callout_termios
=
*
tty
->
termios
;
if
(
info
->
closing_wait
!=
ASYNC_CLOSING_WAIT_NONE
)
wait_until_sent
(
tty
,
info
->
closing_wait
);
/*
* At this point we stop accepting input. To do this, we
* disable the receive line status interrupts, and tell the
...
...
@@ -1907,7 +1881,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
info
->
read_status_mask
&=
~
UART_LSR_DR
;
if
(
info
->
flags
&
ASYNC_INITIALIZED
)
{
serial_out
(
info
,
UART_IER
,
info
->
IER
);
wait_until_sent
(
tty
,
info
->
closing_wait2
);
tty_wait_until_sent
(
tty
,
3000
);
/* 30 seconds timeout */
/*
* Before we drop DTR, make sure the UART transmitter
* has completely drained; this is especially
...
...
@@ -2355,10 +2329,6 @@ static void autoconfig(struct async_struct * info)
if
(
info
->
flags
&
ASYNC_AUTO_IRQ
)
info
->
irq
=
do_auto_irq
(
info
);
scratch2
=
serial_in
(
info
,
UART_LCR
);
serial_outp
(
info
,
UART_LCR
,
scratch2
|
UART_LCR_DLAB
);
serial_outp
(
info
,
UART_EFR
,
0
);
/* EFR is the same as FCR */
serial_outp
(
info
,
UART_LCR
,
scratch2
);
serial_outp
(
info
,
UART_FCR
,
UART_FCR_ENABLE_FIFO
);
scratch
=
serial_in
(
info
,
UART_IIR
)
>>
6
;
info
->
xmit_fifo_size
=
1
;
...
...
@@ -2373,15 +2343,8 @@ static void autoconfig(struct async_struct * info)
info
->
type
=
PORT_16550
;
break
;
case
3
:
serial_outp
(
info
,
UART_LCR
,
scratch2
|
UART_LCR_DLAB
);
if
(
serial_in
(
info
,
UART_EFR
)
==
0
)
{
info
->
type
=
PORT_16650
;
info
->
xmit_fifo_size
=
32
;
}
else
{
info
->
type
=
PORT_16550A
;
info
->
xmit_fifo_size
=
16
;
}
serial_outp
(
info
,
UART_LCR
,
scratch2
);
break
;
}
if
(
info
->
type
==
PORT_16450
)
{
...
...
@@ -2495,8 +2458,6 @@ long rs_init(long kmem_start)
info
->
type
=
PORT_UNKNOWN
;
info
->
custom_divisor
=
0
;
info
->
close_delay
=
50
;
info
->
closing_wait
=
ASYNC_CLOSING_WAIT_NONE
;
info
->
closing_wait2
=
3000
;
info
->
x_char
=
0
;
info
->
event
=
0
;
info
->
count
=
0
;
...
...
@@ -2532,9 +2493,6 @@ long rs_init(long kmem_start)
case
PORT_16550A
:
printk
(
" is a 16550A
\n
"
);
break
;
case
PORT_16650
:
printk
(
" is a 16650
\n
"
);
break
;
default:
printk
(
"
\n
"
);
break
;
...
...
drivers/char/tty_ioctl.c
View file @
40820e9a
...
...
@@ -40,7 +40,7 @@
#define TERMIOS_WAIT 2
#define TERMIOS_TERMIO 4
void
wait_until_sent
(
struct
tty_struct
*
tty
,
int
timeout
)
void
tty_
wait_until_sent
(
struct
tty_struct
*
tty
,
int
timeout
)
{
struct
wait_queue
wait
=
{
current
,
NULL
};
...
...
@@ -132,7 +132,7 @@ static int set_termios(struct tty_struct * tty, unsigned long arg, int opt)
tty
->
ldisc
.
flush_buffer
(
tty
);
if
(
opt
&
TERMIOS_WAIT
)
wait_until_sent
(
tty
,
0
);
tty_
wait_until_sent
(
tty
,
0
);
cli
();
*
tty
->
termios
=
tmp_termios
;
...
...
@@ -363,7 +363,7 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
retval
=
tty_check_change
(
tty
);
if
(
retval
)
return
retval
;
wait_until_sent
(
tty
,
0
);
tty_
wait_until_sent
(
tty
,
0
);
if
(
!
tty
->
driver
.
ioctl
)
return
0
;
tty
->
driver
.
ioctl
(
tty
,
file
,
cmd
,
arg
);
...
...
drivers/net/3c501.c
View file @
40820e9a
...
...
@@ -61,6 +61,12 @@
in group 224.0.0.1 and you will therefore be listening to all multicasts.
One nv conference running over that ethernet and you can give up.
2/8/95 (invid@msen.com)
Removed calls to init_etherdev since they are no longer needed, and
cleaned up modularization just a bit. The driver still allows only
the default address for cards when loaded as a module, but that's
really less braindead than anyone using a 3c501 board. :)
*/
static
char
*
version
=
...
...
@@ -75,6 +81,9 @@ static char *version =
#ifdef MODULE
#include <linux/module.h>
#include <linux/version.h>
#else
#define MOD_INC_USE_COUNT
#define MOD_DEC_USE_COUNT
#endif
#include <linux/kernel.h>
...
...
@@ -95,9 +104,6 @@ static char *version =
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
extern
struct
device
*
init_etherdev
(
struct
device
*
dev
,
int
sizeof_private
,
unsigned
long
*
mem_startp
);
/* A zero-terminated list of I/O addresses to be probed.
The 3c501 can be at many locations, but here are the popular ones. */
static
unsigned
int
netcard_portlist
[]
=
...
...
@@ -208,6 +214,8 @@ el1_probe(struct device *dev)
static
int
el1_probe1
(
struct
device
*
dev
,
int
ioaddr
)
{
#ifndef MODULE
char
*
mname
;
/* Vendor name */
unsigned
char
station_addr
[
6
];
int
autoirq
=
0
;
...
...
@@ -232,9 +240,6 @@ el1_probe1(struct device *dev, int ioaddr)
/* Grab the region so we can find the another board if autoIRQ fails. */
request_region
(
ioaddr
,
EL1_IO_EXTENT
,
"3c501"
);
if
(
dev
==
NULL
)
dev
=
init_etherdev
(
0
,
sizeof
(
struct
net_local
),
0
);
/* We auto-IRQ by shutting off the interrupt line and letting it float
high. */
if
(
dev
->
irq
<
2
)
{
...
...
@@ -290,6 +295,7 @@ el1_probe1(struct device *dev, int ioaddr)
/* Setup the generic properties */
ether_setup
(
dev
);
#endif
/* !MODULE */
return
0
;
}
...
...
@@ -312,9 +318,7 @@ el_open(struct device *dev)
dev
->
start
=
1
;
outb
(
AX_RX
,
AX_CMD
);
/* Aux control, irq and receive enabled */
#ifdef MODULE
MOD_INC_USE_COUNT
;
#endif
return
0
;
}
...
...
@@ -618,9 +622,7 @@ el1_close(struct device *dev)
outb
(
AX_RESET
,
AX_CMD
);
/* Reset the chip */
irq2dev_map
[
dev
->
irq
]
=
0
;
#ifdef MODULE
MOD_DEC_USE_COUNT
;
#endif
return
0
;
}
...
...
drivers/net/Space.c
View file @
40820e9a
...
...
@@ -115,7 +115,7 @@ ethif_probe(struct device *dev)
#ifdef CONFIG_EWRK3
/* DEC EtherWORKS 3 */
&&
ewrk3_probe
(
dev
)
#endif
#ifdef CONFIG_DE4
X
5
/* DEC DE425, DE434, DE435 adapters */
#ifdef CONFIG_DE4
x
5
/* DEC DE425, DE434, DE435 adapters */
&&
de4x5_probe
(
dev
)
#endif
#ifdef CONFIG_APRICOT
/* Apricot I82596 */
...
...
drivers/net/de600.c
View file @
40820e9a
...
...
@@ -686,10 +686,12 @@ de600_probe(struct device *dev)
return
ENODEV
;
}
#if 0 /* Not yet */
if (check_region(DE600_IO, 3)) {
printk(", port 0x%x busy\n", DE600_IO);
return EBUSY;
}
#endif
request_region
(
DE600_IO
,
3
,
"de600"
);
printk
(
", Ethernet Address: %02X"
,
dev
->
dev_addr
[
0
]);
...
...
@@ -840,9 +842,6 @@ init_module(void)
void
cleanup_module
(
void
)
{
if
(
MOD_IN_USE
)
printk
(
"de600: device busy, remove delayed
\n
"
);
else
unregister_netdev
(
&
de600_dev
);
release_region
(
DE600_IO
,
3
);
}
...
...
drivers/net/de620.c
View file @
40820e9a
...
...
@@ -824,10 +824,12 @@ de620_probe(struct device *dev)
return
ENODEV
;
}
#if 0 /* Not yet */
if (check_region(DE620_IO, 3)) {
printk(", port 0x%x busy\n", DE620_IO);
return EBUSY;
}
#endif
request_region
(
DE620_IO
,
3
,
"de620"
);
/* else, got it! */
...
...
@@ -987,9 +989,6 @@ init_module(void)
void
cleanup_module
(
void
)
{
if
(
MOD_IN_USE
)
printk
(
"de620: device busy, remove delayed
\n
"
);
else
unregister_netdev
(
&
de620_dev
);
release_region
(
DE620_IO
,
3
);
}
...
...
drivers/net/ni52.c
View file @
40820e9a
...
...
@@ -11,7 +11,7 @@
* CAN YOU PLEASE REPORT ME YOUR PERFORMANCE EXPERIENCES !!.
*
* If you find a bug, please report me:
* The kernelpanic output and any kmsg from the ni52 driver
* The kernel
panic output and any kmsg from the ni52 driver
* the ni5210-driver-version and the linux-kernel version
* how many shared memory (memsize) on the netcard,
* bootprom: yes/no, base_addr, mem_start
...
...
@@ -55,10 +55,10 @@
*
* 19.Sep.94: Added Multicast support (not tested yet) (MH)
*
* 18.Sep.94: Workar
r
ound for 'EL-Bug'. Removed flexible RBD-handling.
* 18.Sep.94: Workaround for 'EL-Bug'. Removed flexible RBD-handling.
* Now, every RFD has exact one RBD. (MH)
*
* 14.Sep.94: added promiscous mode, a few cleanups (MH)
* 14.Sep.94: added promisc
u
ous mode, a few cleanups (MH)
*
* 19.Aug.94: changed request_irq() parameter (MH)
*
...
...
@@ -108,7 +108,7 @@
* IMPORTANT NOTE: if you configure only one NUM_XMIT_BUFFS, the driver works
* --------------- in a different (more stable?) mode. Only in this mode it's
* poss
bi
le to configure the driver with 'NO_NOPCOMMANDS'
* poss
ib
le to configure the driver with 'NO_NOPCOMMANDS'
sizeof(scp)=12; sizeof(scb)=16; sizeof(iscp)=8;
sizeof(scp)+sizeof(iscp)+sizeof(scb) = 36 = INIT
...
...
@@ -272,7 +272,7 @@ static int check586(struct device *dev,char *where,unsigned size)
ni_attn586
();
DELAY
(
2
);
/* wait a while... */
if
(
p
->
iscp
->
busy
)
/* i82586 clears 'busy' after succesful init */
if
(
p
->
iscp
->
busy
)
/* i82586 clears 'busy' after succes
s
ful init */
return
0
;
}
return
1
;
...
...
@@ -611,7 +611,7 @@ static int init586(struct device *dev,int num_addrs,void *addrs)
if
(
len
<
num_addrs
)
{
num_addrs
=
len
;
printk
(
"%s: Sorry, can only apply %d MC-Address
e(
s).
\n
"
,
dev
->
name
,
num_addrs
);
printk
(
"%s: Sorry, can only apply %d MC-Address
(e
s).
\n
"
,
dev
->
name
,
num_addrs
);
}
mc_cmd
=
(
struct
mcsetup_cmd_struct
*
)
ptr
;
mc_cmd
->
cmd_status
=
0
;
...
...
@@ -845,7 +845,7 @@ static void ni52_rnr_int(struct device *dev)
p
->
stats
.
rx_errors
++
;
WAIT_4_SCB_CMD
();
/* wait for the last cmd */
p
->
scb
->
cmd
=
RUC_ABORT
;
/* usually the RU is in the 'no res
s
ource'-state .. abort it now. */
p
->
scb
->
cmd
=
RUC_ABORT
;
/* usually the RU is in the 'no resource'-state .. abort it now. */
ni_attn586
();
WAIT_4_SCB_CMD
();
/* wait for accept cmd. */
...
...
@@ -1081,7 +1081,7 @@ static void set_multicast_list(struct device *dev, int num_addrs, void *addrs)
{
if
(
!
dev
->
start
&&
!
num_addrs
)
{
printk
(
"%s: Can't apply promiscous/multicastmode to a not running interface.
\n
"
,
dev
->
name
);
printk
(
"%s: Can't apply promisc
u
ous/multicastmode to a not running interface.
\n
"
,
dev
->
name
);
return
;
}
...
...
drivers/net/plip.c
View file @
40820e9a
This diff is collapsed.
Click to expand it.
drivers/scsi/eata.c
View file @
40820e9a
/*
* eata.c - Low-level driver for EATA/DMA SCSI host adapters.
*
* 8 Feb 1995 rev. 1.15 for linux 1.1.89
* Cleared target_time_out counter while preforming a reset.
* All external symbols renamed to avoid possible name conflicts.
*
* 28 Jan 1995 rev. 1.14 for linux 1.1.86
* Added module support.
* Log and do a retry when a disk drive returns a target status
...
...
@@ -41,7 +45,7 @@
* This driver is based on the CAM (Common Access Method Committee)
* EATA (Enhanced AT Bus Attachment) rev. 2.0A, using DMA protocol.
*
*
Released by Dario Ballabio (Dario_Ballab
io@milano.europe.dg.com)
*
Copyright (C) 1994, 1995 Dario Ballabio (dar
io@milano.europe.dg.com)
*
*/
...
...
@@ -89,6 +93,7 @@
#if defined(MODULE)
#include <linux/module.h>
#include <linux/version.h>
#endif
#include <linux/string.h>
...
...
@@ -288,7 +293,7 @@ static unsigned int irqlist[MAX_IRQ], calls[MAX_IRQ];
#define HD(board) ((struct hostdata *) &sh[board]->hostdata)
#define BN(board) (HD(board)->board_name)
static
void
eata_interrupt_handler
(
int
,
struct
pt_regs
*
);
static
void
eata
2x
_interrupt_handler
(
int
,
struct
pt_regs
*
);
static
int
do_trace
=
FALSE
;
static
inline
unchar
wait_on_busy
(
ushort
iobase
)
{
...
...
@@ -411,7 +416,7 @@ static inline int port_detect(ushort *port_base, unsigned int j,
/* Board detected, allocate its IRQ if not already done */
if
((
irq
>=
MAX_IRQ
)
||
((
irqlist
[
irq
]
==
NO_IRQ
)
&&
request_irq
(
irq
,
eata_interrupt_handler
,
SA_INTERRUPT
,
driver_name
)))
{
(
irq
,
eata
2x
_interrupt_handler
,
SA_INTERRUPT
,
driver_name
)))
{
printk
(
"%s: unable to allocate IRQ %u, detaching.
\n
"
,
name
,
irq
);
return
FALSE
;
}
...
...
@@ -461,12 +466,7 @@ static inline int port_detect(ushort *port_base, unsigned int j,
if
(
HD
(
j
)
->
subversion
==
ESA
)
sh
[
j
]
->
unchecked_isa_dma
=
FALSE
;
else
{
#if !defined(MODULE)
/* The module code does not checkin/checkout in the blocking list yet */
sh
[
j
]
->
block
=
sh
[
j
];
#endif
sh
[
j
]
->
unchecked_isa_dma
=
TRUE
;
disable_dma
(
dma_channel
);
clear_dma_ff
(
dma_channel
);
...
...
@@ -507,7 +507,7 @@ static inline int port_detect(ushort *port_base, unsigned int j,
return
TRUE
;
}
int
eata_detect
(
Scsi_Host_Template
*
tpnt
)
{
int
eata
2x
_detect
(
Scsi_Host_Template
*
tpnt
)
{
unsigned
int
j
=
0
,
k
,
flags
;
ushort
io_port
[]
=
{
...
...
@@ -535,6 +535,9 @@ int eata_detect (Scsi_Host_Template * tpnt) {
port_base
++
;
}
if
(
j
>
0
)
printk
(
"EATA/DMA 2.0x: Copyright (C) 1994, 1995 Dario Ballabio.
\n
"
);
restore_flags
(
flags
);
return
j
;
}
...
...
@@ -554,7 +557,7 @@ static inline void build_sg_list(struct mscp *cpp, Scsi_Cmnd *SCpnt) {
cpp
->
data_len
=
htonl
((
SCpnt
->
use_sg
*
sizeof
(
struct
sg_list
)));
}
int
eata_queuecommand
(
Scsi_Cmnd
*
SCpnt
,
void
(
*
done
)(
Scsi_Cmnd
*
))
{
int
eata
2x
_queuecommand
(
Scsi_Cmnd
*
SCpnt
,
void
(
*
done
)(
Scsi_Cmnd
*
))
{
unsigned
int
i
,
j
,
k
,
flags
;
struct
mscp
*
cpp
;
struct
mssp
*
spp
;
...
...
@@ -585,7 +588,7 @@ int eata_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
if
(
HD
(
j
)
->
in_reset
)
printk
(
"%s: qcomm, already in reset.
\n
"
,
BN
(
j
));
else
if
(
eata_reset
(
SCpnt
)
==
SCSI_RESET_SUCCESS
)
else
if
(
eata
2x
_reset
(
SCpnt
)
==
SCSI_RESET_SUCCESS
)
panic
(
"%s: qcomm, SCSI_RESET_SUCCESS.
\n
"
,
BN
(
j
));
SCpnt
->
result
=
DID_BUS_BUSY
<<
16
;
...
...
@@ -657,7 +660,7 @@ int eata_queuecommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
return
0
;
}
int
eata_abort
(
Scsi_Cmnd
*
SCarg
)
{
int
eata
2x
_abort
(
Scsi_Cmnd
*
SCarg
)
{
unsigned
int
i
,
j
,
flags
;
save_flags
(
flags
);
...
...
@@ -715,7 +718,7 @@ int eata_abort (Scsi_Cmnd *SCarg) {
panic
(
"%s: abort, mbox %d, invalid cp_stat.
\n
"
,
BN
(
j
),
i
);
}
int
eata_reset
(
Scsi_Cmnd
*
SCarg
)
{
int
eata
2x
_reset
(
Scsi_Cmnd
*
SCarg
)
{
unsigned
int
i
,
j
,
flags
,
time
,
k
,
limit
=
0
;
int
arg_done
=
FALSE
;
Scsi_Cmnd
*
SCpnt
;
...
...
@@ -743,6 +746,8 @@ int eata_reset (Scsi_Cmnd *SCarg) {
for
(
k
=
0
;
k
<
MAX_TARGET
;
k
++
)
HD
(
j
)
->
target_reset
[
k
]
=
TRUE
;
for
(
k
=
0
;
k
<
MAX_TARGET
;
k
++
)
HD
(
j
)
->
target_time_out
[
k
]
=
0
;
for
(
i
=
0
;
i
<
sh
[
j
]
->
can_queue
;
i
++
)
{
if
(
HD
(
j
)
->
cp_stat
[
i
]
==
FREE
)
continue
;
...
...
@@ -784,7 +789,7 @@ int eata_reset (Scsi_Cmnd *SCarg) {
HD
(
j
)
->
in_reset
=
TRUE
;
sti
();
time
=
jiffies
;
while
(
jiffies
<
(
time
+
200
)
&&
limit
++
<
100000000
)
sti
(
);
while
(
jiffies
<
(
time
+
100
)
&&
limit
++
<
100000000
);
cli
();
printk
(
"%s: reset, interrupts disabled, loops %d.
\n
"
,
BN
(
j
),
limit
);
...
...
@@ -821,7 +826,7 @@ int eata_reset (Scsi_Cmnd *SCarg) {
}
}
static
void
eata_interrupt_handler
(
int
irq
,
struct
pt_regs
*
regs
)
{
static
void
eata
2x
_interrupt_handler
(
int
irq
,
struct
pt_regs
*
regs
)
{
Scsi_Cmnd
*
SCpnt
;
unsigned
int
i
,
j
,
k
,
flags
,
status
,
tstatus
,
loops
,
total_loops
=
0
;
struct
mssp
*
spp
;
...
...
@@ -928,8 +933,7 @@ static void eata_interrupt_handler(int irq, struct pt_regs * regs) {
status
=
DID_BUS_BUSY
<<
16
;
else
if
(
tstatus
==
CHECK_CONDITION
&&
(
SCpnt
->
device
->
type
==
TYPE_DISK
||
SCpnt
->
device
->
type
==
TYPE_ROM
)
&&
SCpnt
->
device
->
type
==
TYPE_DISK
&&
(
SCpnt
->
sense_buffer
[
2
]
&
0xf
)
==
UNIT_ATTENTION
)
status
=
DID_ERROR
<<
16
;
...
...
@@ -939,8 +943,7 @@ static void eata_interrupt_handler(int irq, struct pt_regs * regs) {
if
(
tstatus
==
GOOD
)
HD
(
j
)
->
target_reset
[
SCpnt
->
target
]
=
FALSE
;
if
(
spp
->
target_status
&&
(
SCpnt
->
device
->
type
==
TYPE_DISK
||
SCpnt
->
device
->
type
==
TYPE_ROM
))
if
(
spp
->
target_status
&&
SCpnt
->
device
->
type
==
TYPE_DISK
)
printk
(
"%s: ihdlr, target %d:%d, pid %ld, target_status "
\
"0x%x, sense key 0x%x.
\n
"
,
BN
(
j
),
SCpnt
->
target
,
SCpnt
->
lun
,
SCpnt
->
pid
,
...
...
drivers/scsi/eata.h
View file @
40820e9a
...
...
@@ -7,24 +7,24 @@
#include <linux/scsicam.h>
#define EATA_VERSION "1.1
4.03
"
#define EATA_VERSION "1.1
5.00
"
int
eata_detect
(
Scsi_Host_Template
*
);
int
eata_queuecommand
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
int
eata_abort
(
Scsi_Cmnd
*
);
int
eata_reset
(
Scsi_Cmnd
*
);
int
eata
2x
_detect
(
Scsi_Host_Template
*
);
int
eata
2x
_queuecommand
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
int
eata
2x
_abort
(
Scsi_Cmnd
*
);
int
eata
2x
_reset
(
Scsi_Cmnd
*
);
#define EATA { NULL,
/* Ptr for modules */
\
#define EATA { \
NULL,
/* Ptr for modules */
\
NULL,
/* usage count for modules */
\
"EATA/DMA 2.0 rev. " EATA_VERSION " by " \
"Dario_Ballabio@milano.europe.dg.com.", \
eata_detect, \
"EATA/DMA 2.0x rev. " EATA_VERSION " ", \
eata2x_detect, \
NULL,
/* Release */
\
NULL, \
NULL, \
eata_queuecommand, \
eata_abort, \
eata_reset, \
eata
2x
_queuecommand, \
eata
2x
_abort, \
eata
2x
_reset, \
NULL, \
scsicam_bios_param, \
0,
/* can_queue, reset by detect */
\
...
...
drivers/scsi/eata_dma.h
View file @
40820e9a
...
...
@@ -137,7 +137,7 @@ int eata_release(struct Scsi_Host *);
#define C_P_L_DIV 4
/* 1 <= C_P_L_DIV <= 8
* You can use this parameter to fine-tune
* the driver. Depending on the number of
* devices and their ab
lil
ty to queue commands
* devices and their ab
ili
ty to queue commands
* you will get the best results with a value
* ~= numdevices-(devices_unable_to_queue_commands/2)
* The reason for this is that the disk driver tents
...
...
drivers/scsi/hosts.c
View file @
40820e9a
...
...
@@ -221,7 +221,7 @@ scsi_unregister(struct Scsi_Host * sh){
j
=
sh
->
extra_bytes
;
if
(
scsi_hostlist
==
sh
)
scsi_hostlist
=
NULL
;
scsi_hostlist
=
sh
->
next
;
else
{
shpnt
=
scsi_hostlist
;
while
(
shpnt
->
next
!=
sh
)
shpnt
=
shpnt
->
next
;
...
...
@@ -244,7 +244,8 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template * tpnt, int j){
if
(
j
>
0xffff
)
panic
(
"Too many extra bytes requested
\n
"
);
retval
->
extra_bytes
=
j
;
retval
->
loaded_as_module
=
scsi_loadable_module_flag
;
retval
->
host_no
=
next_scsi_host
++
;
retval
->
host_no
=
max_scsi_hosts
++
;
/* never reuse host_no (DB) */
next_scsi_host
++
;
retval
->
host_queue
=
NULL
;
retval
->
host_wait
=
NULL
;
retval
->
last_reset
=
0
;
...
...
@@ -339,29 +340,7 @@ unsigned int scsi_init()
printk
(
"scsi : %d host%s.
\n
"
,
next_scsi_host
,
(
next_scsi_host
==
1
)
?
""
:
"s"
);
{
int
block_count
=
0
,
index
;
struct
Scsi_Host
*
sh
[
128
],
*
shpnt
;
for
(
shpnt
=
scsi_hostlist
;
shpnt
;
shpnt
=
shpnt
->
next
)
if
(
shpnt
->
block
)
sh
[
block_count
++
]
=
shpnt
;
if
(
block_count
==
1
)
sh
[
0
]
->
block
=
NULL
;
else
if
(
block_count
>
1
)
{
for
(
index
=
0
;
index
<
block_count
-
1
;
index
++
)
{
sh
[
index
]
->
block
=
sh
[
index
+
1
];
printk
(
"scsi%d : added to blocked host list.
\n
"
,
sh
[
index
]
->
host_no
);
}
sh
[
block_count
-
1
]
->
block
=
sh
[
0
];
printk
(
"scsi%d : added to blocked host list.
\n
"
,
sh
[
index
]
->
host_no
);
}
}
scsi_make_blocked_list
();
/* Now attach the high level drivers */
#ifdef CONFIG_BLK_DEV_SD
...
...
@@ -377,7 +356,9 @@ unsigned int scsi_init()
scsi_register_device
(
&
sg_template
);
#endif
#if 0
max_scsi_hosts = next_scsi_host;
#endif
return
0
;
}
...
...
drivers/scsi/script_asm.pl
View file @
40820e9a
...
...
@@ -280,11 +280,11 @@ sub parse_conditional {
$conditional
=
$1
;
print
STDERR
"
$0 : parsed ATN
\n
"
if
(
$debug
);
}
elsif
(
$conditional
=~
/^($phase)\s*(.*)/i
)
{
$
1
=
"
\
U$1
\
E
";
$p
=
$scsi_phases
{
$
1
};
$
phase_index
=
"
\
U$1
\
E
";
$p
=
$scsi_phases
{
$
phase_index
};
$code
[
$address
]
|=
$p
|
0x00_02_00_00
;
$conditional
=
$2
;
print
STDERR
"
$0 : parsed phase $
1
\n
"
if
(
$debug
);
print
STDERR
"
$0 : parsed phase
$
phase_index
\n
"
if
(
$debug
);
}
else
{
$other
=
'';
$need_data
=
1
;
...
...
@@ -378,16 +378,17 @@ while (<STDIN>) {
$rest
=
$2
;
foreach
$rest
(
split
(
/\s*,\s*/
,
$rest
))
{
if
(
$rest
=~
/^($identifier)\s*=\s*($constant)\s*$/
)
{
if
(
$symbol_values
{
$1
}
eq
undef
)
{
$symbol_values
{
$1
}
=
eval
$2
;
delete
$forward
{
$1
};
local
(
$id
,
$cnst
)
=
(
$1
,
$2
);
if
(
$symbol_values
{
$id
}
eq
undef
)
{
$symbol_values
{
$id
}
=
eval
$cnst
;
delete
$forward
{
$id
};
if
(
$is_absolute
=~
/ABSOLUTE/i
)
{
push
(
@absolute
,
$
1
);
push
(
@absolute
,
$
id
);
}
else
{
push
(
@relative
,
$
1
);
push
(
@relative
,
$
id
);
}
}
else
{
die
"
$0 : redefinition of symbol $
1
in line
$lineno
:
$_
\n
";
die
"
$0 : redefinition of symbol
$
id
in line
$lineno
:
$_
\n
";
}
}
else
{
die
...
...
drivers/scsi/scsi.c
View file @
40820e9a
This diff is collapsed.
Click to expand it.
drivers/scsi/scsi.h
View file @
40820e9a
...
...
@@ -76,6 +76,7 @@
#define MODE_SELECT_10 0x55
#define MODE_SENSE_10 0x5a
extern
void
scsi_make_blocked_list
(
void
);
extern
volatile
int
in_scan_scsis
;
extern
const
unsigned
char
scsi_command_size
[
8
];
#define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7]
...
...
@@ -528,6 +529,7 @@ extern int scsi_reset (Scsi_Cmnd *);
extern
int
max_scsi_hosts
;
#if defined(MAJOR_NR) && (MAJOR_NR != SCSI_TAPE_MAJOR)
#include "hosts.h"
static
Scsi_Cmnd
*
end_scsi_request
(
Scsi_Cmnd
*
SCpnt
,
int
uptodate
,
int
sectors
)
{
struct
request
*
req
;
...
...
@@ -566,6 +568,15 @@ static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors
if
(
req
->
sem
!=
NULL
)
{
up
(
req
->
sem
);
}
if
(
SCpnt
->
host
->
block
)
{
struct
Scsi_Host
*
next
;
for
(
next
=
SCpnt
->
host
->
block
;
next
!=
SCpnt
->
host
;
next
=
next
->
block
)
wake_up
(
&
next
->
host_wait
);
}
req
->
dev
=
-
1
;
wake_up
(
&
wait_for_request
);
wake_up
(
&
SCpnt
->
device
->
device_wait
);
...
...
@@ -595,11 +606,16 @@ static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors
if (CONDITION) { \
struct wait_queue wait = { current, NULL}; \
add_wait_queue(QUEUE, &wait); \
sleep_repeat:
\
for(;;) {
\
current->state = TASK_UNINTERRUPTIBLE; \
if (CONDITION) { \
if (intr_count) \
panic("scsi: trying to call schedule() in interrupt" \
", file %s, line %d.\n", __FILE__, __LINE__); \
schedule(); \
goto sleep_repeat; \
} \
else \
break; \
} \
remove_wait_queue(QUEUE, &wait); \
current->state = TASK_RUNNING; \
...
...
drivers/scsi/sr.c
View file @
40820e9a
...
...
@@ -293,19 +293,11 @@ static void rw_intr (Scsi_Cmnd * SCpnt)
*
* - TOSHIBA: setting density is done here now, mounting PhotoCD's should
* work now without running the program "set_density"
* People reported that it is necessary to eject and reinsert
* the CD after the set-density call to get this working for
* old drives.
* And some very new drives don't need this call any more...
* Multisession CD's are supported too.
*
* Dec 1994: completely rewritten, uses kernel_scsi_ioctl() now
*
* kraxel@cs.tu-berlin.de (Gerd Knorr)
*/
#define DEBUG
static
void
sr_photocd
(
struct
inode
*
inode
)
{
unsigned
long
sector
,
min
,
sec
,
frame
;
...
...
@@ -345,12 +337,14 @@ static void sr_photocd(struct inode *inode)
if
(
rc
!=
0
)
{
printk
(
"sr_photocd: ioctl error (NEC): 0x%x
\n
"
,
rc
);
sector
=
0
;
is_xa
=
0
;
}
else
{
min
=
(
unsigned
long
)
rec
[
15
]
/
16
*
10
+
(
unsigned
long
)
rec
[
15
]
%
16
;
sec
=
(
unsigned
long
)
rec
[
16
]
/
16
*
10
+
(
unsigned
long
)
rec
[
16
]
%
16
;
frame
=
(
unsigned
long
)
rec
[
17
]
/
16
*
10
+
(
unsigned
long
)
rec
[
17
]
%
16
;
/* if rec[14] isn't 0xb0, the drive does not support multisession CD's, use zero */
sector
=
(
0xb0
==
rec
[
14
])
?
min
*
CD_SECS
*
CD_FRAMES
+
sec
*
CD_FRAMES
+
frame
:
0
;
is_xa
=
(
rec
[
14
]
==
0xb0
);
#ifdef DEBUG
printk
(
"NEC: (%2x) %2li:%02li:%02li = %li
\n
"
,
buf
[
8
+
14
],
min
,
sec
,
frame
,
sector
);
if
(
sector
)
{
...
...
@@ -377,6 +371,7 @@ static void sr_photocd(struct inode *inode)
if
(
rc
!=
0
)
{
printk
(
"sr_photocd: ioctl error (TOSHIBA #1): 0x%x
\n
"
,
rc
);
sector
=
0
;
is_xa
=
0
;
break
;
/* if the first ioctl fails, we don't call the second one */
}
is_xa
=
(
rec
[
0
]
==
0x20
);
...
...
@@ -431,6 +426,8 @@ static void sr_photocd(struct inode *inode)
if
(
rc
!=
0
)
{
printk
(
"sr_photocd: ioctl error (TOSHIBA #3): 0x%x
\n
"
,
rc
);
}
/* The set_density command may have changed the sector size or capacity. */
scsi_CDs
[
MINOR
(
inode
->
i_rdev
)].
needs_sector_size
=
1
;
}
break
;
...
...
@@ -440,16 +437,14 @@ static void sr_photocd(struct inode *inode)
printk
(
"sr_photocd: unknown drive, no special multisession code
\n
"
);
#endif
sector
=
0
;
is_xa
=
0
;
break
;
}
scsi_CDs
[
MINOR
(
inode
->
i_rdev
)].
mpcd_sector
=
sector
;
/* The code above may have changed the sector size or capacity. */
scsi_CDs
[
MINOR
(
inode
->
i_rdev
)].
needs_sector_size
=
1
;
scsi_CDs
[
MINOR
(
inode
->
i_rdev
)].
is_xa
=
is_xa
;
return
;
}
#undef DEBUG
static
int
sr_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
if
(
MINOR
(
inode
->
i_rdev
)
>=
sr_template
.
nr_dev
||
...
...
drivers/scsi/sr.h
View file @
40820e9a
...
...
@@ -25,6 +25,7 @@ typedef struct
unsigned
sector_size
;
/* size in bytes */
Scsi_Device
*
device
;
unsigned
long
mpcd_sector
;
/* for reading multisession-CD's */
char
is_xa
;
/* is it an XA-CD ? */
unsigned
char
sector_bit_size
;
/* sector size = 2^sector_bit_size */
unsigned
char
sector_bit_shift
;
/* sectors/FS block = 2^sector_bit_shift*/
unsigned
needs_sector_size
:
1
;
/* needs to get sector size */
...
...
drivers/scsi/sr_ioctl.c
View file @
40820e9a
...
...
@@ -408,10 +408,7 @@ int sr_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne
ms_info
.
addr
.
lba
=
scsi_CDs
[
target
].
mpcd_sector
;
else
return
(
-
EINVAL
);
if
(
scsi_CDs
[
target
].
mpcd_sector
)
ms_info
.
xa_flag
=
1
;
/* valid redirection address */
else
ms_info
.
xa_flag
=
0
;
/* invalid redirection address */
ms_info
.
xa_flag
=
scsi_CDs
[
target
].
is_xa
;
err
=
verify_area
(
VERIFY_WRITE
,(
void
*
)
arg
,
sizeof
(
struct
cdrom_multisession
));
...
...
drivers/scsi/u14-34f.c
View file @
40820e9a
/*
* u14-34f.c - Low-level driver for UltraStor 14F/34F SCSI host adapters.
*
* 8 Feb 1995 rev. 1.15 for linux 1.1.89
* Cleared target_time_out counter while preforming a reset.
*
* 28 Jan 1995 rev. 1.14 for linux 1.1.86
* Added module support.
* Log and do a retry when a disk drive returns a target status
...
...
@@ -34,7 +37,7 @@
*
* Multiple U14F and/or U34F host adapters are supported.
*
*
Released by Dario Ballabio (Dario_Ballab
io@milano.europe.dg.com)
*
Copyright (C) 1994, 1995 Dario Ballabio (dar
io@milano.europe.dg.com)
*
* WARNING: if your 14F board has an old firmware revision (see below)
* you must change "#undef" into "#define" in the following
...
...
@@ -113,6 +116,7 @@
#if defined(MODULE)
#include <linux/module.h>
#include <linux/version.h>
#endif
#include <linux/string.h>
...
...
@@ -295,7 +299,7 @@ static int board_inquiry(unsigned int j) {
sti
();
time
=
jiffies
;
while
(
jiffies
<
(
time
+
100
)
&&
limit
++
<
100000000
)
sti
()
;
while
(
jiffies
<
(
time
+
100
)
&&
limit
++
<
100000000
);
cli
();
if
(
cpp
->
adapter_status
||
HD
(
j
)
->
cp_stat
[
0
]
!=
FREE
)
{
...
...
@@ -424,11 +428,7 @@ static inline int port_detect(ushort *port_base, unsigned int j,
sprintf
(
BN
(
j
),
"U34F%d"
,
j
);
}
else
{
#if !defined(MODULE)
/* The module code does not checkin/checkout in the blocking list yet */
sh
[
j
]
->
block
=
sh
[
j
];
#endif
#if defined (HAVE_OLD_U14F_FIRMWARE)
sh
[
j
]
->
hostt
->
use_clustering
=
DISABLE_CLUSTERING
;
...
...
@@ -491,6 +491,9 @@ int u14_34f_detect (Scsi_Host_Template * tpnt) {
port_base
++
;
}
if
(
j
>
0
)
printk
(
"UltraStor 14F/34F: Copyright (C) 1994, 1995 Dario Ballabio.
\n
"
);
restore_flags
(
flags
);
return
j
;
}
...
...
@@ -691,6 +694,8 @@ int u14_34f_reset(Scsi_Cmnd * SCarg) {
for
(
k
=
0
;
k
<
MAX_TARGET
;
k
++
)
HD
(
j
)
->
target_reset
[
k
]
=
TRUE
;
for
(
k
=
0
;
k
<
MAX_TARGET
;
k
++
)
HD
(
j
)
->
target_time_out
[
k
]
=
0
;
for
(
i
=
0
;
i
<
sh
[
j
]
->
can_queue
;
i
++
)
{
if
(
HD
(
j
)
->
cp_stat
[
i
]
==
FREE
)
continue
;
...
...
@@ -733,7 +738,7 @@ int u14_34f_reset(Scsi_Cmnd * SCarg) {
HD
(
j
)
->
in_reset
=
TRUE
;
sti
();
time
=
jiffies
;
while
(
jiffies
<
(
time
+
200
)
&&
limit
++
<
100000000
)
sti
(
);
while
(
jiffies
<
(
time
+
100
)
&&
limit
++
<
100000000
);
cli
();
printk
(
"%s: reset, interrupts disabled, loops %d.
\n
"
,
BN
(
j
),
limit
);
...
...
@@ -879,8 +884,7 @@ static void u14_34f_interrupt_handler(int irq, struct pt_regs * regs) {
status
=
DID_BUS_BUSY
<<
16
;
else
if
(
tstatus
==
CHECK_CONDITION
&&
(
SCpnt
->
device
->
type
==
TYPE_DISK
||
SCpnt
->
device
->
type
==
TYPE_ROM
)
&&
SCpnt
->
device
->
type
==
TYPE_DISK
&&
(
SCpnt
->
sense_buffer
[
2
]
&
0xf
)
==
UNIT_ATTENTION
)
status
=
DID_ERROR
<<
16
;
...
...
@@ -890,8 +894,7 @@ static void u14_34f_interrupt_handler(int irq, struct pt_regs * regs) {
if
(
tstatus
==
GOOD
)
HD
(
j
)
->
target_reset
[
SCpnt
->
target
]
=
FALSE
;
if
(
spp
->
target_status
&&
(
SCpnt
->
device
->
type
==
TYPE_DISK
||
SCpnt
->
device
->
type
==
TYPE_ROM
))
if
(
spp
->
target_status
&&
SCpnt
->
device
->
type
==
TYPE_DISK
)
printk
(
"%s: ihdlr, target %d:%d, pid %ld, target_status "
\
"0x%x, sense key 0x%x.
\n
"
,
BN
(
j
),
SCpnt
->
target
,
SCpnt
->
lun
,
SCpnt
->
pid
,
...
...
drivers/scsi/u14-34f.h
View file @
40820e9a
...
...
@@ -10,15 +10,14 @@ int u14_34f_abort(Scsi_Cmnd *);
int
u14_34f_reset
(
Scsi_Cmnd
*
);
int
u14_34f_biosparam
(
Disk
*
,
int
,
int
*
);
#define U14_34F_VERSION "1.1
4.05
"
#define U14_34F_VERSION "1.1
5.00
"
#define ULTRASTOR_14_34F { \
NULL, \
NULL, \
"UltraStor 14F/34F rev. " U14_34F_VERSION " by " \
"Dario_Ballabio@milano.europe.dg.com.", \
NULL,
/* Ptr for modules */
\
NULL,
/* usage count for modules */
\
"UltraStor 14F/34F rev. " U14_34F_VERSION " ", \
u14_34f_detect, \
NULL,
\
NULL,
/* Release */
\
NULL, \
NULL, \
u14_34f_queuecommand, \
...
...
drivers/sound/Readme
View file @
40820e9a
...
...
@@ -74,7 +74,13 @@ Hannu Savolainen
hannu@voxware.pp.fi
Snail mail: Hannu Savolainen
Pallaksentie 4 A 2
009
7
0 Helsinki
Hiekkalaiturintie 3 A 8
009
8
0 Helsinki
Finland
FAX: +358 0 395 1968 (usually not connected)
FAX: +358 0 341 6272 (answers if I have my machine (mgetty) on).
NOTE! I propably don't answer to Snail mail or FAX messages. Sending answer
to each of them is simply too expensive and time consuming. However I
try to reply every email message I get (within a week). If you don't
get response, please check how your address is written in the message
header. I can't answer if I don't have a valid reply address.
fs/isofs/inode.c
View file @
40820e9a
...
...
@@ -145,6 +145,43 @@ static int parse_options(char *options, struct iso9660_options * popt)
return
1
;
}
static
unsigned
int
isofs_get_last_session
(
int
dev
)
{
struct
cdrom_multisession
ms_info
;
unsigned
int
vol_desc_start
;
struct
inode
inode_fake
;
extern
struct
file_operations
*
get_blkfops
(
unsigned
int
);
int
i
;
/*
* look if the driver can tell the multi session redirection value
* <emoenke@gwdg.de>
*/
vol_desc_start
=
0
;
if
(
get_blkfops
(
MAJOR
(
dev
))
->
ioctl
!=
NULL
)
{
inode_fake
.
i_rdev
=
dev
;
ms_info
.
addr_format
=
CDROM_LBA
;
set_fs
(
KERNEL_DS
);
i
=
get_blkfops
(
MAJOR
(
dev
))
->
ioctl
(
&
inode_fake
,
NULL
,
CDROMMULTISESSION
,
(
unsigned
long
)
&
ms_info
);
set_fs
(
USER_DS
);
#if 0
printk("isofs.inode: CDROMMULTISESSION: rc=%d\n",i);
if (i==0)
{
printk("isofs.inode: XA disk: %s\n", ms_info.xa_flag ? "yes":"no");
printk("isofs.inode: vol_desc_start = %d\n", ms_info.addr.lba);
}
#endif 0
if
((
i
==
0
)
&&
(
ms_info
.
xa_flag
))
vol_desc_start
=
ms_info
.
addr
.
lba
;
}
return
vol_desc_start
;
}
struct
super_block
*
isofs_read_super
(
struct
super_block
*
s
,
void
*
data
,
int
silent
)
{
...
...
@@ -153,11 +190,8 @@ struct super_block *isofs_read_super(struct super_block *s,void *data,
unsigned
int
blocksize_bits
;
int
high_sierra
;
int
dev
=
s
->
s_dev
;
int
i
;
struct
cdrom_multisession
ms_info
;
unsigned
int
vol_desc_start
;
struct
inode
inode_fake
;
extern
struct
file_operations
*
get_blkfops
(
unsigned
int
);
struct
iso_volume_descriptor
*
vdp
;
struct
hs_volume_descriptor
*
hdp
;
...
...
@@ -200,31 +234,8 @@ struct super_block *isofs_read_super(struct super_block *s,void *data,
s
->
u
.
isofs_sb
.
s_high_sierra
=
high_sierra
=
0
;
/* default is iso9660 */
/*
* look if the driver can tell the multi session redirection value
* <emoenke@gwdg.de>
*/
vol_desc_start
=
0
;
if
(
get_blkfops
(
MAJOR
(
dev
))
->
ioctl
!=
NULL
)
{
inode_fake
.
i_rdev
=
dev
;
ms_info
.
addr_format
=
CDROM_LBA
;
set_fs
(
KERNEL_DS
);
i
=
get_blkfops
(
MAJOR
(
dev
))
->
ioctl
(
&
inode_fake
,
NULL
,
CDROMMULTISESSION
,
(
unsigned
long
)
&
ms_info
);
set_fs
(
USER_DS
);
#if 0
printk("isofs.inode: CDROMMULTISESSION: rc=%d\n",i);
if (i==0)
{
printk("isofs.inode: XA disk: %s\n", ms_info.xa_flag ? "yes":"no");
printk("isofs.inode: vol_desc_start = %d\n", ms_info.addr.lba);
}
#endif 0
if
((
i
==
0
)
&&
(
ms_info
.
xa_flag
))
vol_desc_start
=
ms_info
.
addr
.
lba
;
}
vol_desc_start
=
isofs_get_last_session
(
dev
);
for
(
iso_blknum
=
vol_desc_start
+
16
;
iso_blknum
<
vol_desc_start
+
100
;
iso_blknum
++
)
{
#if 0
printk("isofs.inode: iso_blknum=%d\n", iso_blknum);
...
...
fs/nfs/sock.c
View file @
40820e9a
...
...
@@ -37,9 +37,6 @@
* ***FIXME*** should probably put this in nfs_fs.h */
#define NFS_SLACK_SPACE 1024
extern
struct
socket
*
socki_lookup
(
struct
inode
*
inode
);
#define _S(nr) (1<<((nr)-1))
/*
...
...
@@ -81,7 +78,7 @@ static int do_nfs_rpc_call(struct nfs_server *server, int *start, int *end, int
file
=
server
->
file
;
inode
=
file
->
f_inode
;
select
=
file
->
f_op
->
select
;
sock
=
socki_lookup
(
inode
)
;
sock
=
&
inode
->
u
.
socket_i
;
if
(
!
sock
)
{
printk
(
"nfs_rpc_call: socki_lookup failed
\n
"
);
return
-
EBADF
;
...
...
include/asm-i386/bugs.h
View file @
40820e9a
...
...
@@ -94,7 +94,7 @@ static void check_fpu(void)
return
;
}
printk
(
"
Ok
, FDIV bug i%c86 system
\n
"
,
'0'
+
x86
);
printk
(
"
Hmm
, FDIV bug i%c86 system
\n
"
,
'0'
+
x86
);
}
static
void
check_hlt
(
void
)
...
...
include/asm-sparc/cprefix.h
View file @
40820e9a
/* cprefix.h: This file is included by assembly source which needs
* to know what the c-label prefixes are. The newer versions
* of cpp that come with gcc predefine such things to help
* us out. The reason this stuff is ne
a
ded is to make
* us out. The reason this stuff is ne
e
ded is to make
* solaris compiles of the kernel work.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
...
...
include/linux/pci.h
View file @
40820e9a
...
...
@@ -226,8 +226,10 @@ struct pci_class_type {
#define PCI_DEVICE_ID_DEC_TULIP 0x0002
#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009
#define PCI_DEVICE_ID_DEC_FDDI 0x000F
#define PCI_DEVICE_ID_DEC_BRD 0x0001
#define PCI_VENDOR_ID_MATROX 0x102B
#define PCI_DEVICE_ID_MATROX_2plus 0x0518
#define PCI_VENDOR_ID_INTEL 0x8086
#define PCI_DEVICE_ID_INTEL_82378 0x0484
...
...
@@ -262,13 +264,13 @@ struct pci_class_type {
#define PCI_DEVICE_ID_AI_M1435 0x1435
#define PCI_VENDOR_ID_AL 0x10b9
#define PCI_DEVICE_ID_AL_M1449 0x
4
449
#define PCI_DEVICE_ID_AL_M1449 0x
1
449
#define PCI_DEVICE_ID_AL_M1451 0x1451
#define PCI_VENDOR_ID_TSENG 0x100c
#define PCI_DEVICE_ID_TSENG_W32P_2 0x3202
#define PCI_DEVICE_ID_TSENG_W32P_b 0x3205
#define PCI_DEVICE_ID_TSENG_W32P_
a
0x3207
#define PCI_DEVICE_ID_TSENG_W32P_
c
0x3207
#define PCI_VENDOR_ID_CMD 0x1095
#define PCI_DEVICE_ID_CMD_640 0x0640
...
...
@@ -290,6 +292,7 @@ struct pci_class_type {
#define PCI_VENDOR_ID_TRIDENT 0x1023
#define PCI_DEVICE_ID_TRIDENT_9420 0x9420
#define PCI_DEVICE_ID_TRIDENT_9440 0x9440
#define PCI_VENDOR_ID_CONTAQ 0x1080
#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600
...
...
@@ -300,19 +303,30 @@ struct pci_class_type {
#define PCI_DEVICE_ID_VIA_82C505 0x0505
#define PCI_VENDOR_ID_SI 0x1039
#define PCI_DEVICE_ID_SI_MG1936 0x0406
#define PCI_DEVICE_ID_SI_MG1938 0x0008
#define PCI_DEVICE_ID_SI_496 0x0496
#define PCI_DEVICE_ID_SI_501 0x0406
#define PCI_DEVICE_ID_SI_503 0x0008
#define PCI_VENDOR_ID_LEADTEK 0x107d
#define PCI_DEVICE_ID_LEADTEK_805 0x0000
#define PCI_VENDOR_ID_IMS 0x10e0
#define PCI_DEVICE_ID_IMS_8849 0x8849
#define PCI_VENDOR_ID_ZEINET 0x1193
#define PCI_DEVICE_ID_ZEINET_1221 0x0001
#define PCI_VENDOR_ID_EF 0x111a
#define PCI_DEVICE_ID_EF_ATM 0x0000
struct
pci_vendor_type
{
unsigned
short
vendor_id
;
char
*
vendor_name
;
};
#define PCI_VENDOR_NUM 3
0
#define PCI_VENDOR_NUM 3
3
#define PCI_VENDOR_TYPE { \
{PCI_VENDOR_ID_NCR, "NCR"}, \
{PCI_VENDOR_ID_ADAPTEC, "Adaptec"}, \
...
...
@@ -343,7 +357,10 @@ struct pci_vendor_type {
{PCI_VENDOR_ID_NS, "NS"}, \
{PCI_VENDOR_ID_VIA, "VIA Technologies"}, \
{PCI_VENDOR_ID_SI, "Silicon Integrated"}, \
{PCI_VENDOR_ID_LEADTEK, "Leadtek Research"} \
{PCI_VENDOR_ID_LEADTEK, "Leadtek Research"}, \
{PCI_VENDOR_ID_IMS, "IMS"}, \
{PCI_VENDOR_ID_ZEINET, "ZeiNet"}, \
{PCI_VENDOR_ID_EF, "Efficient Networks"} \
}
...
...
@@ -362,7 +379,7 @@ struct pci_device_type {
char
*
device_name
;
};
#define PCI_DEVICE_NUM
54
#define PCI_DEVICE_NUM
61
#define PCI_DEVICE_TYPE { \
{0xff, PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, "53c810"}, \
{0xff, PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C815, "53c815"}, \
...
...
@@ -385,6 +402,8 @@ struct pci_device_type {
{0xff, PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, "DC21040"}, \
{0xff, PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, "DC21040"}, \
{0xff, PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_FDDI, "DEFPA"}, \
{0xff, PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_BRD, "DC21050"}, \
{0xff, PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_2plus, "MGA/2+"}, \
{0xff, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, "82378IB"}, \
{0x00, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424, "82424ZX Saturn"}, \
{0xff, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, "82375EB"}, \
...
...
@@ -405,7 +424,7 @@ struct pci_device_type {
{0xff, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1451, "M1451"}, \
{0xff, PCI_VENDOR_ID_TSENG, PCI_DEVICE_ID_TSENG_W32P_2, "ET4000W32P"}, \
{0xff, PCI_VENDOR_ID_TSENG, PCI_DEVICE_ID_TSENG_W32P_b, "ET4000W32P rev B"}, \
{0xff, PCI_VENDOR_ID_TSENG, PCI_DEVICE_ID_TSENG_W32P_
a, "ET4000W32P rev A
"}, \
{0xff, PCI_VENDOR_ID_TSENG, PCI_DEVICE_ID_TSENG_W32P_
c, "ET4000W32P rev C
"}, \
{0xff, PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_640, "640A"}, \
{0xff, PCI_VENDOR_ID_VISION, PCI_DEVICE_ID_VISION_QD8500, "QD-8500PCI"}, \
{0xff, PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, "79C970"}, \
...
...
@@ -413,11 +432,16 @@ struct pci_device_type {
{0xff, PCI_VENDOR_ID_ADL, PCI_DEVICE_ID_ADL_2301, "2301"}, \
{0xff, PCI_VENDOR_ID_SYMPHONY, PCI_DEVICE_ID_SYMPHONY_101, "82C101"}, \
{0xff, PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_9420, "TG 9420"}, \
{0xff, PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_9440, "TG 9440"}, \
{0xff, PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C599, "82C599"}, \
{0xff, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C505, "VT 82C505"}, \
{0xff, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_MG1936, "MG1936 ??"}, \
{0xff, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_MG1938, "MG1938 ??"}, \
{0xff, PCI_VENDOR_ID_LEADTEK, PCI_DEVICE_ID_LEADTEK_805, "S3 805"} \
{0xff, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, "85C496"}, \
{0xff, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_501, "85C501"}, \
{0xff, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, "85C503"}, \
{0xff, PCI_VENDOR_ID_LEADTEK, PCI_DEVICE_ID_LEADTEK_805, "S3 805"}, \
{0xff, PCI_VENDOR_ID_IMS, PCI_DEVICE_ID_IMS_8849, "8849"}, \
{0xff, PCI_VENDOR_ID_ZEINET, PCI_DEVICE_ID_ZEINET_1221, "1221"}, \
{0xff, PCI_VENDOR_ID_EF, PCI_DEVICE_ID_EF_ATM, "155P-MF1"} \
}
/* An item of this structure has the following meaning */
...
...
include/linux/serial.h
View file @
40820e9a
...
...
@@ -22,18 +22,9 @@ struct serial_struct {
unsigned
short
close_delay
;
char
reserved_char
[
2
];
int
hub6
;
unsigned
short
closing_wait
;
/* time to wait before rcvr shutdown */
unsigned
short
closing_wait2
;
/* time to wait after rcvr shutdown */
int
reserved
[
4
];
int
reserved
[
5
];
};
/*
* For the close wait times, 0 means wait forever for serial port to
* flush its output. 65535 means don't wait at all.
*/
#define ASYNC_CLOSING_WAIT_INF 0
#define ASYNC_CLOSING_WAIT_NONE 65535
/*
* These are the supported serial types.
*/
...
...
@@ -42,9 +33,8 @@ struct serial_struct {
#define PORT_16450 2
#define PORT_16550 3
#define PORT_16550A 4
#define PORT_CIRRUS 5
/* Hey! Who put this there? */
#define PORT_16650 6
#define PORT_MAX 6
#define PORT_CIRRUS 5
#define PORT_MAX 5
/*
* Definitions for async_struct (and serial_struct) flags field
...
...
@@ -106,8 +96,6 @@ struct async_struct {
int
custom_divisor
;
int
x_char
;
/* xon/xoff character */
int
close_delay
;
unsigned
short
closing_wait
;
unsigned
short
closing_wait2
;
int
IER
;
/* Interrupt Enable Register */
int
MCR
;
/* Modem control register */
int
MCR_noint
;
/* MCR with interrupts off */
...
...
include/linux/serial_reg.h
View file @
40820e9a
...
...
@@ -21,8 +21,6 @@
#define UART_IER 1
/* Out: Interrupt Enable Register */
#define UART_IIR 2
/* In: Interrupt ID Register */
#define UART_FCR 2
/* Out: FIFO Control Register */
#define UART_EFR 2
/* I/O: Extended Features Register */
/* (DLAB=1, 16C660 only) */
#define UART_LCR 3
/* Out: Line Control Register */
#define UART_MCR 4
/* Out: Modem Control Register */
#define UART_LSR 5
/* In: Line Status Register */
...
...
@@ -31,7 +29,6 @@
/*
* These are the definitions for the FIFO Control Register
* (16650 only)
*/
#define UART_FCR_ENABLE_FIFO 0x01
/* Enable the FIFO */
#define UART_FCR_CLEAR_RCVR 0x02
/* Clear the RCVR FIFO */
...
...
@@ -42,15 +39,6 @@
#define UART_FCR_TRIGGER_4 0x40
/* Mask for trigger set at 4 */
#define UART_FCR_TRIGGER_8 0x80
/* Mask for trigger set at 8 */
#define UART_FCR_TRIGGER_14 0xC0
/* Mask for trigger set at 14 */
/* 16650 redefinitions */
#define UART_FCR6_R_TRIGGER_8 0x00
/* Mask for receive trigger set at 1 */
#define UART_FCR6_R_TRIGGER_16 0x40
/* Mask for receive trigger set at 4 */
#define UART_FCR6_R_TRIGGER_24 0x80
/* Mask for receive trigger set at 8 */
#define UART_FCR6_R_TRIGGER_28 0xC0
/* Mask for receive trigger set at 14 */
#define UART_FCR6_T_TRIGGER_16 0x00
/* Mask for transmit trigger set at 16 */
#define UART_FCR6_T_TRIGGER_8 0x10
/* Mask for transmit trigger set at 8 */
#define UART_FCR6_T_TRIGGER_24 0x20
/* Mask for transmit trigger set at 24 */
#define UART_FCR6_T_TRIGGER_30 0x30
/* Mask for transmit trigger set at 30 */
/*
* These are the definitions for the Line Control Register
...
...
@@ -121,17 +109,5 @@
#define UART_MSR_DCTS 0x01
/* Delta CTS */
#define UART_MSR_ANY_DELTA 0x0F
/* Any of the delta bits! */
/*
* These are the definitions for the Extended Features Register
* (StarTech 16C660 only, when DLAB=1)
*/
#define UART_EFR_CTS 0x80
/* CTS flow control */
#define UART_EFR_RTS 0x40
/* RTS flow control */
#define UART_EFR_SCD 0x20
/* Special character detect */
#define UART_EFR_ENI 0x10
/* Enhanced Interrupt */
/*
* the low four bits control software flow control
*/
#endif
/* _LINUX_SERIAL_REG_H */
include/linux/tty.h
View file @
40820e9a
...
...
@@ -283,7 +283,7 @@ extern int tty_paranoia_check(struct tty_struct *tty, dev_t device,
const
char
*
routine
);
extern
char
*
_tty_name
(
struct
tty_struct
*
tty
,
char
*
buf
);
extern
char
*
tty_name
(
struct
tty_struct
*
tty
);
extern
void
wait_until_sent
(
struct
tty_struct
*
tty
,
int
timeout
);
extern
void
tty_
wait_until_sent
(
struct
tty_struct
*
tty
,
int
timeout
);
extern
int
tty_check_change
(
struct
tty_struct
*
tty
);
extern
void
stop_tty
(
struct
tty_struct
*
tty
);
extern
void
start_tty
(
struct
tty_struct
*
tty
);
...
...
ipc/sem.c
View file @
40820e9a
...
...
@@ -9,7 +9,7 @@
* wake up processes that were waiting for semval to go to 0 if the
* value went to 0 and was then incremented rapidly enough. In solving
* this problem I have also modified the implementation so that it
* processes pending operations in a FIFO manner, thus give a guar
e
ntee
* processes pending operations in a FIFO manner, thus give a guar
a
ntee
* that processes waiting for a lock on the semaphore won't starve
* unless another locking process fails to unlock.
* In addition the following two changes in behavior have been introduced:
...
...
@@ -20,7 +20,7 @@
* have read permissions. The implementation now returns 0
* on success as stated in the manual page.
* - There is some confusion over whether the set of undo adjustments
* to be peformed at exit should be done in an atomic manner.
* to be pe
r
formed at exit should be done in an atomic manner.
* That is, if we are attempting to decrement the semval should we queue
* up and wait until we can do so legally?
* The original implementation attempted to do this.
...
...
kernel/ksyms.c
View file @
40820e9a
...
...
@@ -173,6 +173,12 @@ struct symbol_table symbol_table = {
X
(
register_serial
),
X
(
unregister_serial
),
/* tty routines */
X
(
tty_hangup
),
X
(
tty_wait_until_sent
),
X
(
tty_check_change
),
X
(
tty_hung_up_p
),
/* filesystem registration */
X
(
register_filesystem
),
X
(
unregister_filesystem
),
...
...
mm/memory.c
View file @
40820e9a
...
...
@@ -268,116 +268,149 @@ int copy_page_tables(struct task_struct * tsk)
return
0
;
}
/*
* a more complete version of free_page_tables which performs with page
* granularity.
*/
int
unmap_page_range
(
unsigned
long
from
,
unsigned
long
size
)
static
inline
void
forget_pte
(
pte_t
page
)
{
pgd_t
page_dir
,
*
dir
;
pte_t
page
,
*
page_table
;
unsigned
long
poff
,
pcnt
,
pc
;
if
(
from
&
~
PAGE_MASK
)
{
printk
(
"unmap_page_range called with wrong alignment
\n
"
);
return
-
EINVAL
;
}
size
=
(
size
+
~
PAGE_MASK
)
>>
PAGE_SHIFT
;
dir
=
PAGE_DIR_OFFSET
(
current
,
from
);
poff
=
(
from
>>
PAGE_SHIFT
)
&
(
PTRS_PER_PAGE
-
1
);
if
((
pcnt
=
PTRS_PER_PAGE
-
poff
)
>
size
)
pcnt
=
size
;
for
(
;
size
>
0
;
++
dir
,
size
-=
pcnt
,
pcnt
=
(
size
>
PTRS_PER_PAGE
?
PTRS_PER_PAGE
:
size
))
{
page_dir
=
*
dir
;
if
(
pgd_none
(
page_dir
))
{
poff
=
0
;
continue
;
}
if
(
pgd_bad
(
page_dir
))
{
printk
(
"unmap_page_range: bad page directory."
);
continue
;
}
page_table
=
(
pte_t
*
)
pgd_page
(
page_dir
);
if
(
poff
)
{
page_table
+=
poff
;
poff
=
0
;
}
for
(
pc
=
pcnt
;
pc
--
;
page_table
++
)
{
page
=
*
page_table
;
if
(
!
pte_none
(
page
))
{
pte_clear
(
page_table
);
if
(
pte_none
(
page
))
return
;
if
(
pte_present
(
page
))
{
if
(
!
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
&
MAP_PAGE_RESERVED
))
if
(
current
->
mm
->
rss
>
0
)
--
current
->
mm
->
rss
;
free_page
(
pte_page
(
page
));
}
else
swap_free
(
pte_val
(
page
));
if
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
&
MAP_PAGE_RESERVED
)
return
;
if
(
current
->
mm
->
rss
<=
0
)
return
;
current
->
mm
->
rss
--
;
return
;
}
swap_free
(
pte_val
(
page
));
}
static
inline
void
unmap_pte_range
(
pmd_t
*
pmd
,
unsigned
long
address
,
unsigned
long
size
)
{
pte_t
*
pte
;
unsigned
long
end
;
if
(
pmd_none
(
*
pmd
))
return
;
if
(
pmd_bad
(
*
pmd
))
{
printk
(
"unmap_pte_range: bad pmd (%08lx)
\n
"
,
pmd_val
(
*
pmd
));
pmd_clear
(
pmd
);
return
;
}
if
(
pcnt
==
PTRS_PER_PAGE
)
{
pte
=
pte_offset
(
pmd
,
address
);
address
&=
~
PMD_MASK
;
end
=
address
+
size
;
if
(
end
>=
PMD_SIZE
)
end
=
PMD_SIZE
;
do
{
pte_t
page
=
*
pte
;
pte_clear
(
pte
);
forget_pte
(
page
);
address
+=
PAGE_SIZE
;
pte
++
;
}
while
(
address
<
end
);
}
static
inline
void
unmap_pmd_range
(
pgd_t
*
dir
,
unsigned
long
address
,
unsigned
long
size
)
{
pmd_t
*
pmd
;
unsigned
long
end
;
if
(
pgd_none
(
*
dir
))
return
;
if
(
pgd_bad
(
*
dir
))
{
printk
(
"unmap_pmd_range: bad pgd (%08lx)
\n
"
,
pgd_val
(
*
dir
));
pgd_clear
(
dir
);
free_page
(
pgd_page
(
page_dir
))
;
return
;
}
pmd
=
pmd_offset
(
dir
,
address
);
address
&=
~
PGDIR_MASK
;
end
=
address
+
size
;
if
(
end
>
PGDIR_SIZE
)
end
=
PGDIR_SIZE
;
do
{
unmap_pte_range
(
pmd
,
address
,
end
-
address
);
address
=
(
address
+
PMD_SIZE
)
&
PMD_MASK
;
pmd
++
;
}
while
(
address
<
end
);
}
/*
* a more complete version of free_page_tables which performs with page
* granularity.
*/
int
unmap_page_range
(
unsigned
long
address
,
unsigned
long
size
)
{
pgd_t
*
dir
;
unsigned
long
end
=
address
+
size
;
dir
=
pgd_offset
(
current
,
address
);
while
(
address
<
end
)
{
unmap_pmd_range
(
dir
,
address
,
end
-
address
);
address
=
(
address
+
PGDIR_SIZE
)
&
PGDIR_MASK
;
dir
++
;
}
invalidate
();
return
0
;
}
int
zeromap_page_range
(
unsigned
long
from
,
unsigned
long
size
,
pgprot_t
prot
)
static
inline
void
zeromap_pte_range
(
pte_t
*
pte
,
unsigned
long
address
,
unsigned
long
size
,
pte_t
zero_pte
)
{
unsigned
long
end
;
address
&=
~
PMD_MASK
;
end
=
address
+
size
;
if
(
end
>
PMD_SIZE
)
end
=
PMD_SIZE
;
do
{
pte_t
oldpage
=
*
pte
;
*
pte
=
zero_pte
;
forget_pte
(
oldpage
);
address
+=
PAGE_SIZE
;
pte
++
;
}
while
(
address
<
end
);
}
static
inline
int
zeromap_pmd_range
(
pmd_t
*
pmd
,
unsigned
long
address
,
unsigned
long
size
,
pte_t
zero_pte
)
{
unsigned
long
end
;
address
&=
~
PGDIR_MASK
;
end
=
address
+
size
;
if
(
end
>
PGDIR_SIZE
)
end
=
PGDIR_SIZE
;
do
{
pte_t
*
pte
=
pte_alloc
(
pmd
,
address
);
if
(
!
pte
)
return
-
ENOMEM
;
zeromap_pte_range
(
pte
,
address
,
end
-
address
,
zero_pte
);
address
=
(
address
+
PMD_SIZE
)
&
PMD_MASK
;
pmd
++
;
}
while
(
address
<
end
);
return
0
;
}
int
zeromap_page_range
(
unsigned
long
address
,
unsigned
long
size
,
pgprot_t
prot
)
{
int
error
=
0
;
pgd_t
*
dir
;
pte_t
*
page_table
;
unsigned
long
poff
,
pcnt
;
unsigned
long
end
=
address
+
size
;
pte_t
zero_pte
;
if
(
from
&
~
PAGE_MASK
)
{
printk
(
"zeromap_page_range: from = %08lx
\n
"
,
from
);
return
-
EINVAL
;
}
zero_pte
=
pte_wrprotect
(
mk_pte
(
ZERO_PAGE
,
prot
));
dir
=
PAGE_DIR_OFFSET
(
current
,
from
);
size
=
(
size
+
~
PAGE_MASK
)
>>
PAGE_SHIFT
;
poff
=
(
from
>>
PAGE_SHIFT
)
&
(
PTRS_PER_PAGE
-
1
);
if
((
pcnt
=
PTRS_PER_PAGE
-
poff
)
>
size
)
pcnt
=
size
;
while
(
size
>
0
)
{
if
(
!
pgd_present
(
*
dir
))
{
if
(
!
(
page_table
=
(
pte_t
*
)
get_free_page
(
GFP_KERNEL
)))
{
invalidate
();
return
-
ENOMEM
;
}
if
(
pgd_present
(
*
dir
))
{
free_page
((
unsigned
long
)
page_table
);
page_table
=
(
pte_t
*
)
pgd_page
(
*
dir
);
}
else
pgd_set
(
dir
,
page_table
);
}
else
page_table
=
(
pte_t
*
)
pgd_page
(
*
dir
);
dir
=
pgd_offset
(
current
,
address
);
while
(
address
<
end
)
{
pmd_t
*
pmd
=
pmd_alloc
(
dir
,
address
);
error
=
-
ENOMEM
;
if
(
!
pmd
)
break
;
error
=
zeromap_pmd_range
(
pmd
,
address
,
end
-
address
,
zero_pte
);
if
(
error
)
break
;
address
=
(
address
+
PGDIR_SIZE
)
&
PGDIR_MASK
;
dir
++
;
page_table
+=
poff
;
poff
=
0
;
for
(
size
-=
pcnt
;
pcnt
--
;)
{
pte_t
page
=
*
page_table
;
if
(
!
pte_none
(
page
))
{
pte_clear
(
page_table
);
if
(
pte_present
(
page
))
{
if
(
!
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
&
MAP_PAGE_RESERVED
))
if
(
current
->
mm
->
rss
>
0
)
--
current
->
mm
->
rss
;
free_page
(
pte_page
(
page
));
}
else
swap_free
(
pte_val
(
page
));
}
*
page_table
++
=
zero_pte
;
}
pcnt
=
(
size
>
PTRS_PER_PAGE
?
PTRS_PER_PAGE
:
size
);
}
invalidate
();
return
0
;
return
error
;
}
/*
...
...
net/inet/icmp.c
View file @
40820e9a
...
...
@@ -372,11 +372,14 @@ static void icmp_redirect(struct icmphdr *icmph, struct sk_buff *skb,
* Add better route to host.
* But first check that the redirect
* comes from the old gateway..
* And make sure it's an ok host address
* (not some confused thing sending our
* address)
*/
rt
=
ip_rt_route
(
ip
,
NULL
,
NULL
);
if
(
!
rt
)
break
;
if
(
rt
->
rt_gateway
!=
source
)
if
(
rt
->
rt_gateway
!=
source
||
ip_chk_addr
(
icmph
->
un
.
gateway
)
)
break
;
printk
(
"redirect from %s
\n
"
,
in_ntoa
(
source
));
ip_rt_add
((
RTF_DYNAMIC
|
RTF_MODIFIED
|
RTF_HOST
|
RTF_GATEWAY
),
...
...
net/inet/ip_fw.c
View file @
40820e9a
...
...
@@ -424,7 +424,7 @@ void ip_acct_cnt(struct iphdr *ip,struct ip_fw *chain)
}
/* End of whole function */
#endif
/* CONFIG_IP_ACCT */
#if
def CONFIG_IP_ACCT
#if
defined(CONFIG_IP_ACCT) || defined(CONFIG_IP_FIREWALL)
static
void
zero_fw_chain
(
struct
ip_fw
*
chainptr
)
{
...
...
@@ -437,10 +437,6 @@ static void zero_fw_chain(struct ip_fw *chainptr)
}
}
#endif
#if defined(CONFIG_IP_ACCT) || defined(CONFIG_IP_FIREWALL)
static
void
free_fw_chain
(
struct
ip_fw
*
volatile
*
chainptr
)
{
unsigned
long
flags
;
...
...
net/inet/tcp.c
View file @
40820e9a
...
...
@@ -371,7 +371,9 @@ static void tcp_close_pending (struct sock *sk)
{
struct
sk_buff
*
skb
;
while
((
skb
=
skb_dequeue
(
&
sk
->
receive_queue
))
!=
NULL
)
{
while
((
skb
=
skb_dequeue
(
&
sk
->
receive_queue
))
!=
NULL
)
{
skb
->
sk
->
dead
=
1
;
tcp_close
(
skb
->
sk
,
0
);
kfree_skb
(
skb
,
FREE_READ
);
}
...
...
@@ -607,10 +609,11 @@ static int tcp_write_timeout(struct sock *sk)
{
sk
->
err
=
ETIMEDOUT
;
sk
->
error_report
(
sk
);
del_timer
(
&
sk
->
retransmit_timer
);
/*
* Time wait the socket
*/
if
(
sk
->
state
==
TCP_FIN_WAIT1
||
sk
->
state
==
TCP_FIN_WAIT2
||
sk
->
state
==
TCP_CLOSING
)
if
(
sk
->
state
==
TCP_FIN_WAIT1
||
sk
->
state
==
TCP_FIN_WAIT2
||
sk
->
state
==
TCP_CLOSING
)
{
tcp_set_state
(
sk
,
TCP_TIME_WAIT
);
reset_msl_timer
(
sk
,
TIME_CLOSE
,
TCP_TIMEWAIT_LEN
);
...
...
@@ -2850,6 +2853,8 @@ static void tcp_conn_request(struct sock *sk, struct sk_buff *skb,
{
sk
->
err
=
-
ENOMEM
;
newsk
->
dead
=
1
;
newsk
->
state
=
TCP_CLOSE
;
/* And this will destroy it */
release_sock
(
newsk
);
kfree_skb
(
skb
,
FREE_READ
);
tcp_statistics
.
TcpAttemptFails
++
;
...
...
@@ -2879,6 +2884,7 @@ static void tcp_conn_request(struct sock *sk, struct sk_buff *skb,
buff
->
free
=
1
;
kfree_skb
(
buff
,
FREE_WRITE
);
newsk
->
dead
=
1
;
newsk
->
state
=
TCP_CLOSE
;
release_sock
(
newsk
);
skb
->
sk
=
sk
;
kfree_skb
(
skb
,
FREE_READ
);
...
...
@@ -2917,8 +2923,6 @@ static void tcp_conn_request(struct sock *sk, struct sk_buff *skb,
tcp_send_check
(
t1
,
daddr
,
saddr
,
sizeof
(
*
t1
)
+
4
,
newsk
);
newsk
->
prot
->
queue_xmit
(
newsk
,
ndev
,
buff
,
0
);
reset_xmit_timer
(
newsk
,
TIME_WRITE
,
newsk
->
rto
);
reset_xmit_timer
(
newsk
,
TIME_WRITE
,
TCP_TIMEOUT_INIT
);
skb
->
sk
=
newsk
;
...
...
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