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
a89a2558
Commit
a89a2558
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 1.3.41
parent
c6545c79
Changes
31
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
1914 additions
and
1341 deletions
+1914
-1341
Makefile
Makefile
+2
-2
arch/alpha/defconfig
arch/alpha/defconfig
+11
-2
arch/alpha/kernel/head.S
arch/alpha/kernel/head.S
+0
-1
arch/alpha/kernel/setup.c
arch/alpha/kernel/setup.c
+1
-20
arch/alpha/mm/fault.c
arch/alpha/mm/fault.c
+0
-1
drivers/block/floppy.c
drivers/block/floppy.c
+7
-7
drivers/cdrom/mcd.c
drivers/cdrom/mcd.c
+67
-101
drivers/cdrom/mcdx.c
drivers/cdrom/mcdx.c
+225
-94
drivers/char/Config.in
drivers/char/Config.in
+1
-1
drivers/char/Makefile
drivers/char/Makefile
+5
-1
drivers/char/cyclades.c
drivers/char/cyclades.c
+58
-18
drivers/net/3c505.c
drivers/net/3c505.c
+16
-4
drivers/net/arcnet.c
drivers/net/arcnet.c
+774
-734
drivers/net/eth16i.c
drivers/net/eth16i.c
+0
-1
drivers/pci/pci.c
drivers/pci/pci.c
+3
-2
drivers/scsi/aic7xxx.c
drivers/scsi/aic7xxx.c
+617
-247
drivers/scsi/aic7xxx.seq
drivers/scsi/aic7xxx.seq
+14
-15
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+35
-15
drivers/scsi/scsi.h
drivers/scsi/scsi.h
+1
-0
drivers/scsi/sd.c
drivers/scsi/sd.c
+6
-0
fs/ext2/super.c
fs/ext2/super.c
+2
-2
fs/msdos/inode.c
fs/msdos/inode.c
+1
-1
include/asm-alpha/system.h
include/asm-alpha/system.h
+28
-26
include/asm-i386/ioctl.h
include/asm-i386/ioctl.h
+20
-34
include/asm-i386/irq.h
include/asm-i386/irq.h
+1
-1
include/linux/mcd.h
include/linux/mcd.h
+2
-3
include/linux/mcdx.h
include/linux/mcdx.h
+11
-6
include/linux/pci.h
include/linux/pci.h
+1
-0
include/linux/tty.h
include/linux/tty.h
+1
-0
kernel/ksyms.c
kernel/ksyms.c
+2
-0
net/ipv4/proc.c
net/ipv4/proc.c
+2
-2
No files found.
Makefile
View file @
a89a2558
VERSION
=
1
VERSION
=
1
PATCHLEVEL
=
3
PATCHLEVEL
=
3
SUBLEVEL
=
4
0
SUBLEVEL
=
4
1
ARCH
=
i386
ARCH
=
i386
...
@@ -323,5 +323,5 @@ include Rules.make
...
@@ -323,5 +323,5 @@ include Rules.make
.hdepend
:
dummy
.hdepend
:
dummy
rm
-f
$@
rm
-f
$@
$(AWK)
-f
scripts/depend.awk
`
find
$(HPATH)
-name
\*
.h
-print
`
>
.
$@
$(AWK)
-f
scripts/depend.awk
`
find
$(HPATH)
-name
\*
.h
!
-name
modversions.h
-print
`
>
.
$@
mv
.
$@
$@
mv
.
$@
$@
arch/alpha/defconfig
View file @
a89a2558
...
@@ -6,10 +6,19 @@
...
@@ -6,10 +6,19 @@
# General setup
# General setup
#
#
CONFIG_NATIVE=y
CONFIG_NATIVE=y
# CONFIG_ALPHA_AVANTI is not set
# CONFIG_ALPHA_JENSEN is not set
# CONFIG_ALPHA_NONAME is not set
CONFIG_ALPHA_CABRIOLET=y
CONFIG_ALPHA_CABRIOLET=y
# CONFIG_ALPHA_EB66 is not set
# CONFIG_ALPHA_EB66P is not set
# CONFIG_ALPHA_EB64 is not set
# CONFIG_ALPHA_EB64P is not set
# CONFIG_ALPHA_SRM is not set
# CONFIG_ALPHA_SRM is not set
CONFIG_PCI=y
CONFIG_PCI=y
CONFIG_ALPHA_APECS=y
CONFIG_ALPHA_APECS=y
# CONFIG_SERIAL_ECHO is not set
# CONFIG_TGA_CONSOLE is not set
CONFIG_PCI_OPTIMIZE=y
CONFIG_PCI_OPTIMIZE=y
CONFIG_NET=y
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC=y
...
@@ -31,8 +40,8 @@ CONFIG_ST506=y
...
@@ -31,8 +40,8 @@ CONFIG_ST506=y
#
#
# CONFIG_BLK_DEV_HD is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDE=y
# CONFIG_BLK_DEV_TRITON is not set
# CONFIG_BLK_DEV_IDECD is not set
# CONFIG_BLK_DEV_IDECD is not set
# CONFIG_BLK_DEV_TRITON is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_DEV_XD is not set
#
#
...
@@ -43,7 +52,6 @@ CONFIG_INET=y
...
@@ -43,7 +52,6 @@ CONFIG_INET=y
# CONFIG_IP_FORWARD is not set
# CONFIG_IP_FORWARD is not set
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ACCT is not set
# CONFIG_IP_ACCT is not set
# CONFIG_NET_IPIP is not set
#
#
# (it is safe to leave these untouched)
# (it is safe to leave these untouched)
...
@@ -120,6 +128,7 @@ CONFIG_DUMMY=m
...
@@ -120,6 +128,7 @@ CONFIG_DUMMY=m
CONFIG_NET_EISA=y
CONFIG_NET_EISA=y
# CONFIG_APRICOT is not set
# CONFIG_APRICOT is not set
CONFIG_DE4X5=y
CONFIG_DE4X5=y
# CONFIG_ETH16 is not set
# CONFIG_ZNET is not set
# CONFIG_ZNET is not set
# CONFIG_NET_POCKET is not set
# CONFIG_NET_POCKET is not set
# CONFIG_TR is not set
# CONFIG_TR is not set
...
...
arch/alpha/kernel/head.S
View file @
a89a2558
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
#define __ASSEMBLY__
#define __ASSEMBLY__
#include <asm/system.h>
#include <asm/system.h>
#include <linux/fd.h>
#define halt .long PAL_halt
#define halt .long PAL_halt
...
...
arch/alpha/kernel/setup.c
View file @
a89a2558
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <linux/a.out.h>
#include <linux/a.out.h>
#include <linux/tty.h>
#include <linux/tty.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/config.h>
/* CONFIG_ALPHA_LCA etc */
#include <asm/segment.h>
#include <asm/segment.h>
#include <asm/system.h>
#include <asm/system.h>
...
@@ -66,24 +67,6 @@ struct screen_info screen_info = {
...
@@ -66,24 +67,6 @@ struct screen_info screen_info = {
16
/* orig-video-points */
16
/* orig-video-points */
};
};
/*
* Initialize Programmable Interval Timers with standard values. Some
* drivers depend on them being initialized (e.g., joystick driver).
*/
static
void
init_pit
(
void
)
{
outb
(
0x54
,
0x43
);
/* counter 1: refresh timer */
outb
(
0x18
,
0x41
);
outb
(
0x36
,
0x43
);
/* counter 0: system timer */
outb
(
0x00
,
0x40
);
outb
(
0x00
,
0x40
);
outb
(
0xb6
,
0x43
);
/* counter 2: speaker */
outb
(
0x31
,
0x42
);
outb
(
0x13
,
0x42
);
}
static
unsigned
long
find_end_memory
(
void
)
static
unsigned
long
find_end_memory
(
void
)
{
{
int
i
;
int
i
;
...
@@ -110,8 +93,6 @@ void setup_arch(char **cmdline_p,
...
@@ -110,8 +93,6 @@ void setup_arch(char **cmdline_p,
{
{
extern
int
_end
;
extern
int
_end
;
init_pit
();
hwrpb
=
(
struct
hwrpb_struct
*
)(
IDENT_ADDR
+
INIT_HWRPB
->
phys_addr
);
hwrpb
=
(
struct
hwrpb_struct
*
)(
IDENT_ADDR
+
INIT_HWRPB
->
phys_addr
);
set_hae
(
hae
.
cache
);
/* sync HAE register w/hae_cache */
set_hae
(
hae
.
cache
);
/* sync HAE register w/hae_cache */
...
...
arch/alpha/mm/fault.c
View file @
a89a2558
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
* Copyright (C) 1995 Linus Torvalds
* Copyright (C) 1995 Linus Torvalds
*/
*/
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/head.h>
...
...
drivers/block/floppy.c
View file @
a89a2558
...
@@ -3015,7 +3015,7 @@ static inline void clear_write_error(int drive)
...
@@ -3015,7 +3015,7 @@ static inline void clear_write_error(int drive)
CLEARSTRUCT
(
UDRWE
);
CLEARSTRUCT
(
UDRWE
);
}
}
static
inline
int
set_geometry
(
int
cmd
,
struct
floppy_struct
*
g
,
static
inline
int
set_geometry
(
unsigned
int
cmd
,
struct
floppy_struct
*
g
,
int
drive
,
int
type
,
int
device
)
int
drive
,
int
type
,
int
device
)
{
{
int
cnt
;
int
cnt
;
...
@@ -3114,14 +3114,14 @@ static inline int normalize_0x02xx_ioctl(int *cmd, int *size)
...
@@ -3114,14 +3114,14 @@ static inline int normalize_0x02xx_ioctl(int *cmd, int *size)
{
{
int
i
,
orig_size
,
ocmd
;
int
i
,
orig_size
,
ocmd
;
orig_size
=
IOC_SIZE
(
*
cmd
);
orig_size
=
_
IOC_SIZE
(
*
cmd
);
ocmd
=
*
cmd
;
ocmd
=
*
cmd
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
translation_table
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
translation_table
);
i
++
)
{
if
((
*
cmd
&
0xff3f
)
==
(
translation_table
[
i
].
newcmd
&
0xff3f
)){
if
((
*
cmd
&
0xff3f
)
==
(
translation_table
[
i
].
newcmd
&
0xff3f
)){
*
cmd
=
translation_table
[
i
].
newcmd
;
*
cmd
=
translation_table
[
i
].
newcmd
;
if
(
!
orig_size
&&
IOC_SIZE
(
*
cmd
))
{
if
(
!
orig_size
&&
_
IOC_SIZE
(
*
cmd
))
{
/* kernels 1.3.34 to 1.3.3
7
: */
/* kernels 1.3.34 to 1.3.3
9
: */
*
size
=
IOC_SIZE
(
*
cmd
);
*
size
=
_
IOC_SIZE
(
*
cmd
);
DPRINT1
(
"warning: obsolete ioctl 0x%x
\n
"
,
ocmd
);
DPRINT1
(
"warning: obsolete ioctl 0x%x
\n
"
,
ocmd
);
DPRINT
(
"please recompile your program
\n
"
);
DPRINT
(
"please recompile your program
\n
"
);
/* these ioctls only existed
/* these ioctls only existed
...
@@ -3132,7 +3132,7 @@ static inline int normalize_0x02xx_ioctl(int *cmd, int *size)
...
@@ -3132,7 +3132,7 @@ static inline int normalize_0x02xx_ioctl(int *cmd, int *size)
*/
*/
}
else
{
}
else
{
*
size
=
orig_size
;
*
size
=
orig_size
;
if
(
*
size
>
IOC_SIZE
(
*
cmd
))
{
if
(
*
size
>
_
IOC_SIZE
(
*
cmd
))
{
printk
(
"ioctl not yet supported
\n
"
);
printk
(
"ioctl not yet supported
\n
"
);
return
-
EFAULT
;
return
-
EFAULT
;
}
}
...
@@ -3261,7 +3261,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
...
@@ -3261,7 +3261,7 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
case
FDGETDRVTYP
:
case
FDGETDRVTYP
:
outparam
=
drive_name
(
type
,
drive
);
outparam
=
drive_name
(
type
,
drive
);
SUPBOUND
(
size
,
strlen
(
outparam
));
SUPBOUND
(
size
,
strlen
(
outparam
)
+
1
);
break
;
break
;
IN
(
FDSETDRVPRM
,
UDP
,
dp
);
IN
(
FDSETDRVPRM
,
UDP
,
dp
);
...
...
drivers/cdrom/mcd.c
View file @
a89a2558
...
@@ -59,21 +59,26 @@
...
@@ -59,21 +59,26 @@
DOS DRIVERS .... Accuracy counts... speed is secondary ;)
DOS DRIVERS .... Accuracy counts... speed is secondary ;)
17 June 95 Modifications By Andrew J. Kroll <ag784@freenet.buffalo.edu>
17 June 95 Modifications By Andrew J. Kroll <ag784@freenet.buffalo.edu>
07 July 1995 Modifications by Andrew J. Kroll
07 July 1995 Modifications by Andrew J. Kroll
0.6
8 November 95 More Modifications By Andrew J. Kroll
Media change detect now works :) That means that SuperMount and
other programs that depend on this will now work!
You are welcome in advance! You will notice, however that you don't
always get the kernel message saying "VFS: Disk change detected on
device", so I'm not sure that it's *PERFECT* but it does seem to
actually work! What else should I add?
*/
*/
#include <linux/config.h>
#ifdef MODULE
# include <linux/module.h>
#endif
#include <linux/version.h>
#include <linux/module.h>
#ifdef MODULE
# ifndef CONFIG_MODVERSIONS
char
kernel_version
[]
=
UTS_RELEASE
;
# endif
#define mcd_init init_module
#else
# define MOD_INC_USE_COUNT
# define MOD_DEC_USE_COUNT
#endif
#include <linux/errno.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/signal.h>
...
@@ -138,28 +143,30 @@ static int mcdPresent = 0;
...
@@ -138,28 +143,30 @@ static int mcdPresent = 0;
#endif
#endif
/* #define DOUBLE_QUICK_ONLY */
/* #define DOUBLE_QUICK_ONLY */
#define CURRENT_VALID \
#if LINUX_VERSION_CODE < 66338
(CURRENT && MAJOR(CURRENT -> rq_dev) == MAJOR_NR && CURRENT -> cmd == READ \
#define CURRENT_VALID \
&& CURRENT -> sector != -1)
(CURRENT && MAJOR(CURRENT -> dev) == MAJOR_NR && CURRENT -> cmd == READ \
&& CURRENT -> sector != -1)
#else
#define CURRENT_VALID \
(CURRENT && MAJOR(CURRENT -> rq_dev) == MAJOR_NR && CURRENT -> cmd == READ \
&& CURRENT -> sector != -1)
#endif
#define MFL_STATUSorDATA (MFL_STATUS | MFL_DATA)
#define MFL_STATUSorDATA (MFL_STATUS | MFL_DATA)
#define MCD_BUF_SIZ 16
#define MCD_BUF_SIZ 16
static
volatile
int
mcd_transfer_is_active
;
static
volatile
int
mcd_transfer_is_active
;
/* Are you sleeping, Are you sleeping, Brother John, Brother John? ;) */
static
volatile
int
sleeping_for_status
;
static
char
mcd_buf
[
2048
*
MCD_BUF_SIZ
];
/* buffer for block size conversion */
static
char
mcd_buf
[
2048
*
MCD_BUF_SIZ
];
/* buffer for block size conversion */
static
volatile
int
mcd_buf_bn
[
MCD_BUF_SIZ
],
mcd_next_bn
;
static
volatile
int
mcd_buf_bn
[
MCD_BUF_SIZ
],
mcd_next_bn
;
static
volatile
int
mcd_buf_in
,
mcd_buf_out
=
-
1
;
static
volatile
int
mcd_buf_in
,
mcd_buf_out
=
-
1
;
static
volatile
int
mcd_error
;
static
volatile
int
mcd_error
;
static
int
mcd_open_count
;
static
int
mcd_open_count
;
enum
mcd_state_e
{
enum
mcd_state_e
{
MCD_S_IDLE
,
/* 0 */
MCD_S_IDLE
,
/* 0 */
MCD_S_START
,
/* 1 */
MCD_S_START
,
/* 1 */
MCD_S_MODE
,
/* 2 */
MCD_S_MODE
,
/* 2 */
MCD_S_READ
,
/* 3 */
MCD_S_READ
,
/* 3 */
MCD_S_DATA
,
/* 4 */
MCD_S_DATA
,
/* 4 */
MCD_S_STOP
,
/* 5 */
MCD_S_STOP
,
/* 5 */
MCD_S_STOPPING
/* 6 */
MCD_S_STOPPING
/* 6 */
};
};
static
volatile
enum
mcd_state_e
mcd_state
=
MCD_S_IDLE
;
static
volatile
enum
mcd_state_e
mcd_state
=
MCD_S_IDLE
;
...
@@ -214,7 +221,35 @@ void mcd_setup(char *str, int *ints)
...
@@ -214,7 +221,35 @@ void mcd_setup(char *str, int *ints)
mitsumi_bug_93_wait
=
ints
[
3
];
mitsumi_bug_93_wait
=
ints
[
3
];
#endif
/* WORK_AROUND_MITSUMI_BUG_93 */
#endif
/* WORK_AROUND_MITSUMI_BUG_93 */
}
}
static
int
#if LINUX_VERSION_CODE < 66338
check_mcd_change
(
dev_t
full_dev
)
#else
check_mcd_change
(
kdev_t
full_dev
)
#endif
{
int
retval
,
target
;
#if 1
/* the below is not reliable */
return
0
;
#endif
target
=
MINOR
(
full_dev
);
if
(
target
>
0
)
{
printk
(
"mcd: Mitsumi CD-ROM request error: invalid device.
\n
"
);
return
0
;
}
retval
=
mcdDiskChanged
;
mcdDiskChanged
=
0
;
return
retval
;
}
/*
/*
* Do a 'get status' command and get the result. Only use from the top half
* Do a 'get status' command and get the result. Only use from the top half
* because it calls 'getMcdStatus' which sleeps.
* because it calls 'getMcdStatus' which sleeps.
...
@@ -237,69 +272,6 @@ statusCmd(void)
...
@@ -237,69 +272,6 @@ statusCmd(void)
return
st
;
return
st
;
}
}
/*
* This detects a media change on the CD ROM.
* We need to grab the status right off the drive in here.
* Before, it ALWAYS returned a value of 0, which was not right!
*/
static
int
check_mcd_change
(
dev_t
full_dev
)
{
int
retval
,
target
,
st
,
count
;
st
=
-
1
;
target
=
MINOR
(
full_dev
);
if
(
target
>
0
)
{
printk
(
"mcd: Mitsumi CD-ROM request error: invalid device.
\n
"
);
return
0
;
}
/*
* SOMETIMES it changes, sometimes not! Well, here we FIX that little nasty!
* All we need to do is read the status from the drive without spamming the
* kernel! In other words, this routine CANNOT sleep!
* The kernel will automagically picks up on this now.
* Devilishly sneaky it is! 8) -- AJK
*/
if
((
!
mcd_transfer_is_active
)
&&
(
!
sleeping_for_status
)
&&
(
mcd_state
==
MCD_S_IDLE
))
/* YES I'm paraniod! :) */
{
outb
(
MCMD_GET_STATUS
,
MCDPORT
(
0
));
/* send get-status cmd */
for
(
count
=
0
;
count
<
3000
;
count
++
)
/* wait for the status */
{
if
(
!
(
inb
(
MCDPORT
(
1
))
&
MFL_STATUS
))
break
;
}
if
(
count
>=
3000
)
/* Did we time out? */
{
retval
=
mcdDiskChanged
;
/* We can just jump out of here */
mcdDiskChanged
=
0
;
/* as it's not needed all the time. */
return
retval
;
/* So we pretend nothing happened here! ;) */
}
st
=
inb
(
MCDPORT
(
0
))
&
0xFF
;
/* Read the status in... */
/* okay... here's that magic part! Muhuhuhuh...*/
if
(
st
&
MST_DSK_CHG
)
/* Devil made me do it! O];) */
{
mcdDiskChanged
=
1
;
/* Show a change. */
audioStatus
=
CDROM_AUDIO_NO_STATUS
;
/* just incase... */
tocUpToDate
=
0
;
/* Frantic laughing continues... */
mcd_invalidate_buffers
();
/* 666 wins! */
}
/* Stupid comments are fun! */
}
retval
=
mcdDiskChanged
;
/* Indicate status. */
mcdDiskChanged
=
0
;
/* Go, now. Enjoy a good beer! */
return
retval
;
/* The End. */
}
/*
/*
* Send a 'Play' command and get the status. Use only from the top half.
* Send a 'Play' command and get the status. Use only from the top half.
...
@@ -1217,7 +1189,7 @@ mcd_init(void)
...
@@ -1217,7 +1189,7 @@ mcd_init(void)
{
{
int
count
;
int
count
;
unsigned
char
result
[
3
];
unsigned
char
result
[
3
];
sleeping_for_status
=
0
;
if
(
mcd_port
<=
0
||
mcd_irq
<=
0
)
{
if
(
mcd_port
<=
0
||
mcd_irq
<=
0
)
{
printk
(
"skip mcd_init
\n
"
);
printk
(
"skip mcd_init
\n
"
);
return
-
EIO
;
return
-
EIO
;
...
@@ -1419,14 +1391,10 @@ getMcdStatus(int timeout)
...
@@ -1419,14 +1391,10 @@ getMcdStatus(int timeout)
McdTimeout
=
timeout
;
McdTimeout
=
timeout
;
SET_TIMER
(
mcdStatTimer
,
1
);
SET_TIMER
(
mcdStatTimer
,
1
);
sleeping_for_status
=
1
;
sleep_on
(
&
mcd_waitq
);
sleep_on
(
&
mcd_waitq
);
if
(
McdTimeout
<=
0
)
if
(
McdTimeout
<=
0
)
{
return
-
1
;
sleeping_for_status
=
0
;
return
-
1
;
}
sleeping_for_status
=
0
;
st
=
inb
(
MCDPORT
(
0
))
&
0xFF
;
st
=
inb
(
MCDPORT
(
0
))
&
0xFF
;
if
(
st
==
0xFF
)
if
(
st
==
0xFF
)
return
-
1
;
return
-
1
;
...
@@ -1662,13 +1630,11 @@ Toc[i].diskTime.min, Toc[i].diskTime.sec, Toc[i].diskTime.frame);
...
@@ -1662,13 +1630,11 @@ Toc[i].diskTime.min, Toc[i].diskTime.sec, Toc[i].diskTime.frame);
}
}
#ifdef MODULE
#ifdef MODULE
int
init_module
(
void
)
{
return
mcd_init
();
}
void
cleanup_module
(
void
)
void
cleanup_module
(
void
)
{
{
if
(
MOD_IN_USE
)
{
printk
(
"mcd module in use - can't remove it.
\n
"
);
return
;
}
if
((
unregister_blkdev
(
MAJOR_NR
,
"mcd"
)
==
-
EINVAL
))
if
((
unregister_blkdev
(
MAJOR_NR
,
"mcd"
)
==
-
EINVAL
))
{
printk
(
"What's that: can't unregister mcd
\n
"
);
{
printk
(
"What's that: can't unregister mcd
\n
"
);
return
;
return
;
...
...
drivers/cdrom/mcdx.c
View file @
a89a2558
This diff is collapsed.
Click to expand it.
drivers/char/Config.in
View file @
a89a2558
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
mainmenu_option next_comment
mainmenu_option next_comment
comment 'character devices'
comment 'character devices'
bool
'Cyclades async mux support' CONFIG_CYCLADES
tristate
'Cyclades async mux support' CONFIG_CYCLADES
bool 'Stallion multiport serial support' CONFIG_STALDRV
bool 'Stallion multiport serial support' CONFIG_STALDRV
if [ "$CONFIG_STALDRV" = "y" ]; then
if [ "$CONFIG_STALDRV" = "y" ]; then
tristate ' Stallion EasyIO or EC8/32 support' CONFIG_STALLION
tristate ' Stallion EasyIO or EC8/32 support' CONFIG_STALLION
...
...
drivers/char/Makefile
View file @
a89a2558
...
@@ -20,8 +20,12 @@ L_OBJS := tty_io.o n_tty.o console.o keyboard.o serial.o \
...
@@ -20,8 +20,12 @@ L_OBJS := tty_io.o n_tty.o console.o keyboard.o serial.o \
tty_ioctl.o pty.o vt.o mem.o vc_screen.o random.o
\
tty_ioctl.o pty.o vt.o mem.o vc_screen.o random.o
\
defkeymap.o consolemap.o selection.o
defkeymap.o consolemap.o selection.o
if
def
CONFIG_CYCLADES
if
eq
($(CONFIG_CYCLADES),y)
L_OBJS
+=
cyclades.o
L_OBJS
+=
cyclades.o
else
ifeq
($(CONFIG_CYCLADES),m)
M_OBJS
+=
cyclades.o
endif
endif
endif
ifeq
($(CONFIG_STALLION),y)
ifeq
($(CONFIG_STALLION),y)
...
...
drivers/char/cyclades.c
View file @
a89a2558
...
@@ -223,6 +223,8 @@ static char rcsid[] =
...
@@ -223,6 +223,8 @@ static char rcsid[] =
*
*
*/
*/
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/sched.h>
...
@@ -404,7 +406,6 @@ static int startup (struct cyclades_port *);
...
@@ -404,7 +406,6 @@ static int startup (struct cyclades_port *);
static
void
cy_throttle
(
struct
tty_struct
*
);
static
void
cy_throttle
(
struct
tty_struct
*
);
static
void
cy_unthrottle
(
struct
tty_struct
*
);
static
void
cy_unthrottle
(
struct
tty_struct
*
);
static
void
config_setup
(
struct
cyclades_port
*
);
static
void
config_setup
(
struct
cyclades_port
*
);
extern
void
console_print
(
const
char
*
);
#ifdef CYCLOM_SHOW_STATUS
#ifdef CYCLOM_SHOW_STATUS
static
void
show_status
(
int
);
static
void
show_status
(
int
);
#endif
#endif
...
@@ -466,7 +467,6 @@ void CP2(int data) { CP1((data>>4) & 0x0f); CP1( data & 0x0f); }/* CP2 */
...
@@ -466,7 +467,6 @@ void CP2(int data) { CP1((data>>4) & 0x0f); CP1( data & 0x0f); }/* CP2 */
void
CP4
(
int
data
)
{
CP2
((
data
>>
8
)
&
0xff
);
CP2
(
data
&
0xff
);
}
/* CP4 */
void
CP4
(
int
data
)
{
CP2
((
data
>>
8
)
&
0xff
);
CP2
(
data
&
0xff
);
}
/* CP4 */
void
CP8
(
long
data
)
{
CP4
((
data
>>
16
)
&
0xffff
);
CP4
(
data
&
0xffff
);
}
/* CP8 */
void
CP8
(
long
data
)
{
CP4
((
data
>>
16
)
&
0xffff
);
CP4
(
data
&
0xffff
);
}
/* CP8 */
/* This routine waits up to 1000 micro-seconds for the previous
/* This routine waits up to 1000 micro-seconds for the previous
command to the Cirrus chip to complete and then issues the
command to the Cirrus chip to complete and then issues the
new command. An error is returned if the previous command
new command. An error is returned if the previous command
...
@@ -583,6 +583,7 @@ cy_sched_event(struct cyclades_port *info, int event)
...
@@ -583,6 +583,7 @@ cy_sched_event(struct cyclades_port *info, int event)
}
/* cy_sched_event */
}
/* cy_sched_event */
static
int
probe_ready
;
/*
/*
* This interrupt routine is used
* This interrupt routine is used
...
@@ -594,6 +595,9 @@ cy_probe(int irq, struct pt_regs *regs)
...
@@ -594,6 +595,9 @@ cy_probe(int irq, struct pt_regs *regs)
int
save_xir
,
save_car
;
int
save_xir
,
save_car
;
int
index
=
0
;
/* probing interrupts is only for ISA */
int
index
=
0
;
/* probing interrupts is only for ISA */
if
(
!
probe_ready
)
return
;
cy_irq_triggered
=
irq
;
cy_irq_triggered
=
irq
;
cy_triggered
|=
1
<<
irq
;
cy_triggered
|=
1
<<
irq
;
...
@@ -1107,6 +1111,7 @@ get_auto_irq(unsigned char *address)
...
@@ -1107,6 +1111,7 @@ get_auto_irq(unsigned char *address)
base_addr
[
CyCAR
<<
index
]
=
0
;
base_addr
[
CyCAR
<<
index
]
=
0
;
write_cy_cmd
(
base_addr
,
CyCHAN_CTL
|
CyENB_XMTR
,
index
);
write_cy_cmd
(
base_addr
,
CyCHAN_CTL
|
CyENB_XMTR
,
index
);
base_addr
[
CySRER
<<
index
]
|=
CyTxMpty
;
base_addr
[
CySRER
<<
index
]
|=
CyTxMpty
;
probe_ready
=
1
;
sti
();
sti
();
timeout
=
jiffies
+
2
;
timeout
=
jiffies
+
2
;
...
@@ -1114,6 +1119,7 @@ get_auto_irq(unsigned char *address)
...
@@ -1114,6 +1119,7 @@ get_auto_irq(unsigned char *address)
if
(
cy_irq_triggered
)
if
(
cy_irq_triggered
)
break
;
break
;
}
}
probe_ready
=
0
;
return
(
cy_irq_triggered
);
return
(
cy_irq_triggered
);
}
/* get_auto_irq */
}
/* get_auto_irq */
...
@@ -1132,6 +1138,8 @@ do_auto_irq(unsigned char *address)
...
@@ -1132,6 +1138,8 @@ do_auto_irq(unsigned char *address)
/* Turn on interrupts (they may be off) */
/* Turn on interrupts (they may be off) */
save_flags
(
flags
);
sti
();
save_flags
(
flags
);
sti
();
probe_ready
=
0
;
cy_wild_int_mask
=
check_wild_interrupts
();
cy_wild_int_mask
=
check_wild_interrupts
();
irq_lines
=
grab_all_interrupts
(
cy_wild_int_mask
);
irq_lines
=
grab_all_interrupts
(
cy_wild_int_mask
);
...
@@ -2286,6 +2294,7 @@ static void
...
@@ -2286,6 +2294,7 @@ static void
cy_close
(
struct
tty_struct
*
tty
,
struct
file
*
filp
)
cy_close
(
struct
tty_struct
*
tty
,
struct
file
*
filp
)
{
{
struct
cyclades_port
*
info
=
(
struct
cyclades_port
*
)
tty
->
driver_data
;
struct
cyclades_port
*
info
=
(
struct
cyclades_port
*
)
tty
->
driver_data
;
unsigned
long
flags
;
/* CP('C'); */
/* CP('C'); */
#ifdef SERIAL_DEBUG_OTHER
#ifdef SERIAL_DEBUG_OTHER
...
@@ -2300,6 +2309,14 @@ cy_close(struct tty_struct * tty, struct file * filp)
...
@@ -2300,6 +2309,14 @@ cy_close(struct tty_struct * tty, struct file * filp)
printk
(
"cy_close ttyC%d, count = %d
\n
"
,
info
->
line
,
info
->
count
);
printk
(
"cy_close ttyC%d, count = %d
\n
"
,
info
->
line
,
info
->
count
);
#endif
#endif
save_flags
(
flags
);
cli
();
/* If the TTY is being hung up, nothing to do */
if
(
tty_hung_up_p
(
filp
))
{
restore_flags
(
flags
);
return
;
}
if
((
tty
->
count
==
1
)
&&
(
info
->
count
!=
1
))
{
if
((
tty
->
count
==
1
)
&&
(
info
->
count
!=
1
))
{
/*
/*
* Uh, oh. tty->count is 1, which means that the tty
* Uh, oh. tty->count is 1, which means that the tty
...
@@ -2313,7 +2330,7 @@ cy_close(struct tty_struct * tty, struct file * filp)
...
@@ -2313,7 +2330,7 @@ cy_close(struct tty_struct * tty, struct file * filp)
info
->
count
=
1
;
info
->
count
=
1
;
}
}
#ifdef SERIAL_DEBUG_COUNT
#ifdef SERIAL_DEBUG_COUNT
printk
(
"cyc: %d
: decrementing count to %d
\n
"
,
__LINE__
,
info
->
count
-
1
);
printk
(
"cyc: %d
(%d): decrementing count to %d
\n
"
,
__LINE__
,
current
->
pid
,
info
->
count
-
1
);
#endif
#endif
if
(
--
info
->
count
<
0
)
{
if
(
--
info
->
count
<
0
)
{
#ifdef SERIAL_DEBUG_COUNT
#ifdef SERIAL_DEBUG_COUNT
...
@@ -2322,7 +2339,11 @@ cy_close(struct tty_struct * tty, struct file * filp)
...
@@ -2322,7 +2339,11 @@ cy_close(struct tty_struct * tty, struct file * filp)
info
->
count
=
0
;
info
->
count
=
0
;
}
}
if
(
info
->
count
)
if
(
info
->
count
)
{
MOD_DEC_USE_COUNT
;
restore_flags
(
flags
);
return
;
return
;
}
info
->
flags
|=
ASYNC_CLOSING
;
info
->
flags
|=
ASYNC_CLOSING
;
/*
/*
* Save the termios structure, since this port may have
* Save the termios structure, since this port may have
...
@@ -2341,14 +2362,6 @@ cy_close(struct tty_struct * tty, struct file * filp)
...
@@ -2341,14 +2362,6 @@ cy_close(struct tty_struct * tty, struct file * filp)
tty
->
ldisc
.
flush_buffer
(
tty
);
tty
->
ldisc
.
flush_buffer
(
tty
);
info
->
event
=
0
;
info
->
event
=
0
;
info
->
tty
=
0
;
info
->
tty
=
0
;
if
(
tty
->
ldisc
.
num
!=
ldiscs
[
N_TTY
].
num
)
{
if
(
tty
->
ldisc
.
close
)
(
tty
->
ldisc
.
close
)(
tty
);
tty
->
ldisc
=
ldiscs
[
N_TTY
];
tty
->
termios
->
c_line
=
N_TTY
;
if
(
tty
->
ldisc
.
open
)
(
tty
->
ldisc
.
open
)(
tty
);
}
if
(
info
->
blocked_open
)
{
if
(
info
->
blocked_open
)
{
if
(
info
->
close_delay
)
{
if
(
info
->
close_delay
)
{
current
->
state
=
TASK_INTERRUPTIBLE
;
current
->
state
=
TASK_INTERRUPTIBLE
;
...
@@ -2365,6 +2378,8 @@ cy_close(struct tty_struct * tty, struct file * filp)
...
@@ -2365,6 +2378,8 @@ cy_close(struct tty_struct * tty, struct file * filp)
printk
(
"cy_close done
\n
"
);
printk
(
"cy_close done
\n
"
);
#endif
#endif
MOD_DEC_USE_COUNT
;
restore_flags
(
flags
);
return
;
return
;
}
/* cy_close */
}
/* cy_close */
...
@@ -2384,14 +2399,12 @@ cy_hangup(struct tty_struct *tty)
...
@@ -2384,14 +2399,12 @@ cy_hangup(struct tty_struct *tty)
return
;
return
;
shutdown
(
info
);
shutdown
(
info
);
#if 0
info
->
event
=
0
;
info
->
event
=
0
;
info
->
count
=
0
;
info
->
count
=
0
;
#ifdef SERIAL_DEBUG_COUNT
#ifdef SERIAL_DEBUG_COUNT
printk("cyc: %d
: setting count to 0\n", __LINE__
);
printk
(
"cyc: %d
(%d): setting count to 0
\n
"
,
__LINE__
,
current
->
pid
);
#endif
#endif
info
->
tty
=
0
;
info
->
tty
=
0
;
#endif
info
->
flags
&=
~
(
ASYNC_NORMAL_ACTIVE
|
ASYNC_CALLOUT_ACTIVE
);
info
->
flags
&=
~
(
ASYNC_NORMAL_ACTIVE
|
ASYNC_CALLOUT_ACTIVE
);
wake_up_interruptible
(
&
info
->
open_wait
);
wake_up_interruptible
(
&
info
->
open_wait
);
}
/* cy_hangup */
}
/* cy_hangup */
...
@@ -2477,7 +2490,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
...
@@ -2477,7 +2490,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
#endif
#endif
info
->
count
--
;
info
->
count
--
;
#ifdef SERIAL_DEBUG_COUNT
#ifdef SERIAL_DEBUG_COUNT
printk
(
"cyc: %d
: decrementing count to %d
\n
"
,
__LINE__
,
info
->
count
);
printk
(
"cyc: %d
(%d): decrementing count to %d
\n
"
,
__LINE__
,
current
->
pid
,
info
->
count
);
#endif
#endif
info
->
blocked_open
++
;
info
->
blocked_open
++
;
...
@@ -2537,7 +2550,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
...
@@ -2537,7 +2550,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
if
(
!
tty_hung_up_p
(
filp
)){
if
(
!
tty_hung_up_p
(
filp
)){
info
->
count
++
;
info
->
count
++
;
#ifdef SERIAL_DEBUG_COUNT
#ifdef SERIAL_DEBUG_COUNT
printk
(
"cyc: %d
: incrementing count to %d
\n
"
,
__LINE__
,
info
->
count
);
printk
(
"cyc: %d
(%d): incrementing count to %d
\n
"
,
__LINE__
,
current
->
pid
,
info
->
count
);
#endif
#endif
}
}
info
->
blocked_open
--
;
info
->
blocked_open
--
;
...
@@ -2581,7 +2594,7 @@ cy_open(struct tty_struct *tty, struct file * filp)
...
@@ -2581,7 +2594,7 @@ cy_open(struct tty_struct *tty, struct file * filp)
#endif
#endif
info
->
count
++
;
info
->
count
++
;
#ifdef SERIAL_DEBUG_COUNT
#ifdef SERIAL_DEBUG_COUNT
printk
(
"cyc: %d
: incrementing count to %d
\n
"
,
__LINE__
,
info
->
count
);
printk
(
"cyc: %d
(%d): incrementing count to %d
\n
"
,
__LINE__
,
current
->
pid
,
info
->
count
);
#endif
#endif
tty
->
driver_data
=
info
;
tty
->
driver_data
=
info
;
info
->
tty
=
tty
;
info
->
tty
=
tty
;
...
@@ -2622,6 +2635,7 @@ cy_open(struct tty_struct *tty, struct file * filp)
...
@@ -2622,6 +2635,7 @@ cy_open(struct tty_struct *tty, struct file * filp)
#ifdef SERIAL_DEBUG_OPEN
#ifdef SERIAL_DEBUG_OPEN
printk
(
"cy_open done
\n
"
);
/**/
printk
(
"cy_open done
\n
"
);
/**/
#endif
#endif
MOD_INC_USE_COUNT
;
return
0
;
return
0
;
}
/* cy_open */
}
/* cy_open */
...
@@ -2736,7 +2750,6 @@ cy_init(void)
...
@@ -2736,7 +2750,6 @@ cy_init(void)
struct
cyclades_card
*
cinfo
;
struct
cyclades_card
*
cinfo
;
int
board
,
port
,
i
;
int
board
,
port
,
i
;
scrn
[
1
]
=
'\0'
;
show_version
();
show_version
();
/* Initialize the tty_driver structure */
/* Initialize the tty_driver structure */
...
@@ -2877,6 +2890,33 @@ scrn[1] = '\0';
...
@@ -2877,6 +2890,33 @@ scrn[1] = '\0';
}
/* cy_init */
}
/* cy_init */
#ifdef MODULE
int
init_module
(
void
)
{
return
(
cy_init
());
}
void
cleanup_module
(
void
)
{
int
i
;
if
(
tty_unregister_driver
(
&
cy_callout_driver
))
printk
(
"Couldn't unregister Cyclom callout driver
\n
"
);
if
(
tty_unregister_driver
(
&
cy_serial_driver
))
printk
(
"Couldn't unregister Cyclom serial driver
\n
"
);
for
(
i
=
0
;
i
<
NR_CARDS
;
i
++
)
{
if
(
cy_card
[
i
].
base_addr
!=
0
)
{
free_irq
(
cy_card
[
i
].
irq
);
}
}
}
#endif
/*
/*
* ---------------------------------------------------------------------
* ---------------------------------------------------------------------
* cy_detect_isa() - Probe for Cyclom-Y/ISA boards.
* cy_detect_isa() - Probe for Cyclom-Y/ISA boards.
...
...
drivers/net/3c505.c
View file @
a89a2558
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* be here without 3C505 technical reference provided by
* be here without 3C505 technical reference provided by
* 3Com.
* 3Com.
*
*
* Version: @(#)3c505.c 0.8.
1 26-Jun
-95
* Version: @(#)3c505.c 0.8.
3 12-Nov
-95
*
*
* Authors: Linux 3c505 device driver by
* Authors: Linux 3c505 device driver by
* Craig Southeren, <craigs@ineluki.apana.org.au>
* Craig Southeren, <craigs@ineluki.apana.org.au>
...
@@ -103,7 +103,7 @@ static int elp_debug = 0;
...
@@ -103,7 +103,7 @@ static int elp_debug = 0;
* 3 = messages when interrupts received
* 3 = messages when interrupts received
*/
*/
#define ELP_VERSION "0.8.
1
"
#define ELP_VERSION "0.8.
3
"
/*****************************************************************
/*****************************************************************
*
*
...
@@ -473,9 +473,13 @@ static void
...
@@ -473,9 +473,13 @@ static void
adapter_hard_reset
(
struct
device
*
dev
)
adapter_hard_reset
(
struct
device
*
dev
)
{
{
int
timeout
;
int
timeout
;
long
flags
;
CHECK_NULL
(
dev
);
CHECK_NULL
(
dev
);
save_flags
(
flags
);
sti
();
if
(
elp_debug
>
0
)
if
(
elp_debug
>
0
)
printk
(
"%s: Resetting the adapter, please wait (approx 20 s)
\n
"
,
printk
(
"%s: Resetting the adapter, please wait (approx 20 s)
\n
"
,
dev
->
name
);
dev
->
name
);
...
@@ -507,6 +511,7 @@ adapter_hard_reset (struct device * dev)
...
@@ -507,6 +511,7 @@ adapter_hard_reset (struct device * dev)
for
(
timeout
=
jiffies
+
(
100
*
15
);
jiffies
<=
timeout
;
)
for
(
timeout
=
jiffies
+
(
100
*
15
);
jiffies
<=
timeout
;
)
if
(
GET_ASF
(
dev
->
base_addr
)
!=
ASF_PCB_END
)
if
(
GET_ASF
(
dev
->
base_addr
)
!=
ASF_PCB_END
)
break
;
break
;
restore_flags
(
flags
);
}
}
/******************************************************
/******************************************************
...
@@ -1272,6 +1277,7 @@ elp_sense (struct device * dev)
...
@@ -1272,6 +1277,7 @@ elp_sense (struct device * dev)
int
timeout
;
int
timeout
;
int
addr
=
dev
->
base_addr
;
int
addr
=
dev
->
base_addr
;
const
char
*
name
=
dev
->
name
;
const
char
*
name
=
dev
->
name
;
long
flags
;
byte
orig_HCR
=
inb_control
(
addr
),
byte
orig_HCR
=
inb_control
(
addr
),
orig_HSR
=
inb_status
(
addr
);
orig_HSR
=
inb_status
(
addr
);
...
@@ -1286,6 +1292,10 @@ elp_sense (struct device * dev)
...
@@ -1286,6 +1292,10 @@ elp_sense (struct device * dev)
return
-
1
;
/* It can't be 3c505 if HCR.DIR != HSR.DIR */
return
-
1
;
/* It can't be 3c505 if HCR.DIR != HSR.DIR */
}
}
/* Enable interrupts - we need timers! */
save_flags
(
flags
);
sti
();
/* Wait for a while; the adapter may still be booting up */
/* Wait for a while; the adapter may still be booting up */
if
(
elp_debug
>
0
)
if
(
elp_debug
>
0
)
printk
(
stilllooking_msg
);
printk
(
stilllooking_msg
);
...
@@ -1299,6 +1309,7 @@ elp_sense (struct device * dev)
...
@@ -1299,6 +1309,7 @@ elp_sense (struct device * dev)
timeout
=
jiffies
+
30
;
timeout
=
jiffies
+
30
;
while
(
jiffies
<
timeout
)
while
(
jiffies
<
timeout
)
;
;
restore_flags
(
flags
);
if
(
inb_status
(
addr
)
&
DIR
)
{
if
(
inb_status
(
addr
)
&
DIR
)
{
outb_control
(
orig_HCR
,
addr
);
outb_control
(
orig_HCR
,
addr
);
if
(
elp_debug
>
0
)
if
(
elp_debug
>
0
)
...
@@ -1311,6 +1322,7 @@ elp_sense (struct device * dev)
...
@@ -1311,6 +1322,7 @@ elp_sense (struct device * dev)
timeout
=
jiffies
+
300
;
timeout
=
jiffies
+
300
;
while
(
jiffies
<
timeout
)
while
(
jiffies
<
timeout
)
;
;
restore_flags
(
flags
);
if
(
!
(
inb_status
(
addr
)
&
DIR
))
{
if
(
!
(
inb_status
(
addr
)
&
DIR
))
{
outb_control
(
orig_HCR
,
addr
);
outb_control
(
orig_HCR
,
addr
);
if
(
elp_debug
>
0
)
if
(
elp_debug
>
0
)
...
@@ -1462,8 +1474,8 @@ static struct device dev_3c505 = {
...
@@ -1462,8 +1474,8 @@ static struct device dev_3c505 = {
0
,
0
,
0
,
0
,
0
,
0
,
0
,
NULL
,
elplus_probe
};
0
,
0
,
0
,
NULL
,
elplus_probe
};
static
int
io
=
0x300
;
int
io
=
0x300
;
static
int
irq
=
0
;
int
irq
=
0
;
int
init_module
(
void
)
int
init_module
(
void
)
{
{
...
...
drivers/net/arcnet.c
View file @
a89a2558
This diff is collapsed.
Click to expand it.
drivers/net/eth16i.c
View file @
a89a2558
...
@@ -1170,7 +1170,6 @@ static void eth16i_select_regbank(unsigned char banknbr, short ioaddr)
...
@@ -1170,7 +1170,6 @@ static void eth16i_select_regbank(unsigned char banknbr, short ioaddr)
}
}
#ifdef MODULE
#ifdef MODULE
char
kernel_version
[]
=
UTS_RELEASE
;
static
char
devicename
[
9
]
=
{
0
,
};
static
char
devicename
[
9
]
=
{
0
,
};
static
struct
device
dev_eth16i
=
{
static
struct
device
dev_eth16i
=
{
devicename
,
devicename
,
...
...
drivers/pci/pci.c
View file @
a89a2558
...
@@ -168,8 +168,9 @@ struct pci_dev_info dev_info[] = {
...
@@ -168,8 +168,9 @@ struct pci_dev_info dev_info[] = {
DEVICE
(
ADAPTEC
,
ADAPTEC_7870
,
"AIC-7870"
),
DEVICE
(
ADAPTEC
,
ADAPTEC_7870
,
"AIC-7870"
),
DEVICE
(
ADAPTEC
,
ADAPTEC_7871
,
"AIC-7871"
),
DEVICE
(
ADAPTEC
,
ADAPTEC_7871
,
"AIC-7871"
),
DEVICE
(
ADAPTEC
,
ADAPTEC_7872
,
"AIC-7872"
),
DEVICE
(
ADAPTEC
,
ADAPTEC_7872
,
"AIC-7872"
),
DEVICE
(
ADAPTEC
,
ADAPTEC_7880
,
"AIC-7880"
),
DEVICE
(
ADAPTEC
,
ADAPTEC_7880
,
"AIC-7880U"
),
DEVICE
(
ADAPTEC
,
ADAPTEC_7881
,
"AIC-7881"
),
DEVICE
(
ADAPTEC
,
ADAPTEC_7881
,
"AIC-7881U"
),
DEVICE
(
ADAPTEC
,
ADAPTEC_7882
,
"AIC-7882U"
),
DEVICE
(
ATRONICS
,
ATRONICS_2015
,
"IDE-2015PL"
),
DEVICE
(
ATRONICS
,
ATRONICS_2015
,
"IDE-2015PL"
),
DEVICE
(
HER
,
HER_STING
,
"Stingray"
),
DEVICE
(
HER
,
HER_STING
,
"Stingray"
),
DEVICE
(
HER
,
HER_STINGARK
,
"Stingray ARK 2000PV"
)
DEVICE
(
HER
,
HER_STINGARK
,
"Stingray ARK 2000PV"
)
...
...
drivers/scsi/aic7xxx.c
View file @
a89a2558
This diff is collapsed.
Click to expand it.
drivers/scsi/aic7xxx.seq
View file @
a89a2558
...
@@ -25,13 +25,14 @@
...
@@ -25,13 +25,14 @@
# optimizations provided by Justin T. Gibbs (gibbs@FreeBSD.org)
# optimizations provided by Justin T. Gibbs (gibbs@FreeBSD.org)
##-M#########################################################################
##-M#########################################################################
VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 2.
1 1995/08/30 07:47:07
deang Exp $"
VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 2.
3 1995/11/10 10:51:22
deang Exp $"
SCBMASK = 0xff
SCBMASK = 0xff
SCSISEQ = 0x00
SCSISEQ = 0x00
ENRSELI = 0x10
ENRSELI = 0x10
SXFRCTL0 = 0x01
SXFRCTL0 = 0x01
ULTRAEN = 0x20
SXFRCTL1 = 0x02
SXFRCTL1 = 0x02
SCSISIGI = 0x03
SCSISIGI = 0x03
SCSISIGO = 0x03
SCSISIGO = 0x03
...
@@ -229,7 +230,6 @@ ACTIVE_B = 0x55
...
@@ -229,7 +230,6 @@ ACTIVE_B = 0x55
SAVED_TCL = 0x56 # Temporary storage for the
SAVED_TCL = 0x56 # Temporary storage for the
# target/channel/lun of a
# target/channel/lun of a
# reconnecting target
# reconnecting target
# After starting the selection hardware, we return to the "poll_for_work"
# After starting the selection hardware, we return to the "poll_for_work"
# loop so that we can check for reconnecting targets as well as for our
# loop so that we can check for reconnecting targets as well as for our
# selection to complete just in case the reselection wins bus arbitration.
# selection to complete just in case the reselection wins bus arbitration.
...
@@ -444,6 +444,7 @@ ITloop:
...
@@ -444,6 +444,7 @@ ITloop:
and A,0xe0,SCSISIGI # CDI|IOI|MSGI
and A,0xe0,SCSISIGI # CDI|IOI|MSGI
mov A call scsisig
cmp ALLZEROS,A je p_dataout
cmp ALLZEROS,A je p_dataout
cmp A,0x40 je p_datain
cmp A,0x40 je p_datain
cmp A,0x80 je p_command
cmp A,0x80 je p_command
...
@@ -454,7 +455,6 @@ ITloop:
...
@@ -454,7 +455,6 @@ ITloop:
mvi INTSTAT,BAD_PHASE # unknown - signal driver
mvi INTSTAT,BAD_PHASE # unknown - signal driver
p_dataout:
p_dataout:
mvi 0 call scsisig # !CDO|!IOO|!MSGO
mvi DMAPARAMS,0x7d # WIDEODD|SCSIEN|SDMAEN|HDMAEN|
mvi DMAPARAMS,0x7d # WIDEODD|SCSIEN|SDMAEN|HDMAEN|
# DIRECTION|FIFORESET
# DIRECTION|FIFORESET
jmp data_phase_init
jmp data_phase_init
...
@@ -469,8 +469,7 @@ data_phase_reinit:
...
@@ -469,8 +469,7 @@ data_phase_reinit:
# Reads should not use WIDEODD since it may make the last byte for a SG segment
# Reads should not use WIDEODD since it may make the last byte for a SG segment
# go to the next segment.
# go to the next segment.
p_datain:
p_datain:
mvi 0x40 call scsisig # !CDO|IOO|!MSGO
mvi DMAPARAMS,0x79 # WIDEODD|SCSIEN|SDMAEN|HDMAEN|
mvi DMAPARAMS,0x39 # SCSIEN|SDMAEN|HDMAEN|
# !DIRECTION|FIFORESET
# !DIRECTION|FIFORESET
data_phase_init:
data_phase_init:
call assert
call assert
...
@@ -574,7 +573,6 @@ data_phase_finish:
...
@@ -574,7 +573,6 @@ data_phase_finish:
# so we can copy those three bytes directly into HCNT.
# so we can copy those three bytes directly into HCNT.
#
#
p_command:
p_command:
mvi 0x80 call scsisig # CDO|!IOO|!MSGO
call assert
call assert
# Load HADDR and HCNT. We can do this in one bcopy since they are neighbors
# Load HADDR and HCNT. We can do this in one bcopy since they are neighbors
...
@@ -592,7 +590,6 @@ p_command:
...
@@ -592,7 +590,6 @@ p_command:
# and store it into the SCB.
# and store it into the SCB.
#
#
p_status:
p_status:
mvi 0xc0 call scsisig # CDO|IOO|!MSGO
mvi SCBARRAY+14 call inb_first
mvi SCBARRAY+14 call inb_first
jmp mesgin_done
jmp mesgin_done
...
@@ -601,7 +598,6 @@ p_status:
...
@@ -601,7 +598,6 @@ p_status:
# took us into this phase anyway, build a no-op message and send it.
# took us into this phase anyway, build a no-op message and send it.
#
#
p_mesgout:
p_mesgout:
mvi 0xa0 call scsisig # CDO|!IOO|MSGO
mvi 0x8 call mk_mesg # build NOP message
mvi 0x8 call mk_mesg # build NOP message
clr STCNT+2
clr STCNT+2
...
@@ -661,7 +657,8 @@ p_mesgout5:
...
@@ -661,7 +657,8 @@ p_mesgout5:
and A,0xe0,SCSISIGI # CDI|IOI|MSGI
and A,0xe0,SCSISIGI # CDI|IOI|MSGI
cmp A,0xa0 jne p_mesgout6
cmp A,0xa0 jne p_mesgout6
mvi 0x10 call scsisig # ATNO - re-assert ATN
or SINDEX,0x10,SIGSTATE # turn on ATNO
call scsisig # ATNO - re-assert ATN
jmp ITloop
jmp ITloop
...
@@ -679,7 +676,6 @@ p_mesgout6:
...
@@ -679,7 +676,6 @@ p_mesgout6:
# to a data I/O phase.
# to a data I/O phase.
#
#
p_mesgin:
p_mesgin:
mvi 0xe0 call scsisig # CDO|IOO|MSGO
mvi A call inb_first # read the 1st message byte
mvi A call inb_first # read the 1st message byte
mvi REJBYTE,A # save it for the driver
mvi REJBYTE,A # save it for the driver
...
@@ -742,11 +738,12 @@ status_ok:
...
@@ -742,11 +738,12 @@ status_ok:
mov A,FUNCTION1
mov A,FUNCTION1
test SCBARRAY+1,0x88 jz clear_a
test SCBARRAY+1,0x88 jz clear_a
xor ACTIVE_B,A
xor ACTIVE_B,A
jmp
comple
te
jmp
immedia
te
clear_a:
clear_a:
xor ACTIVE_A,A
xor ACTIVE_A,A
immediate:
test SCBARRAY+11,0xff jnz complete # Immediate message complete
test SCBARRAY+11,0xff jnz complete # Immediate message complete
# Pause the sequencer until the driver gets around to handling the command
# Pause the sequencer until the driver gets around to handling the command
# complete. This is so that any action that might require carefull timing
# complete. This is so that any action that might require carefull timing
...
@@ -1011,7 +1008,8 @@ dma4:
...
@@ -1011,7 +1008,8 @@ dma4:
# actually off first lest we get an ILLSADDR.
# actually off first lest we get an ILLSADDR.
#
#
dma5:
dma5:
clr DFCNTRL # disable DMA
and DFCNTRL, 0x40, SINDEX # disable DMA, but maintain
# WIDEODD
dma6:
dma6:
test DFCNTRL,0x38 jnz dma6 # SCSIENACK|SDMAENACK|HDMAENACK
test DFCNTRL,0x38 jnz dma6 # SCSIENACK|SDMAENACK|HDMAENACK
...
@@ -1044,7 +1042,7 @@ initialize_for_target:
...
@@ -1044,7 +1042,7 @@ initialize_for_target:
#
#
clr SIGSTATE
clr SIGSTATE
mvi
SXFRCTL0,0x8a # DFON|SPIOEN|CLRCHN
or
SXFRCTL0,0x8a # DFON|SPIOEN|CLRCHN
# Make sure that the system knows we have not been through a DATA
# Make sure that the system knows we have not been through a DATA
# phase.
# phase.
...
@@ -1205,7 +1203,8 @@ sdtr_to_rate_loop:
...
@@ -1205,7 +1203,8 @@ sdtr_to_rate_loop:
jmp sdtr_to_rate_loop
jmp sdtr_to_rate_loop
sdtr_to_rate_done:
sdtr_to_rate_done:
shr RETURN_1,0x2
shr RETURN_1,0x2
add RETURN_1,0x18 ret
add RETURN_1,0x18
test SXFRCTL0,ULTRAEN jz return
shr RETURN_1,0x1
return:
return:
ret
ret
drivers/scsi/scsi.c
View file @
a89a2558
...
@@ -796,6 +796,7 @@ static void scsi_times_out (Scsi_Cmnd * SCpnt, int pid)
...
@@ -796,6 +796,7 @@ static void scsi_times_out (Scsi_Cmnd * SCpnt, int pid)
*/
*/
printk
(
"Unable to reset scsi host %d - "
,
SCpnt
->
host
->
host_no
);
printk
(
"Unable to reset scsi host %d - "
,
SCpnt
->
host
->
host_no
);
printk
(
"probably a SCSI bus hang.
\n
"
);
printk
(
"probably a SCSI bus hang.
\n
"
);
SCpnt
->
internal_timeout
&=
~
IN_RESET
;
scsi_reset
(
SCpnt
,
TRUE
);
scsi_reset
(
SCpnt
,
TRUE
);
return
;
return
;
...
@@ -1834,6 +1835,26 @@ int scsi_abort (Scsi_Cmnd * SCpnt, int why, int pid)
...
@@ -1834,6 +1835,26 @@ int scsi_abort (Scsi_Cmnd * SCpnt, int why, int pid)
}
}
}
}
/* Mark a single SCSI Device as having been reset. */
static
inline
void
scsi_mark_device_reset
(
Scsi_Device
*
Device
)
{
Device
->
was_reset
=
1
;
Device
->
expecting_cc_ua
=
1
;
}
/* Mark all SCSI Devices on a specific Host as having been reset. */
void
scsi_mark_host_bus_reset
(
struct
Scsi_Host
*
Host
)
{
Scsi_Cmnd
*
SCpnt
;
for
(
SCpnt
=
Host
->
host_queue
;
SCpnt
;
SCpnt
=
SCpnt
->
next
)
scsi_mark_device_reset
(
SCpnt
->
device
);
}
int
scsi_reset
(
Scsi_Cmnd
*
SCpnt
,
int
bus_reset_flag
)
int
scsi_reset
(
Scsi_Cmnd
*
SCpnt
,
int
bus_reset_flag
)
{
{
int
temp
,
oldto
;
int
temp
,
oldto
;
...
@@ -1934,28 +1955,21 @@ int scsi_reset (Scsi_Cmnd * SCpnt, int bus_reset_flag)
...
@@ -1934,28 +1955,21 @@ int scsi_reset (Scsi_Cmnd * SCpnt, int bus_reset_flag)
#ifdef DEBUG
#ifdef DEBUG
printk
(
"scsi reset function returned %d
\n
"
,
temp
);
printk
(
"scsi reset function returned %d
\n
"
,
temp
);
#endif
#endif
if
(
temp
&
SCSI_RESET_BUS_RESET
)
{
/*
* The low level driver did a bus reset, so we should
* go through and mark all of the devices on that bus
* as having been reset.
*/
SCpnt1
=
host
->
host_queue
;
while
(
SCpnt1
)
{
SCpnt1
->
device
->
was_reset
=
1
;
SCpnt1
->
device
->
expecting_cc_ua
=
1
;
SCpnt1
=
SCpnt1
->
next
;
}
}
/*
/*
* Now figure out what we need to do, based upon
* Now figure out what we need to do, based upon
* what the low level driver said that it did.
* what the low level driver said that it did.
* If the result is SCSI_RESET_SUCCESS, SCSI_RESET_PENDING,
* or SCSI_RESET_WAKEUP, then the low level driver did a
* bus device reset or bus reset, so we should go through
* and mark one or all of the devices on that bus
* as having been reset.
*/
*/
switch
(
temp
&
SCSI_RESET_ACTION
)
{
switch
(
temp
&
SCSI_RESET_ACTION
)
{
case
SCSI_RESET_SUCCESS
:
case
SCSI_RESET_SUCCESS
:
if
(
temp
&
SCSI_RESET_BUS_RESET
)
scsi_mark_host_bus_reset
(
host
);
else
scsi_mark_device_reset
(
SCpnt
->
device
);
save_flags
(
flags
);
save_flags
(
flags
);
cli
();
cli
();
SCpnt
->
internal_timeout
&=
~
IN_RESET
;
SCpnt
->
internal_timeout
&=
~
IN_RESET
;
...
@@ -1963,12 +1977,18 @@ int scsi_reset (Scsi_Cmnd * SCpnt, int bus_reset_flag)
...
@@ -1963,12 +1977,18 @@ int scsi_reset (Scsi_Cmnd * SCpnt, int bus_reset_flag)
restore_flags
(
flags
);
restore_flags
(
flags
);
return
0
;
return
0
;
case
SCSI_RESET_PENDING
:
case
SCSI_RESET_PENDING
:
if
(
temp
&
SCSI_RESET_BUS_RESET
)
scsi_mark_host_bus_reset
(
host
);
else
scsi_mark_device_reset
(
SCpnt
->
device
);
return
0
;
return
0
;
case
SCSI_RESET_PUNT
:
case
SCSI_RESET_PUNT
:
SCpnt
->
internal_timeout
&=
~
IN_RESET
;
SCpnt
->
internal_timeout
&=
~
IN_RESET
;
scsi_request_sense
(
SCpnt
);
scsi_request_sense
(
SCpnt
);
return
0
;
return
0
;
case
SCSI_RESET_WAKEUP
:
case
SCSI_RESET_WAKEUP
:
if
(
temp
&
SCSI_RESET_BUS_RESET
)
scsi_mark_host_bus_reset
(
host
);
else
scsi_mark_device_reset
(
SCpnt
->
device
);
SCpnt
->
internal_timeout
&=
~
IN_RESET
;
SCpnt
->
internal_timeout
&=
~
IN_RESET
;
scsi_request_sense
(
SCpnt
);
scsi_request_sense
(
SCpnt
);
/*
/*
...
...
drivers/scsi/scsi.h
View file @
a89a2558
...
@@ -449,6 +449,7 @@ extern void proc_print_scsidevice(Scsi_Device *, char *, int *, int);
...
@@ -449,6 +449,7 @@ extern void proc_print_scsidevice(Scsi_Device *, char *, int *, int);
extern
void
print_command
(
unsigned
char
*
);
extern
void
print_command
(
unsigned
char
*
);
extern
void
print_sense
(
const
char
*
,
Scsi_Cmnd
*
);
extern
void
print_sense
(
const
char
*
,
Scsi_Cmnd
*
);
extern
void
scsi_mark_host_bus_reset
(
struct
Scsi_Host
*
Host
);
#if defined(MAJOR_NR) && (MAJOR_NR != SCSI_TAPE_MAJOR)
#if defined(MAJOR_NR) && (MAJOR_NR != SCSI_TAPE_MAJOR)
#include "hosts.h"
#include "hosts.h"
...
...
drivers/scsi/sd.c
View file @
a89a2558
...
@@ -1133,6 +1133,12 @@ static int sd_init_onedisk(int i)
...
@@ -1133,6 +1133,12 @@ static int sd_init_onedisk(int i)
rscsi_disks
[
i
].
sector_size
=
(
buffer
[
4
]
<<
24
)
|
rscsi_disks
[
i
].
sector_size
=
(
buffer
[
4
]
<<
24
)
|
(
buffer
[
5
]
<<
16
)
|
(
buffer
[
6
]
<<
8
)
|
buffer
[
7
];
(
buffer
[
5
]
<<
16
)
|
(
buffer
[
6
]
<<
8
)
|
buffer
[
7
];
if
(
rscsi_disks
[
i
].
sector_size
==
0
)
{
rscsi_disks
[
i
].
sector_size
=
512
;
printk
(
"sd%c : sector size 0 reported, assuming 512.
\n
"
,
'a'
+
i
);
}
if
(
rscsi_disks
[
i
].
sector_size
!=
512
&&
if
(
rscsi_disks
[
i
].
sector_size
!=
512
&&
rscsi_disks
[
i
].
sector_size
!=
1024
&&
rscsi_disks
[
i
].
sector_size
!=
1024
&&
...
...
fs/ext2/super.c
View file @
a89a2558
...
@@ -157,9 +157,9 @@ static int parse_options (char * options, unsigned long * sb_block,
...
@@ -157,9 +157,9 @@ static int parse_options (char * options, unsigned long * sb_block,
clear_opt
(
*
mount_options
,
CHECK_NORMAL
);
clear_opt
(
*
mount_options
,
CHECK_NORMAL
);
clear_opt
(
*
mount_options
,
CHECK_STRICT
);
clear_opt
(
*
mount_options
,
CHECK_STRICT
);
}
}
else
if
(
strcmp
(
value
,
"normal"
))
else
if
(
!
strcmp
(
value
,
"normal"
))
set_opt
(
*
mount_options
,
CHECK_NORMAL
);
set_opt
(
*
mount_options
,
CHECK_NORMAL
);
else
if
(
strcmp
(
value
,
"strict"
))
{
else
if
(
!
strcmp
(
value
,
"strict"
))
{
set_opt
(
*
mount_options
,
CHECK_NORMAL
);
set_opt
(
*
mount_options
,
CHECK_NORMAL
);
set_opt
(
*
mount_options
,
CHECK_STRICT
);
set_opt
(
*
mount_options
,
CHECK_STRICT
);
}
}
...
...
fs/msdos/inode.c
View file @
a89a2558
...
@@ -81,7 +81,7 @@ static int parse_options(char *options,char *check,char *conversion,uid_t *uid,
...
@@ -81,7 +81,7 @@ static int parse_options(char *options,char *check,char *conversion,uid_t *uid,
*
check
=
'n'
;
*
check
=
'n'
;
*
conversion
=
'b'
;
*
conversion
=
'b'
;
*
dotsOK
=
1
;
*
dotsOK
=
0
;
*
uid
=
current
->
uid
;
*
uid
=
current
->
uid
;
*
gid
=
current
->
gid
;
*
gid
=
current
->
gid
;
*
umask
=
current
->
fs
->
umask
;
*
umask
=
current
->
fs
->
umask
;
...
...
include/asm-alpha/system.h
View file @
a89a2558
...
@@ -100,37 +100,39 @@ __old_ipl; })
...
@@ -100,37 +100,39 @@ __old_ipl; })
/*
/*
* Give prototypes to shut up gcc.
* Give prototypes to shut up gcc.
*/
*/
extern
inline
unsigned
long
xchg_u32
(
volatile
int
*
m
,
unsigned
long
new_
val
);
extern
inline
unsigned
long
xchg_u32
(
volatile
int
*
m
,
unsigned
long
val
);
extern
inline
unsigned
long
xchg_u64
(
volatile
long
*
m
,
unsigned
long
new_
val
);
extern
inline
unsigned
long
xchg_u64
(
volatile
long
*
m
,
unsigned
long
val
);
extern
inline
unsigned
long
xchg_u32
(
volatile
int
*
m
,
unsigned
long
new_
val
)
extern
inline
unsigned
long
xchg_u32
(
volatile
int
*
m
,
unsigned
long
val
)
{
{
unsigned
long
old_val
;
unsigned
long
dummy
,
dummy2
;
__asm__
__volatile__
(
"
\n
1:
\t
"
__asm__
__volatile__
(
"ldl_l %0,%2
\n\t
"
"
\n
1:
\t
"
"bis %3,%3,$25
\n\t
"
"ldl_l %0,0(%1)
\n\t
"
"stl_c $25,%1
\n\t
"
"bis %2,%2,%3
\n\t
"
"beq $25,1b
\n
"
"stl_c %3,0(%1)
\n\t
"
:
"=r"
(
old_val
),
"=m"
(
*
m
)
"beq %3,1b
\n
"
:
"m"
(
*
m
),
"r"
(
new_val
)
:
"=r"
(
val
),
"=r"
(
m
),
"=r"
(
dummy
),
"=r"
(
dummy2
)
:
"$25"
);
:
"1"
(
m
),
"2"
(
val
)
return
old_val
;
:
"memory"
);
return
val
;
}
}
extern
inline
unsigned
long
xchg_u64
(
volatile
long
*
m
,
unsigned
long
new_
val
)
extern
inline
unsigned
long
xchg_u64
(
volatile
long
*
m
,
unsigned
long
val
)
{
{
unsigned
long
old_val
;
unsigned
long
dummy
,
dummy2
;
__asm__
__volatile__
(
"
\n
1:
\t
"
__asm__
__volatile__
(
"ldq_l %0,%2
\n\t
"
"
\n
1:
\t
"
"bis %3,%3,$25
\n\t
"
"ldq_l %0,0(%1)
\n\t
"
"stq_c $25,%1
\n\t
"
"bis %2,%2,%3
\n\t
"
"beq $25,1b
\n
"
"stq_c %3,0(%1)
\n\t
"
:
"=r"
(
old_val
),
"=m"
(
*
m
)
"beq %3,1b
\n
"
:
"m"
(
*
m
),
"r"
(
new_val
)
:
"=r"
(
val
),
"=r"
(
m
),
"=r"
(
dummy
),
"=r"
(
dummy2
)
:
"$25"
);
:
"1"
(
m
),
"2"
(
val
)
return
old_val
;
:
"memory"
);
return
val
;
}
}
#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
...
...
include/asm-i386/ioctl.h
View file @
a89a2558
...
@@ -6,8 +6,6 @@
...
@@ -6,8 +6,6 @@
#ifndef _ASMI386_IOCTL_H
#ifndef _ASMI386_IOCTL_H
#define _ASMI386_IOCTL_H
#define _ASMI386_IOCTL_H
#include <asm/page.h>
/* for PAGE_SIZE */
/* ioctl command encoding: 32 bits total, command in lower 16 bits,
/* ioctl command encoding: 32 bits total, command in lower 16 bits,
* size of the parameter structure in the lower 14 bits of the
* size of the parameter structure in the lower 14 bits of the
* upper 16 bits.
* upper 16 bits.
...
@@ -18,38 +16,6 @@
...
@@ -18,38 +16,6 @@
* NOTE: This limits the max parameter size to 16kB -1 !
* NOTE: This limits the max parameter size to 16kB -1 !
*/
*/
#define IOC_VOID 0x00000000
/* param in size field */
#define IOC_IN 0x40000000
/* user --> kernel */
#define IOC_OUT 0x80000000
/* kernel --> user */
#define IOC_INOUT (IOC_IN | IOC_OUT)
/* both */
#define IOCSIZE_MASK 0x3fff0000
/* size (max 16k-1 bytes) */
#define IOCSIZE_SHIFT 16
/* how to get the size */
#define IOCSIZE_MAX ((PAGE_SIZE-1)&(IOCSIZE_MASK >> IOCSIZE_SHIFT))
#define IOCCMD_MASK 0x0000ffff
/* command code */
#define IOCCMD_SHIFT 0
#define IOCPARM_MASK IOCCMD_MASK
#define IOCPARM_SHIFT IOCCMD_SHIFT
#define IOC_SIZE(cmd) (((cmd) & IOCSIZE_MASK) >> IOCSIZE_SHIFT)
#define IOCBASECMD(cmd) ((cmd) & ~IOCPARM_MASK)
#define IOCGROUP(cmd) (((cmd) >> 8) & 0xFF)
/* _IO(magic, subcode); size field is zero and the
* subcode determines the command.
*/
#define _IO(c,d) (IOC_VOID | ((c)<<8) | (d))
/* param encoded */
/* _IOXX(magic, subcode, arg_t); where arg_t is the type of the
* (last) argument field in the ioctl call, if present.
*/
#define _IOW(c,d,t) (IOC_IN | ((sizeof(t)<<16) & IOCSIZE_MASK) | \
((c)<<8) | (d))
#define _IOR(c,d,t) (IOC_OUT | ((sizeof(t)<<16) & IOCSIZE_MASK) | \
((c)<<8) | (d))
/* WR rather than RW to avoid conflict with stdio.h */
#define _IOWR(c,d,t) (IOC_INOUT | ((sizeof(t)<<16) & IOCSIZE_MASK) | \
((c)<<8) | (d))
/*
/*
* The following is for compatibility across the various Linux
* The following is for compatibility across the various Linux
* platforms. The i386 ioctl numbering scheme doesn't really enforce
* platforms. The i386 ioctl numbering scheme doesn't really enforce
...
@@ -80,10 +46,30 @@
...
@@ -80,10 +46,30 @@
#define _IOC_READ 1U
#define _IOC_READ 1U
#define _IOC_WRITE 2U
#define _IOC_WRITE 2U
#define _IOC(dir,type,nr,size) \
(((dir) << _IOC_DIRSHIFT) | \
((type) << _IOC_TYPESHIFT) | \
((nr) << _IOC_NRSHIFT) | \
((size) << _IOC_SIZESHIFT))
/* used to create numbers */
#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
/* used to decode ioctl numbers.. */
/* used to decode ioctl numbers.. */
#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
/* ...and for the drivers/sound files... */
#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
#endif
/* _ASMI386_IOCTL_H */
#endif
/* _ASMI386_IOCTL_H */
include/asm-i386/irq.h
View file @
a89a2558
...
@@ -127,7 +127,7 @@ extern void enable_irq(unsigned int);
...
@@ -127,7 +127,7 @@ extern void enable_irq(unsigned int);
#define FAST_IRQ_NAME(nr) IRQ_NAME2(fast_IRQ##nr)
#define FAST_IRQ_NAME(nr) IRQ_NAME2(fast_IRQ##nr)
#define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr)
#define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr)
#ifdef __
_
SMP__
#ifdef __SMP__
#define GET_PROCESSOR_ID \
#define GET_PROCESSOR_ID \
"movl "SYMBOL_NAME_STR(apic_reg)", %edx\n\t" \
"movl "SYMBOL_NAME_STR(apic_reg)", %edx\n\t" \
...
...
include/linux/mcd.h
View file @
a89a2558
...
@@ -110,8 +110,7 @@ struct mcd_Toc {
...
@@ -110,8 +110,7 @@ struct mcd_Toc {
struct
msf
diskTime
;
struct
msf
diskTime
;
};
};
#if 0
#ifndef I_WAS_HERE
#ifndef I_WAS_HERE
#
error Please edit this file first.
#
warning You have not edited mcd.h
#
endif
#
warning Perhaps irq and i/o settings are wrong.
#endif
#endif
include/linux/mcdx.h
View file @
a89a2558
/*
/*
* Definitions for the Mitsumi CDROM interface
* Definitions for the Mitsumi CDROM interface
* Copyright (C) 1995 Heiko Schlittermann
* Copyright (C) 1995 Heiko Schlittermann
<heiko@lotte.sax.de>
* VERSION: 1.
0a
* VERSION: 1.
3
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -92,10 +92,16 @@
...
@@ -92,10 +92,16 @@
#define INIT 0
#define INIT 0
#define MALLOC 0
#define MALLOC 0
#define IOCTL 0
#define IOCTL 0
#define PLAYTRK 0
#define SUBCHNL 0
#define TOCHDR 0
#define MS 0
#define PLAYMSF 0
#define READTOC 0
#define OPENCLOSE 0
#define OPENCLOSE 0
#define HW 0
#define HW 0
#define TALK 0
#define TALK 0
#define IRQ
0
#define IRQ
1
#define TRANSFER 0
#define TRANSFER 0
#define REQUEST 0
#define REQUEST 0
#else
#else
...
@@ -173,8 +179,7 @@
...
@@ -173,8 +179,7 @@
#define MCDX_E 1
/* unspec error */
#define MCDX_E 1
/* unspec error */
#define MCDX_EOM 2
/* end of media */
#define MCDX_EOM 2
/* end of media */
#if 0
#ifndef I_WAS_HERE
#ifndef I_WAS_HERE
#
error Please edit this file first.
#
warning You have not edited mcdx.h
#
endif
#
warning Perhaps irq and i/o settings are wrong.
#endif
#endif
include/linux/pci.h
View file @
a89a2558
...
@@ -454,6 +454,7 @@
...
@@ -454,6 +454,7 @@
#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278
#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278
#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078
#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078
#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178
#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178
#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278
#define PCI_VENDOR_ID_ATRONICS 0x907f
#define PCI_VENDOR_ID_ATRONICS 0x907f
#define PCI_DEVICE_ID_ATRONICS_2015 0x2015
#define PCI_DEVICE_ID_ATRONICS_2015 0x2015
...
...
include/linux/tty.h
View file @
a89a2558
...
@@ -328,6 +328,7 @@ extern int pty_open(struct tty_struct * tty, struct file * filp);
...
@@ -328,6 +328,7 @@ extern int pty_open(struct tty_struct * tty, struct file * filp);
extern
int
con_open
(
struct
tty_struct
*
tty
,
struct
file
*
filp
);
extern
int
con_open
(
struct
tty_struct
*
tty
,
struct
file
*
filp
);
extern
void
update_screen
(
int
new_console
);
extern
void
update_screen
(
int
new_console
);
extern
void
console_print
(
const
char
*
);
/* vt.c */
/* vt.c */
...
...
kernel/ksyms.c
View file @
a89a2558
...
@@ -266,6 +266,8 @@ struct symbol_table symbol_table = {
...
@@ -266,6 +266,8 @@ struct symbol_table symbol_table = {
X
(
tty_wait_until_sent
),
X
(
tty_wait_until_sent
),
X
(
tty_check_change
),
X
(
tty_check_change
),
X
(
tty_hung_up_p
),
X
(
tty_hung_up_p
),
X
(
do_SAK
),
X
(
console_print
),
/* filesystem registration */
/* filesystem registration */
X
(
register_filesystem
),
X
(
register_filesystem
),
...
...
net/ipv4/proc.c
View file @
a89a2558
...
@@ -111,8 +111,8 @@ get__netinfo(struct proto *pro, char *buffer, int format, char **start, off_t of
...
@@ -111,8 +111,8 @@ get__netinfo(struct proto *pro, char *buffer, int format, char **start, off_t of
}
}
len
+=
sprintf
(
buffer
+
len
,
"%2d: %08lX:%04X %08lX:%04X %02X %08lX:%08lX %02X:%08lX %08X %d %d
\n
"
,
len
+=
sprintf
(
buffer
+
len
,
"%2d: %08lX:%04X %08lX:%04X %02X %08lX:%08lX %02X:%08lX %08X %d %d
\n
"
,
i
,
src
,
srcp
,
dest
,
destp
,
sp
->
state
,
i
,
src
,
srcp
,
dest
,
destp
,
sp
->
state
,
format
==
0
?
sp
->
write_seq
-
sp
->
rcv_ack_seq
:
sp
->
r
mem_alloc
,
format
==
0
?
sp
->
write_seq
-
sp
->
rcv_ack_seq
:
sp
->
w
mem_alloc
,
format
==
0
?
sp
->
acked_seq
-
sp
->
copied_seq
:
sp
->
w
mem_alloc
,
format
==
0
?
sp
->
acked_seq
-
sp
->
copied_seq
:
sp
->
r
mem_alloc
,
timer_active
,
timer_expires
-
jiffies
,
(
unsigned
)
sp
->
retransmits
,
timer_active
,
timer_expires
-
jiffies
,
(
unsigned
)
sp
->
retransmits
,
(
sp
->
socket
&&
SOCK_INODE
(
sp
->
socket
))
?
SOCK_INODE
(
sp
->
socket
)
->
i_uid
:
0
,
(
sp
->
socket
&&
SOCK_INODE
(
sp
->
socket
))
?
SOCK_INODE
(
sp
->
socket
)
->
i_uid
:
0
,
timer_active
?
sp
->
timeout
:
0
);
timer_active
?
sp
->
timeout
:
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment