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
72835ece
Commit
72835ece
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 1.2.10
parent
5992007d
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
268 additions
and
120 deletions
+268
-120
Makefile
Makefile
+1
-1
drivers/block/Makefile
drivers/block/Makefile
+3
-0
drivers/block/README.ide
drivers/block/README.ide
+1
-1
drivers/block/README.sbpcd
drivers/block/README.sbpcd
+11
-8
drivers/block/README.sonycd535
drivers/block/README.sonycd535
+10
-6
drivers/block/sbpcd.c
drivers/block/sbpcd.c
+52
-33
drivers/block/sonycd535.c
drivers/block/sonycd535.c
+82
-33
drivers/char/cyclades.c
drivers/char/cyclades.c
+1
-1
drivers/scsi/fdomain.c
drivers/scsi/fdomain.c
+39
-12
drivers/scsi/st.c
drivers/scsi/st.c
+12
-6
fs/binfmt_elf.c
fs/binfmt_elf.c
+17
-8
include/linux/elf.h
include/linux/elf.h
+19
-0
include/linux/sbpcd.h
include/linux/sbpcd.h
+9
-3
include/linux/tcp.h
include/linux/tcp.h
+4
-4
net/inet/af_inet.c
net/inet/af_inet.c
+6
-3
net/inet/ip_fw.c
net/inet/ip_fw.c
+1
-1
No files found.
Makefile
View file @
72835ece
VERSION
=
1
VERSION
=
1
PATCHLEVEL
=
2
PATCHLEVEL
=
2
SUBLEVEL
=
9
SUBLEVEL
=
10
ARCH
=
i386
ARCH
=
i386
...
...
drivers/block/Makefile
View file @
72835ece
...
@@ -100,6 +100,9 @@ block.a: $(OBJS)
...
@@ -100,6 +100,9 @@ block.a: $(OBJS)
dep
:
dep
:
$(CPP)
-M
$(SRCS)
>
.depend
$(CPP)
-M
$(SRCS)
>
.depend
ifdef
BLOCK_MODULE_OBJS
$(CPP)
-M
-DMODULE
$(BLOCK_MODULE_OBJS:.o=.c)
>>
.depend
endif
modules
:
$(BLOCK_MODULE_OBJS)
modules
:
$(BLOCK_MODULE_OBJS)
echo
$(BLOCK_MODULE_OBJS)
>
../../modules/BLOCK_MODULES
echo
$(BLOCK_MODULE_OBJS)
>
../../modules/BLOCK_MODULES
...
...
drivers/block/README.ide
View file @
72835ece
...
@@ -25,7 +25,7 @@ NEW! - support for reliable operation of buggy CMD-640 interfaces
...
@@ -25,7 +25,7 @@ NEW! - support for reliable operation of buggy CMD-640 interfaces
- use kernel command line option: hda=serialize
- use kernel command line option: hda=serialize
NEW! - experimental support for DTC-2278D interfaces
NEW! - experimental support for DTC-2278D interfaces
- use kernel command line option: hda=dtc2278
- use kernel command line option: hda=dtc2278
NEW! - run-time select
i
ble 32bit interface support (using hdparm-2.3)
NEW! - run-time select
a
ble 32bit interface support (using hdparm-2.3)
Under construction:
Under construction:
...
...
drivers/block/README.sbpcd
View file @
72835ece
This README belongs to release 3.
5
or newer of the SoundBlaster Pro
This README belongs to release 3.
7
or newer of the SoundBlaster Pro
(Matsushita, Kotobuki, Panasonic, CreativeLabs, Longshine and
soon TEAC, too
)
(Matsushita, Kotobuki, Panasonic, CreativeLabs, Longshine and
TEAC
)
CD-ROM driver for Linux.
CD-ROM driver for Linux.
The driver is able to drive the whole family of "traditional" IDE-style (that
The driver is able to drive the whole family of "traditional" IDE-style (that
has nothing to do with the new "Enhanced IDE
" drive standard) Matsushita,
is NOT the new "Enhanced IDE" or "ATAPI
" drive standard) Matsushita,
Kotobuki, Panasonic drives, sometimes labelled as "CreativeLabs". The
Kotobuki, Panasonic drives, sometimes labelled as "CreativeLabs". The
well-known drives are CR-521, CR-522, CR-523, CR-562, CR-563.
well-known drives are CR-521, CR-522, CR-523, CR-562, CR-563.
...
@@ -42,6 +42,10 @@ work.
...
@@ -42,6 +42,10 @@ work.
The interface type has to get configured in /usr/include/linux/sbpcd.h,
The interface type has to get configured in /usr/include/linux/sbpcd.h,
because the behavior of some sound card interfaces is different.
because the behavior of some sound card interfaces is different.
With some TEAC drives I have seen interface cards which seem to lack the
"drive select" lines; always drive 0 gets addressed. To avoid "mirror drives"
with such interface cards, set MAX_DRIVES to 1 and jumper your drive to ID 0.
The driver respects all known drive firmware releases - my old drive is a 2.11,
The driver respects all known drive firmware releases - my old drive is a 2.11,
but it should work with CR-52x drives <2.01 ... >3.00 and with CR-56x drives
but it should work with CR-52x drives <2.01 ... >3.00 and with CR-56x drives
<0.75 .. 5.00.
<0.75 .. 5.00.
...
@@ -79,9 +83,8 @@ The audio part should run with WorkMan, xcdplayer, with the "non-X11" products
...
@@ -79,9 +83,8 @@ The audio part should run with WorkMan, xcdplayer, with the "non-X11" products
CDplayer and WorkBone - tell me if it is not compatible with other software.
CDplayer and WorkBone - tell me if it is not compatible with other software.
With the CR-562 and CR-563 drives, the reading of audio frames is possible.
With the CR-562 and CR-563 drives, the reading of audio frames is possible.
This is implemented by an IOCTL function which per default reads only up to
This is implemented by an IOCTL function which reads READ_AUDIO frames of
4 frames of 2352 bytes at once (configurable with the "READ_AUDIO" define,
2352 bytes at once (configurable with the "READ_AUDIO" define, default is 0).
"55" is the maximum if you use sbpcd as a "module").
Reading the same frame a second time gives different data; the frame data
Reading the same frame a second time gives different data; the frame data
start at a different position, but all read bytes are valid, and we always
start at a different position, but all read bytes are valid, and we always
read 98 consecutive chunks (of 24 Bytes) as a frame. Reading more than 1 frame
read 98 consecutive chunks (of 24 Bytes) as a frame. Reading more than 1 frame
...
@@ -89,8 +92,8 @@ at once possibly misses some chunks at each frame boundary. This lack has to
...
@@ -89,8 +92,8 @@ at once possibly misses some chunks at each frame boundary. This lack has to
get corrected by external, "higher level" software which reads the same frame
get corrected by external, "higher level" software which reads the same frame
again and tries to find and eliminate overlapping chunks (24-byte-pieces).
again and tries to find and eliminate overlapping chunks (24-byte-pieces).
The transfer rate with reading audio (1-frame-pieces)
is as slow as 32 kB/sec
.
The transfer rate with reading audio (1-frame-pieces)
currently is very slow
.
This c
ould
be better reading bigger chunks, but the "missing" chunks possibly
This c
an
be better reading bigger chunks, but the "missing" chunks possibly
occur at the beginning of each single frame.
occur at the beginning of each single frame.
The software interface possibly may change a bit the day the SCSI driver
The software interface possibly may change a bit the day the SCSI driver
supports it too.
supports it too.
...
...
drivers/block/README.sonycd535
View file @
72835ece
...
@@ -58,13 +58,17 @@ THANKS
...
@@ -58,13 +58,17 @@ THANKS
======
======
Many thanks to Ron Jeppesen (ronj.an@site007.saic.com) for getting
Many thanks to Ron Jeppesen (ronj.an@site007.saic.com) for getting
this project off the ground. He wrote the initial release
and
this project off the ground. He wrote the initial release
the first two patches to this driver (0.1, 0.2, and 0.3).
and
the first two patches to this driver (0.1, 0.2, and 0.3).
Thanks also to Eberhard Moenkeberg (emoenke@gwdg.de) for prodding
Thanks also to Eberhard Moenkeberg (emoenke@gwdg.de) for prodding
me to place this code into the mainstream Linux source tree (as
me to place this code into the mainstream Linux source tree
of Linux version 1.1.91), as well as some patches to make it a
(as of Linux version 1.1.91), as well as some patches to make
better device citizen. Further thanks to "S. Joel Katz"
it a better device citizen. Further thanks to "S. Joel Katz"
<stimpson@panix.com> for his MODULE patches (see details below).
<stimpson@panix.com> for his MODULE patches (see details below),
Porfiri Claudio <C.Porfiri@nisms.tei.ericsson.se> for patches
to make the driver work with the older CDU-510/515 series, and
Heiko Eissfeldt <heiko@colossus.escape.de> for pointing out that
the verify_area() checks were ignoring the results of said checks.
(Acknowledgments from Ron Jeppesen in the 0.3 release:)
(Acknowledgments from Ron Jeppesen in the 0.3 release:)
Thanks to Corey Minyard who wrote the original CDU-31A driver on which
Thanks to Corey Minyard who wrote the original CDU-31A driver on which
...
...
drivers/block/sbpcd.c
View file @
72835ece
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
* Also for the TEAC CD-55A drive.
* Also for the TEAC CD-55A drive.
* Not for Funai or Sanyo drives.
* Not for Funai or Sanyo drives.
*
*
* NOTE: This is release 3.
6
.
* NOTE: This is release 3.
7
.
*
*
* VERSION HISTORY
* VERSION HISTORY
*
*
...
@@ -207,6 +207,13 @@
...
@@ -207,6 +207,13 @@
* Initial size of the READ_AUDIO buffer is 0. Can get set to any size
* Initial size of the READ_AUDIO buffer is 0. Can get set to any size
* during runtime.
* during runtime.
*
*
* 3.7 Introduced MAX_DRIVES for some poor interface cards (seen with TEAC
* drives) which allow only one drive (ID 0); this avoids repetitive
* detection under IDs 1..3.
* Elongated cmd_out_T response waiting; necessary for photo CDs with
* a lot of sessions.
* Bettered the sbpcd_open() behavior with TEAC drives.
*
* TODO
* TODO
*
*
* disk change detection
* disk change detection
...
@@ -288,13 +295,7 @@ char kernel_version[]=UTS_RELEASE;
...
@@ -288,13 +295,7 @@ char kernel_version[]=UTS_RELEASE;
#include "blk.h"
#include "blk.h"
#define VERSION "v3.6-1 Eberhard Moenkeberg <emoenke@gwdg.de>"
#define VERSION "v3.7 Eberhard Moenkeberg <emoenke@gwdg.de>"
#if 0
#define INLINE
#else
#define INLINE inline
#endif
/*==========================================================================*/
/*==========================================================================*/
/*
/*
...
@@ -406,6 +407,9 @@ extern unsigned long sbpcd4_init(unsigned long, unsigned long);
...
@@ -406,6 +407,9 @@ extern unsigned long sbpcd4_init(unsigned long, unsigned long);
#endif
#endif
/*==========================================================================*/
/*==========================================================================*/
#define INLINE inline
/*==========================================================================*/
/*==========================================================================*/
/*
/*
* the forward references:
* the forward references:
...
@@ -533,8 +537,9 @@ static u_char infobuf[20];
...
@@ -533,8 +537,9 @@ static u_char infobuf[20];
static
u_char
xa_head_buf
[
CD_XA_HEAD
];
static
u_char
xa_head_buf
[
CD_XA_HEAD
];
static
u_char
xa_tail_buf
[
CD_XA_TAIL
];
static
u_char
xa_tail_buf
[
CD_XA_TAIL
];
static
volatile
u_char
busy_data
=
0
;
static
volatile
u_char
busy_audio
=
0
;
/* true semaphores would be safer */
static
u_long
timeout
;
static
u_long
timeout
;
static
u_char
busy_data
=
0
,
busy_audio
=
0
;
/* true semaphores would be safer */
static
volatile
u_char
timed_out_delay
=
0
;
static
volatile
u_char
timed_out_delay
=
0
;
static
volatile
u_char
timed_out_data
=
0
;
static
volatile
u_char
timed_out_data
=
0
;
#if 0
#if 0
...
@@ -1017,21 +1022,29 @@ static int ResponseInfo(void)
...
@@ -1017,21 +1022,29 @@ static int ResponseInfo(void)
st
=
inb
(
CDi_status
);
st
=
inb
(
CDi_status
);
if
(
!
(
st
&
s_not_result_ready
))
break
;
if
(
!
(
st
&
s_not_result_ready
))
break
;
}
}
if
(
j
!=
0
||
timeout
<=
jiffies
)
break
;
if
(
(
j
!=
0
)
||
(
timeout
<=
jiffies
)
)
break
;
sbp_sleep
(
0
);
sbp_sleep
(
1
);
j
=
1
;
j
=
1
;
}
}
if
(
timeout
<=
jiffies
)
break
;
if
(
timeout
<=
jiffies
)
break
;
infobuf
[
i
]
=
inb
(
CDi_info
);
infobuf
[
i
]
=
inb
(
CDi_info
);
}
}
}
}
#if 000
while (!(inb(CDi_status)&s_not_result_ready))
{
infobuf[i++]=inb(CDi_info);
}
j=i-response_count;
if (j>0) msg(DBG_INF,"ResponseInfo: got %d trailing bytes.\n",j);
#endif 000
for
(
j
=
0
;
j
<
i
;
j
++
)
for
(
j
=
0
;
j
<
i
;
j
++
)
sprintf
(
&
msgbuf
[
j
*
3
],
" %02X"
,
infobuf
[
j
]);
sprintf
(
&
msgbuf
[
j
*
3
],
" %02X"
,
infobuf
[
j
]);
msgbuf
[
j
*
3
]
=
0
;
msgbuf
[
j
*
3
]
=
0
;
msg
(
DBG_CMD
,
"ResponseInfo:%s (%d,%d)
\n
"
,
msgbuf
,
response_count
,
i
);
msg
(
DBG_CMD
,
"ResponseInfo:%s (%d,%d)
\n
"
,
msgbuf
,
response_count
,
i
);
st
=
response_count
-
i
;
j
=
response_count
-
i
;
if
(
st
>
0
)
st
=-
st
;
if
(
j
>
0
)
return
(
-
j
)
;
return
(
st
);
else
return
(
i
);
}
}
/*==========================================================================*/
/*==========================================================================*/
static
void
EvaluateStatus
(
int
st
)
static
void
EvaluateStatus
(
int
st
)
...
@@ -1253,7 +1266,7 @@ static int cc_ReadError(void)
...
@@ -1253,7 +1266,7 @@ static int cc_ReadError(void)
static
int
cmd_out_T
(
void
)
static
int
cmd_out_T
(
void
)
{
{
#undef CMDT_TRIES
#undef CMDT_TRIES
#define CMDT_TRIES 100
#define CMDT_TRIES 100
0
static
int
cc_DriveReset
(
void
);
static
int
cc_DriveReset
(
void
);
int
i
,
j
,
l
,
ntries
;
int
i
,
j
,
l
,
ntries
;
...
@@ -1358,7 +1371,7 @@ static int cmd_out_T(void)
...
@@ -1358,7 +1371,7 @@ static int cmd_out_T(void)
return
(
-
D_S
[
d
].
error_state
-
400
);
return
(
-
D_S
[
d
].
error_state
-
400
);
}
}
if
(
drvcmd
[
0
]
==
CMDT_READ
)
return
(
0
);
/* handled elsewhere */
if
(
drvcmd
[
0
]
==
CMDT_READ
)
return
(
0
);
/* handled elsewhere */
sbp_sleep
(
1
);
sbp_sleep
(
1
0
);
if
(
ntries
>
(
CMDT_TRIES
-
50
))
continue
;
if
(
ntries
>
(
CMDT_TRIES
-
50
))
continue
;
msg
(
DBG_TEA
,
"cmd_out_T: next CMDT_TRIES (%02X): %d.
\n
"
,
drvcmd
[
0
],
ntries
-
1
);
msg
(
DBG_TEA
,
"cmd_out_T: next CMDT_TRIES (%02X): %d.
\n
"
,
drvcmd
[
0
],
ntries
-
1
);
}
}
...
@@ -1414,7 +1427,7 @@ static int cmd_out(void)
...
@@ -1414,7 +1427,7 @@ static int cmd_out(void)
if
(
D_S
[
d
].
in_SpinUp
)
msg
(
DBG_SPI
,
"in_SpinUp: to ResponseStatus.
\n
"
);
if
(
D_S
[
d
].
in_SpinUp
)
msg
(
DBG_SPI
,
"in_SpinUp: to ResponseStatus.
\n
"
);
i
=
ResponseStatus
();
i
=
ResponseStatus
();
/* builds status_bits, returns orig. status or p_busy_new */
/* builds status_bits, returns orig. status or p_busy_new */
if
(
i
<
0
)
return
(
-
9
);
if
(
i
<
0
)
return
(
i
);
if
(
flags_cmd_out
&
(
f_bit1
|
f_wait_if_busy
))
if
(
flags_cmd_out
&
(
f_bit1
|
f_wait_if_busy
))
{
{
if
(
!
st_check
)
if
(
!
st_check
)
...
@@ -2083,15 +2096,18 @@ static int LockDoor(void)
...
@@ -2083,15 +2096,18 @@ static int LockDoor(void)
sbp_sleep
(
1
);
sbp_sleep
(
1
);
}
}
while
((
i
<
0
)
&&
(
j
));
while
((
i
<
0
)
&&
(
j
));
if
(
j
==
0
)
cc_DriveReset
();
if
(
j
==
0
)
j
=
20
;
{
do
cc_DriveReset
();
{
j
=
20
;
i
=
cc_LockDoor
(
1
);
do
--
j
;
{
sbp_sleep
(
1
);
i
=
cc_LockDoor
(
1
);
--
j
;
sbp_sleep
(
1
);
}
while
((
i
<
0
)
&&
(
j
));
}
}
while
((
i
<
0
)
&&
(
j
));
return
(
i
);
return
(
i
);
}
}
/*==========================================================================*/
/*==========================================================================*/
...
@@ -2243,7 +2259,7 @@ static int cc_ModeSense(void)
...
@@ -2243,7 +2259,7 @@ static int cc_ModeSense(void)
else
if
(
famT_drive
)
else
if
(
famT_drive
)
{
{
D_S
[
d
].
sense_byte
=
0
;
D_S
[
d
].
sense_byte
=
0
;
if
(
infobuf
[
4
]
==
0x01
)
D_S
[
d
].
xa_byte
=
0x20
;
if
(
infobuf
[
4
]
==
0x01
)
D_S
[
d
].
xa_byte
=
0x20
;
/* wrong!!!! */
i
=
2
;
i
=
2
;
}
}
D_S
[
d
].
frame_size
=
make16
(
infobuf
[
i
],
infobuf
[
i
+
1
]);
D_S
[
d
].
frame_size
=
make16
(
infobuf
[
i
],
infobuf
[
i
+
1
]);
...
@@ -3204,7 +3220,7 @@ static int check_version(void)
...
@@ -3204,7 +3220,7 @@ static int check_version(void)
if
(
D_S
[
d
].
firmware_version
[
j
]
!=
lcs_firm_f4
[
j
])
break
;
if
(
D_S
[
d
].
firmware_version
[
j
]
!=
lcs_firm_f4
[
j
])
break
;
if
(
j
==
4
)
D_S
[
d
].
drv_type
=
drv_f4
;
if
(
j
==
4
)
D_S
[
d
].
drv_type
=
drv_f4
;
if
(
!
D_S
[
d
].
drv_type
)
ask_mail
();
if
(
D_S
[
d
].
drv_type
==
drv_famL
)
ask_mail
();
}
}
else
if
(
famT_drive
)
else
if
(
famT_drive
)
{
{
...
@@ -3382,7 +3398,7 @@ static int check_drives(void)
...
@@ -3382,7 +3398,7 @@ static int check_drives(void)
msg
(
DBG_INI
,
"check_drives entered.
\n
"
);
msg
(
DBG_INI
,
"check_drives entered.
\n
"
);
ndrives
=
0
;
ndrives
=
0
;
for
(
j
=
0
;
j
<
NR_SBPCD
;
j
++
)
for
(
j
=
0
;
j
<
MAX_DRIVES
;
j
++
)
{
{
D_S
[
ndrives
].
drv_id
=
j
;
D_S
[
ndrives
].
drv_id
=
j
;
if
(
sbpro_type
==
1
)
D_S
[
ndrives
].
drv_sel
=
(
j
&
0x01
)
<<
1
|
(
j
&
0x02
)
>>
1
;
if
(
sbpro_type
==
1
)
D_S
[
ndrives
].
drv_sel
=
(
j
&
0x01
)
<<
1
|
(
j
&
0x02
)
>>
1
;
...
@@ -3624,7 +3640,7 @@ static int DiskInfo(void)
...
@@ -3624,7 +3640,7 @@ static int DiskInfo(void)
return
(
i
);
return
(
i
);
}
}
if
(
D_S
[
d
].
f_multisession
)
D_S
[
d
].
sbp_bufsiz
=
1
;
/* possibly a weird PhotoCD */
if
(
D_S
[
d
].
f_multisession
)
D_S
[
d
].
sbp_bufsiz
=
1
;
/* possibly a weird PhotoCD */
else
D_S
[
d
].
sbp_bufsiz
=
SBP_BUFFER_FRAMES
;
i
=
cc_ReadTocEntry
(
D_S
[
d
].
n_first_track
);
i
=
cc_ReadTocEntry
(
D_S
[
d
].
n_first_track
);
if
(
i
<
0
)
if
(
i
<
0
)
{
{
...
@@ -4823,6 +4839,7 @@ static int sbpcd_open(struct inode *ip, struct file *fp)
...
@@ -4823,6 +4839,7 @@ static int sbpcd_open(struct inode *ip, struct file *fp)
{
{
cc_DriveReset
();
cc_DriveReset
();
i
=
ResponseStatus
();
i
=
ResponseStatus
();
i
=
ResponseStatus
();
}
}
if
(
i
<
0
)
if
(
i
<
0
)
{
{
...
@@ -5065,12 +5082,12 @@ int init_module(void)
...
@@ -5065,12 +5082,12 @@ int init_module(void)
msg
(
DBG_INF
,
"Auto-Probing can cause a hang (f.e. touching an ethernet card).
\n
"
);
msg
(
DBG_INF
,
"Auto-Probing can cause a hang (f.e. touching an ethernet card).
\n
"
);
msg
(
DBG_INF
,
"If that happens, you have to reboot and use the
\n
"
);
msg
(
DBG_INF
,
"If that happens, you have to reboot and use the
\n
"
);
msg
(
DBG_INF
,
"LILO (kernel) command line feature like:
\n
"
);
msg
(
DBG_INF
,
"LILO (kernel) command line feature like:
\n
"
);
msg
(
DBG_INF
,
"
\n
LILO boot: ... sbpcd=0x230,SoundBlaster
\n
"
);
msg
(
DBG_INF
,
" LILO boot: ... sbpcd=0x230,SoundBlaster
\n
"
);
msg
(
DBG_INF
,
"or like:
\n
"
);
msg
(
DBG_INF
,
"or like:
\n
"
);
msg
(
DBG_INF
,
" LILO boot: ... sbpcd=0x300,LaserMate
\n
"
);
msg
(
DBG_INF
,
" LILO boot: ... sbpcd=0x300,LaserMate
\n
"
);
msg
(
DBG_INF
,
"or like:
\n
"
);
msg
(
DBG_INF
,
"or like:
\n
"
);
msg
(
DBG_INF
,
" LILO boot: ... sbpcd=0x330,SPEA
\n
"
);
msg
(
DBG_INF
,
" LILO boot: ... sbpcd=0x330,SPEA
\n
"
);
msg
(
DBG_INF
,
"
\n
with your REAL address.
\n
"
);
msg
(
DBG_INF
,
"with your REAL address.
\n
"
);
msg
(
DBG_INF
,
"= = = = = = = = = = END of WARNING = = = = = = = = = =
\n\n
"
);
msg
(
DBG_INF
,
"= = = = = = = = = = END of WARNING = = = = = = = = = =
\n\n
"
);
}
}
#endif DISTRIBUTION
#endif DISTRIBUTION
...
@@ -5153,8 +5170,10 @@ int init_module(void)
...
@@ -5153,8 +5170,10 @@ int init_module(void)
cc_ReadStatus
();
cc_ReadStatus
();
i
=
ResponseStatus
();
/* returns orig. status or p_busy_new */
i
=
ResponseStatus
();
/* returns orig. status or p_busy_new */
if
(
famT_drive
)
i
=
ResponseStatus
();
/* returns orig. status or p_busy_new */
if
(
i
<
0
)
if
(
i
<
0
)
msg
(
DBG_INF
,
"init: ResponseStatus returns %02X
\n
"
,
i
);
if
(
i
!=-
402
)
msg
(
DBG_INF
,
"init: ResponseStatus returns %d.
\n
"
,
i
);
else
else
{
{
if
(
st_check
)
if
(
st_check
)
...
...
drivers/block/sonycd535.c
View file @
72835ece
...
@@ -12,14 +12,24 @@
...
@@ -12,14 +12,24 @@
* I tried polling without the sony_sleep during the data transfers but
* I tried polling without the sony_sleep during the data transfers but
* it did not speed things up any.
* it did not speed things up any.
*
*
*
5/23/9
3 (rgj) changed the major number to 21 to get rid of conflict
*
1993-05-2
3 (rgj) changed the major number to 21 to get rid of conflict
* with CDU-31A driver. This is the also the number from the Linux
* with CDU-31A driver. This is the also the number from the Linux
* Device Driver Registry for the Sony Drive. Hope nobody else is using it.
* Device Driver Registry for the Sony Drive. Hope nobody else is using it.
*
*
*
8/29/93
(rgj) remove the configuring of the interface board address
*
1993-08-29
(rgj) remove the configuring of the interface board address
* from the top level configuration, you have to modify it in this file.
* from the top level configuration, you have to modify it in this file.
*
*
* 1/26/95 Made module-capable (Joel Katz <Stimpson@Panix.COM>)
* 1995-01-26 Made module-capable (Joel Katz <Stimpson@Panix.COM>)
*
* 1995-05-20
* Modified to support CDU-510/515 series
* (Claudio Porfiri<C.Porfiri@nisms.tei.ericsson.se>)
* Fixed to report verify_area() failures
* (Heiko Eissfeldt <heiko@colossus.escape.de>)
*
* 1995-06-01
* More chages to support CDU-510/515 series
* (Claudio Porfiri<C.Porfiri@nisms.tei.ericsson.se>)
*
*
* Things to do:
* Things to do:
* - handle errors and status better, put everything into a single word
* - handle errors and status better, put everything into a single word
...
@@ -131,7 +141,7 @@
...
@@ -131,7 +141,7 @@
#define MAJOR_NR CDU535_CDROM_MAJOR
#define MAJOR_NR CDU535_CDROM_MAJOR
#ifdef MODULE
#ifdef MODULE
# include "
/usr/src/linux/drivers/block/
blk.h"
# include "blk.h"
#else
#else
# include "blk.h"
# include "blk.h"
# define MOD_INC_USE_COUNT
# define MOD_INC_USE_COUNT
...
@@ -157,6 +167,13 @@
...
@@ -157,6 +167,13 @@
# define CDU535_MESSAGE_NAME "Sony CDU-535"
# define CDU535_MESSAGE_NAME "Sony CDU-535"
#endif
#endif
#ifndef MAX_SPINUP_RETRY
# define MAX_SPINUP_RETRY 3
/* 1 is sufficient for most drives... */
#endif
#ifndef RETRY_FOR_BAD_STATUS
# define RETRY_FOR_BAD_STATUS 100
/* in 10th of second */
#endif
#ifndef DEBUG
#ifndef DEBUG
# define DEBUG 1
# define DEBUG 1
#endif
#endif
...
@@ -811,7 +828,6 @@ do_cdu535_request(void)
...
@@ -811,7 +828,6 @@ do_cdu535_request(void)
Byte
status
[
2
];
Byte
status
[
2
];
Byte
cmd
[
2
];
Byte
cmd
[
2
];
if
(
!
sony_inuse
)
{
if
(
!
sony_inuse
)
{
cdu_open
(
NULL
,
NULL
);
cdu_open
(
NULL
,
NULL
);
}
}
...
@@ -870,36 +886,56 @@ do_cdu535_request(void)
...
@@ -870,36 +886,56 @@ do_cdu535_request(void)
/*
/*
* Read the data. If the drive was not spinning,
* Read the data. If the drive was not spinning,
* spin it up and try
onc
e more.
* spin it up and try
som
e more.
*/
*/
spin_up_retry
=
0
;
for
(
spin_up_retry
=
0
;;
++
spin_up_retry
)
{
for
(;;)
{
/* This loop has been modified to support the Sony
#if DEBUG > 1
* CDU-510/515 series, thanks to Claudio Porfiri
if
(
check_drive_status
()
!=
0
)
{
* <C.Porfiri@nisms.tei.ericsson.se>.
/* drive not ready */
*/
sony_first_block
=
-
1
;
/*
sony_last_block
=
-
1
;
* This part is to deal with very slow hardware. We
end_request
(
0
);
* try at most MAX_SPINUP_RETRY times to read the same
return
;
* block. A check for seek_and_read_N_blocks' result is
}
* performed; if the result is wrong, the CDROM's engine
#endif
* is restarted and the operation is tried again.
if
(
0
<=
seek_and_read_N_blocks
(
params
,
read_size
,
*/
status
,
sony_buffer
,
(
read_size
*
2048
)))
/*
* 1995-06-01: The system got problems when downloading
* from Slackware CDROM, the problem seems to be:
* seek_and_read_N_blocks returns BAD_STATUS and we
* should wait for a while before retrying, so a new
* part was added to discriminate the return value from
* seek_and_read_N_blocks for the various cases.
*/
int
readStatus
=
seek_and_read_N_blocks
(
params
,
read_size
,
status
,
sony_buffer
,
(
read_size
*
2048
));
if
(
0
<=
readStatus
)
/* Good data; common case, placed first */
break
;
break
;
if
(
!
(
status
[
0
]
&
SONY535_STATUS1_NOT_SPINNING
)
||
if
(
readStatus
==
NO_ROOM
||
spin_up_retry
==
MAX_SPINUP_RETRY
)
{
spin_up_retry
)
{
/* give up */
printk
(
CDU535_MESSAGE_NAME
" Read error: 0x%.2x
\n
"
,
if
(
readStatus
==
NO_ROOM
)
status
[
0
]);
printk
(
CDU535_MESSAGE_NAME
" No room to read from CD
\n
"
);
else
printk
(
CDU535_MESSAGE_NAME
" Read error: 0x%.2x
\n
"
,
status
[
0
]);
sony_first_block
=
-
1
;
sony_first_block
=
-
1
;
sony_last_block
=
-
1
;
sony_last_block
=
-
1
;
end_request
(
0
);
end_request
(
0
);
return
;
return
;
}
}
if
(
readStatus
==
BAD_STATUS
)
{
/* Sleep for a while, then retry */
current
->
state
=
TASK_INTERRUPTIBLE
;
current
->
timeout
=
jiffies
+
RETRY_FOR_BAD_STATUS
;
schedule
();
}
#if DEBUG > 0
printk
(
CDU535_MESSAGE_NAME
printk
(
CDU535_MESSAGE_NAME
" debug: calling spin up when reading data!
\n
"
);
" debug: calling spin up when reading data!
\n
"
);
#endif
cmd
[
0
]
=
SONY535_SPIN_UP
;
cmd
[
0
]
=
SONY535_SPIN_UP
;
do_sony_cmd
(
cmd
,
1
,
status
,
NULL
,
0
,
0
);
do_sony_cmd
(
cmd
,
1
,
status
,
NULL
,
0
,
0
);
spin_up_retry
=
1
;
}
}
}
}
/*
/*
...
@@ -1008,7 +1044,7 @@ static int
...
@@ -1008,7 +1044,7 @@ static int
sony_get_subchnl_info
(
long
arg
)
sony_get_subchnl_info
(
long
arg
)
{
{
struct
cdrom_subchnl
schi
;
struct
cdrom_subchnl
schi
;
int
err
;
/* Get attention stuff */
/* Get attention stuff */
if
(
check_drive_status
()
!=
0
)
if
(
check_drive_status
()
!=
0
)
...
@@ -1018,7 +1054,9 @@ sony_get_subchnl_info(long arg)
...
@@ -1018,7 +1054,9 @@ sony_get_subchnl_info(long arg)
if
(
!
sony_toc_read
)
{
if
(
!
sony_toc_read
)
{
return
-
EIO
;
return
-
EIO
;
}
}
verify_area
(
VERIFY_WRITE
/* and read */
,
(
char
*
)
arg
,
sizeof
schi
);
err
=
verify_area
(
VERIFY_WRITE
/* and read */
,
(
char
*
)
arg
,
sizeof
schi
);
if
(
err
)
return
err
;
memcpy_fromfs
(
&
schi
,
(
char
*
)
arg
,
sizeof
schi
);
memcpy_fromfs
(
&
schi
,
(
char
*
)
arg
,
sizeof
schi
);
...
@@ -1079,8 +1117,9 @@ cdu_ioctl(struct inode *inode,
...
@@ -1079,8 +1117,9 @@ cdu_ioctl(struct inode *inode,
unsigned
int
dev
;
unsigned
int
dev
;
Byte
status
[
2
];
Byte
status
[
2
];
Byte
cmd_buff
[
10
],
params
[
10
];
Byte
cmd_buff
[
10
],
params
[
10
];
int
i
,
dsc_status
;
int
i
;
int
dsc_status
;
int
err
;
if
(
!
inode
)
{
if
(
!
inode
)
{
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -1170,7 +1209,9 @@ cdu_ioctl(struct inode *inode,
...
@@ -1170,7 +1209,9 @@ cdu_ioctl(struct inode *inode,
break
;
break
;
case
CDROMPLAYMSF
:
/* Play starting at the given MSF address. */
case
CDROMPLAYMSF
:
/* Play starting at the given MSF address. */
verify_area
(
VERIFY_READ
,
(
char
*
)
arg
,
6
);
err
=
verify_area
(
VERIFY_READ
,
(
char
*
)
arg
,
6
);
if
(
err
)
return
err
;
spin_up_drive
(
status
);
spin_up_drive
(
status
);
set_drive_mode
(
SONY535_AUDIO_DRIVE_MODE
,
status
);
set_drive_mode
(
SONY535_AUDIO_DRIVE_MODE
,
status
);
memcpy_fromfs
(
params
,
(
void
*
)
arg
,
6
);
memcpy_fromfs
(
params
,
(
void
*
)
arg
,
6
);
...
@@ -1209,7 +1250,9 @@ cdu_ioctl(struct inode *inode,
...
@@ -1209,7 +1250,9 @@ cdu_ioctl(struct inode *inode,
if
(
!
sony_toc_read
)
if
(
!
sony_toc_read
)
return
-
EIO
;
return
-
EIO
;
hdr
=
(
struct
cdrom_tochdr
*
)
arg
;
hdr
=
(
struct
cdrom_tochdr
*
)
arg
;
verify_area
(
VERIFY_WRITE
,
hdr
,
sizeof
*
hdr
);
err
=
verify_area
(
VERIFY_WRITE
,
hdr
,
sizeof
*
hdr
);
if
(
err
)
return
err
;
loc_hdr
.
cdth_trk0
=
bcd_to_int
(
sony_toc
->
first_track_num
);
loc_hdr
.
cdth_trk0
=
bcd_to_int
(
sony_toc
->
first_track_num
);
loc_hdr
.
cdth_trk1
=
bcd_to_int
(
sony_toc
->
last_track_num
);
loc_hdr
.
cdth_trk1
=
bcd_to_int
(
sony_toc
->
last_track_num
);
memcpy_tofs
(
hdr
,
&
loc_hdr
,
sizeof
*
hdr
);
memcpy_tofs
(
hdr
,
&
loc_hdr
,
sizeof
*
hdr
);
...
@@ -1229,7 +1272,9 @@ cdu_ioctl(struct inode *inode,
...
@@ -1229,7 +1272,9 @@ cdu_ioctl(struct inode *inode,
return
-
EIO
;
return
-
EIO
;
}
}
entry
=
(
struct
cdrom_tocentry
*
)
arg
;
entry
=
(
struct
cdrom_tocentry
*
)
arg
;
verify_area
(
VERIFY_WRITE
/* and read */
,
entry
,
sizeof
*
entry
);
err
=
verify_area
(
VERIFY_WRITE
/* and read */
,
entry
,
sizeof
*
entry
);
if
(
err
)
return
err
;
memcpy_fromfs
(
&
loc_entry
,
entry
,
sizeof
loc_entry
);
memcpy_fromfs
(
&
loc_entry
,
entry
,
sizeof
loc_entry
);
...
@@ -1268,7 +1313,9 @@ cdu_ioctl(struct inode *inode,
...
@@ -1268,7 +1313,9 @@ cdu_ioctl(struct inode *inode,
sony_get_toc
();
sony_get_toc
();
if
(
!
sony_toc_read
)
if
(
!
sony_toc_read
)
return
-
EIO
;
return
-
EIO
;
verify_area
(
VERIFY_READ
,
(
char
*
)
arg
,
sizeof
ti
);
err
=
verify_area
(
VERIFY_READ
,
(
char
*
)
arg
,
sizeof
ti
);
if
(
err
)
return
err
;
memcpy_fromfs
(
&
ti
,
(
char
*
)
arg
,
sizeof
ti
);
memcpy_fromfs
(
&
ti
,
(
char
*
)
arg
,
sizeof
ti
);
if
((
ti
.
cdti_trk0
<
sony_toc
->
first_track_num
)
if
((
ti
.
cdti_trk0
<
sony_toc
->
first_track_num
)
...
@@ -1337,7 +1384,9 @@ cdu_ioctl(struct inode *inode,
...
@@ -1337,7 +1384,9 @@ cdu_ioctl(struct inode *inode,
{
{
struct
cdrom_volctrl
volctrl
;
struct
cdrom_volctrl
volctrl
;
verify_area
(
VERIFY_READ
,
(
char
*
)
arg
,
sizeof
volctrl
);
err
=
verify_area
(
VERIFY_READ
,
(
char
*
)
arg
,
sizeof
volctrl
);
if
(
err
)
return
err
;
memcpy_fromfs
(
&
volctrl
,
(
char
*
)
arg
,
sizeof
volctrl
);
memcpy_fromfs
(
&
volctrl
,
(
char
*
)
arg
,
sizeof
volctrl
);
cmd_buff
[
0
]
=
SONY535_SET_VOLUME
;
cmd_buff
[
0
]
=
SONY535_SET_VOLUME
;
...
...
drivers/char/cyclades.c
View file @
72835ece
...
@@ -2643,7 +2643,7 @@ cy_init_card(unsigned char *true_base_addr)
...
@@ -2643,7 +2643,7 @@ cy_init_card(unsigned char *true_base_addr)
/* The Cyclom-16Y does not decode address bit 9 and therefore
/* The Cyclom-16Y does not decode address bit 9 and therefore
cannot distinguish between references to chip 0 and a non-
cannot distinguish between references to chip 0 and a non-
existent chip 4. If the prece
e
ding clearing of the supposed
existent chip 4. If the preceding clearing of the supposed
chip 4 GFRCR register appears at chip 0, there is no chip 4
chip 4 GFRCR register appears at chip 0, there is no chip 4
and this must be a Cyclom-16Y, not a Cyclom-32Ye.
and this must be a Cyclom-16Y, not a Cyclom-32Ye.
*/
*/
...
...
drivers/scsi/fdomain.c
View file @
72835ece
/* fdomain.c -- Future Domain TMC-16x0 SCSI driver
/* fdomain.c -- Future Domain TMC-16x0 SCSI driver
* Created: Sun May 3 18:53:19 1992 by faith@cs.unc.edu
* Created: Sun May 3 18:53:19 1992 by faith@cs.unc.edu
* Revised:
Sat Jan 14 21:39:15
1995 by faith@cs.unc.edu
* Revised:
Mon Jun 5 09:21:54
1995 by faith@cs.unc.edu
* Author: Rickard E. Faith, faith@cs.unc.edu
* Author: Rickard E. Faith, faith@cs.unc.edu
* Copyright 1992, 1993, 1994, 1995 Rickard E. Faith
* Copyright 1992, 1993, 1994, 1995 Rickard E. Faith
*
*
* $Id: fdomain.c,v 5.2
6 1995/01/15 02:39:19 root
Exp $
* $Id: fdomain.c,v 5.2
8 1995/06/05 13:21:57 faith
Exp $
* This program is free software; you can redistribute it and/or modify it
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* under the terms of the GNU General Public License as published by the
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
The following BIOS versions are supported: 2.0, 3.0, 3.2, 3.4, and 3.5.
The following BIOS versions are supported: 2.0, 3.0, 3.2, 3.4, and 3.5.
The following chips are supported: TMC-1800, TMC-18C50, TMC-18C30.
The following chips are supported: TMC-1800, TMC-18C50, TMC-18C30.
Reports suggest that the driver will also work with the 36C70 chip and
Reports suggest that the driver will also work with the 36C70 chip and
with the Quantum ISA-200S
SCSI adapter
.
with the Quantum ISA-200S
and ISA-250MG SCSI adapters
.
Please note that the drive ordering that Future Domain implemented in BIOS
Please note that the drive ordering that Future Domain implemented in BIOS
versions 3.4 and 3.5 is the opposite of the order (currently) used by the
versions 3.4 and 3.5 is the opposite of the order (currently) used by the
...
@@ -141,6 +141,10 @@
...
@@ -141,6 +141,10 @@
and to Martin Andrews (andrewm@ccfadm.eeg.ccf.org) for the signature to
and to Martin Andrews (andrewm@ccfadm.eeg.ccf.org) for the signature to
some random TMC-1680 repackaged by IBM.
some random TMC-1680 repackaged by IBM.
Thanks for Mark Singer (elf@netcom.com) and Richard Simpson
(rsimpson@ewrcsdra.demon.co.uk) for more Quantum signatures and detective
work on the Quantum RAM layout.
All of the alpha testers deserve much thanks.
All of the alpha testers deserve much thanks.
...
@@ -190,7 +194,7 @@
...
@@ -190,7 +194,7 @@
#include <linux/string.h>
#include <linux/string.h>
#include <linux/ioport.h>
#include <linux/ioport.h>
#define VERSION "$Revision: 5.2
6
$"
#define VERSION "$Revision: 5.2
8
$"
/* START OF USER DEFINABLE OPTIONS */
/* START OF USER DEFINABLE OPTIONS */
...
@@ -281,7 +285,7 @@ static void *bios_base = NULL;
...
@@ -281,7 +285,7 @@ static void *bios_base = NULL;
static
int
bios_major
=
0
;
static
int
bios_major
=
0
;
static
int
bios_minor
=
0
;
static
int
bios_minor
=
0
;
static
int
PCI_bus
=
0
;
static
int
PCI_bus
=
0
;
static
int
ISA_200S
=
0
;
/* Quantum ISA-200S
*/
static
int
Quantum
=
0
;
/* Quantum board variant
*/
static
int
interrupt_level
=
0
;
static
int
interrupt_level
=
0
;
static
volatile
int
in_command
=
0
;
static
volatile
int
in_command
=
0
;
static
Scsi_Cmnd
*
current_SC
=
NULL
;
static
Scsi_Cmnd
*
current_SC
=
NULL
;
...
@@ -357,18 +361,22 @@ struct signature {
...
@@ -357,18 +361,22 @@ struct signature {
int
sig_length
;
int
sig_length
;
int
major_bios_version
;
int
major_bios_version
;
int
minor_bios_version
;
int
minor_bios_version
;
int
flag
;
/* 1 == PCI_bus, 2
== ISA_200S */
int
flag
;
/* 1 == PCI_bus, 2 == ISA_200S, 3 == ISA_250MG, 4
== ISA_200S */
}
signatures
[]
=
{
}
signatures
[]
=
{
/* 1 2 3 4 5 6 */
/* 1 2 3 4 5 6 */
/* 123456789012345678901234567890123456789012345678901234567890 */
/* 123456789012345678901234567890123456789012345678901234567890 */
{
"FUTURE DOMAIN CORP. (C) 1986-1990 1800-V2.07/28/89"
,
5
,
50
,
2
,
0
,
0
},
{
"FUTURE DOMAIN CORP. (C) 1986-1990 1800-V2.07/28/89"
,
5
,
50
,
2
,
0
,
0
},
{
"FUTURE DOMAIN CORP. (C) 1986-1990 1800-V1.07/28/89"
,
5
,
50
,
2
,
0
,
0
},
{
"FUTURE DOMAIN CORP. (C) 1986-1990 1800-V1.07/28/89"
,
5
,
50
,
2
,
0
,
0
},
{
"FUTURE DOMAIN CORP. (C) 1986-1990 1800-V2.07/28/89"
,
72
,
50
,
2
,
0
,
2
},
{
"FUTURE DOMAIN CORP. (C) 1986-1990 1800-V2.07/28/89"
,
72
,
50
,
2
,
0
,
2
},
{
"FUTURE DOMAIN CORP. (C) 1986-1990 1800-V2.0"
,
73
,
43
,
2
,
0
,
3
},
{
"FUTURE DOMAIN CORP. (C) 1991 1800-V2.0."
,
72
,
39
,
2
,
0
,
4
},
{
"FUTURE DOMAIN CORP. (C) 1992 V3.00.004/02/92"
,
5
,
44
,
3
,
0
,
0
},
{
"FUTURE DOMAIN CORP. (C) 1992 V3.00.004/02/92"
,
5
,
44
,
3
,
0
,
0
},
{
"FUTURE DOMAIN TMC-18XX (C) 1993 V3.203/12/93"
,
5
,
44
,
3
,
2
,
0
},
{
"FUTURE DOMAIN TMC-18XX (C) 1993 V3.203/12/93"
,
5
,
44
,
3
,
2
,
0
},
{
"IBM F1 P2 BIOS v1.0104/29/93"
,
5
,
28
,
3
,
-
1
,
0
},
{
"IBM F1 P2 BIOS v1.0104/29/93"
,
5
,
28
,
3
,
-
1
,
0
},
{
"Future Domain Corp. V1.0008/18/93"
,
5
,
33
,
3
,
4
,
0
},
{
"Future Domain Corp. V1.0008/18/93"
,
5
,
33
,
3
,
4
,
0
},
{
"Future Domain Corp. V1.0008/18/93"
,
26
,
33
,
3
,
4
,
1
},
{
"Future Domain Corp. V1.0008/18/93"
,
26
,
33
,
3
,
4
,
1
},
/* This next signature may not be a 3.5 bios */
{
"Future Domain Corp. V2.0108/18/93"
,
5
,
33
,
3
,
5
,
0
},
{
"FUTURE DOMAIN CORP. V3.5008/18/93"
,
5
,
34
,
3
,
5
,
0
},
{
"FUTURE DOMAIN CORP. V3.5008/18/93"
,
5
,
34
,
3
,
5
,
0
},
{
"FUTURE DOMAIN 18c30/18c50/1800 (C) 1994 V3.5"
,
5
,
44
,
3
,
5
,
0
},
{
"FUTURE DOMAIN 18c30/18c50/1800 (C) 1994 V3.5"
,
5
,
44
,
3
,
5
,
0
},
{
"FUTURE DOMAIN TMC-18XX"
,
5
,
22
,
-
1
,
-
1
,
0
},
{
"FUTURE DOMAIN TMC-18XX"
,
5
,
22
,
-
1
,
-
1
,
0
},
...
@@ -558,7 +566,7 @@ int fdomain_16x0_detect( Scsi_Host_Template *tpnt )
...
@@ -558,7 +566,7 @@ int fdomain_16x0_detect( Scsi_Host_Template *tpnt )
bios_major
=
signatures
[
j
].
major_bios_version
;
bios_major
=
signatures
[
j
].
major_bios_version
;
bios_minor
=
signatures
[
j
].
minor_bios_version
;
bios_minor
=
signatures
[
j
].
minor_bios_version
;
PCI_bus
=
(
signatures
[
j
].
flag
==
1
);
PCI_bus
=
(
signatures
[
j
].
flag
==
1
);
ISA_200S
=
(
signatures
[
j
].
flag
==
2
)
;
Quantum
=
(
signatures
[
j
].
flag
>
1
)
?
signatures
[
j
].
flag
:
0
;
bios_base
=
addresses
[
i
];
bios_base
=
addresses
[
i
];
}
}
}
}
...
@@ -580,12 +588,20 @@ int fdomain_16x0_detect( Scsi_Host_Template *tpnt )
...
@@ -580,12 +588,20 @@ int fdomain_16x0_detect( Scsi_Host_Template *tpnt )
DOS (this geometry has nothing to do with physical geometry).
DOS (this geometry has nothing to do with physical geometry).
*/
*/
if
(
ISA_200S
)
{
/* The Quantum board is slightly different. */
switch
(
Quantum
)
{
case
2
:
/* ISA_200S */
case
3
:
/* ISA_250MG */
port_base
=
*
((
char
*
)
bios_base
+
0x1fa2
)
port_base
=
*
((
char
*
)
bios_base
+
0x1fa2
)
+
(
*
((
char
*
)
bios_base
+
0x1fa3
)
<<
8
);
+
(
*
((
char
*
)
bios_base
+
0x1fa3
)
<<
8
);
}
else
{
break
;
case
4
:
/* ISA_200S (another one) */
port_base
=
*
((
char
*
)
bios_base
+
0x1fa3
)
+
(
*
((
char
*
)
bios_base
+
0x1fa4
)
<<
8
);
break
;
default:
port_base
=
*
((
char
*
)
bios_base
+
0x1fcc
)
port_base
=
*
((
char
*
)
bios_base
+
0x1fcc
)
+
(
*
((
char
*
)
bios_base
+
0x1fcd
)
<<
8
);
+
(
*
((
char
*
)
bios_base
+
0x1fcd
)
<<
8
);
break
;
}
}
#if DEBUG_DETECT
#if DEBUG_DETECT
...
@@ -648,7 +664,7 @@ int fdomain_16x0_detect( Scsi_Host_Template *tpnt )
...
@@ -648,7 +664,7 @@ int fdomain_16x0_detect( Scsi_Host_Template *tpnt )
scan more addresses. If you have to modify this section for
scan more addresses. If you have to modify this section for
your installation, please send mail to faith@cs.unc.edu. */
your installation, please send mail to faith@cs.unc.edu. */
for
(
i
=
0xff
00
;
!
flag
&&
i
>
0xf
000
;
i
-=
8
)
{
for
(
i
=
0xff
f8
;
!
flag
&&
i
>
0xe
000
;
i
-=
8
)
{
port_base
=
i
;
port_base
=
i
;
if
(
check_region
(
port_base
,
0x10
))
{
if
(
check_region
(
port_base
,
0x10
))
{
#if DEBUG_DETECT
#if DEBUG_DETECT
...
@@ -1603,10 +1619,21 @@ int fdomain_16x0_biosparam( Scsi_Disk *disk, int dev, int *info_array )
...
@@ -1603,10 +1619,21 @@ int fdomain_16x0_biosparam( Scsi_Disk *disk, int dev, int *info_array )
drive
=
MINOR
(
dev
)
/
16
;
drive
=
MINOR
(
dev
)
/
16
;
if
(
bios_major
==
2
)
{
if
(
bios_major
==
2
)
{
if
(
ISA_200S
)
{
switch
(
Quantum
)
{
case
2
:
/* ISA_200S */
/* The value of 25 has never been verified.
It should probably be 15. */
i
=
(
struct
drive_info
*
)(
(
char
*
)
bios_base
+
0x1f33
+
drive
*
25
);
i
=
(
struct
drive_info
*
)(
(
char
*
)
bios_base
+
0x1f33
+
drive
*
25
);
}
else
{
break
;
case
3
:
/* ISA_250MG */
i
=
(
struct
drive_info
*
)(
(
char
*
)
bios_base
+
0x1f36
+
drive
*
15
);
break
;
case
4
:
/* ISA_200S (another one) */
i
=
(
struct
drive_info
*
)(
(
char
*
)
bios_base
+
0x1f34
+
drive
*
15
);
break
;
default:
i
=
(
struct
drive_info
*
)(
(
char
*
)
bios_base
+
0x1f31
+
drive
*
25
);
i
=
(
struct
drive_info
*
)(
(
char
*
)
bios_base
+
0x1f31
+
drive
*
25
);
break
;
}
}
info_array
[
0
]
=
i
->
heads
;
info_array
[
0
]
=
i
->
heads
;
info_array
[
1
]
=
i
->
sectors
;
info_array
[
1
]
=
i
->
sectors
;
...
...
drivers/scsi/st.c
View file @
72835ece
...
@@ -119,8 +119,8 @@ st_chk_result(Scsi_Cmnd * SCpnt)
...
@@ -119,8 +119,8 @@ st_chk_result(Scsi_Cmnd * SCpnt)
#ifdef DEBUG
#ifdef DEBUG
if
(
debugging
)
{
if
(
debugging
)
{
printk
(
"st%d: Error: %x, cmd: %x %x %x %x %x %x Len: %d
\n
"
,
dev
,
result
,
printk
(
"st%d: Error: %x, cmd: %x %x %x %x %x %x Len: %d
\n
"
,
dev
,
result
,
SCpnt
->
cmnd
[
0
],
SCpnt
->
cmnd
[
1
],
SCpnt
->
cmnd
[
2
],
SCpnt
->
data_cmnd
[
0
],
SCpnt
->
data_cmnd
[
1
],
SCpnt
->
data_
cmnd
[
2
],
SCpnt
->
cmnd
[
3
],
SCpnt
->
cmnd
[
4
],
SCpnt
->
cmnd
[
5
],
SCpnt
->
data_cmnd
[
3
],
SCpnt
->
data_cmnd
[
4
],
SCpnt
->
data_
cmnd
[
5
],
SCpnt
->
request_bufflen
);
SCpnt
->
request_bufflen
);
if
(
driver_byte
(
result
)
&
DRIVER_SENSE
)
if
(
driver_byte
(
result
)
&
DRIVER_SENSE
)
print_sense
(
"st"
,
SCpnt
);
print_sense
(
"st"
,
SCpnt
);
...
@@ -144,15 +144,15 @@ st_chk_result(Scsi_Cmnd * SCpnt)
...
@@ -144,15 +144,15 @@ st_chk_result(Scsi_Cmnd * SCpnt)
if
((
sense
[
0
]
&
0x70
)
==
0x70
&&
if
((
sense
[
0
]
&
0x70
)
==
0x70
&&
scode
==
RECOVERED_ERROR
scode
==
RECOVERED_ERROR
#ifdef ST_RECOVERED_WRITE_FATAL
#ifdef ST_RECOVERED_WRITE_FATAL
&&
SCpnt
->
cmnd
[
0
]
!=
WRITE_6
&&
SCpnt
->
data_
cmnd
[
0
]
!=
WRITE_6
&&
SCpnt
->
cmnd
[
0
]
!=
WRITE_FILEMARKS
&&
SCpnt
->
data_
cmnd
[
0
]
!=
WRITE_FILEMARKS
#endif
#endif
)
{
)
{
scsi_tapes
[
dev
].
recover_count
++
;
scsi_tapes
[
dev
].
recover_count
++
;
scsi_tapes
[
dev
].
mt_status
->
mt_erreg
+=
(
1
<<
MT_ST_SOFTERR_SHIFT
);
scsi_tapes
[
dev
].
mt_status
->
mt_erreg
+=
(
1
<<
MT_ST_SOFTERR_SHIFT
);
if
(
SCpnt
->
cmnd
[
0
]
==
READ_6
)
if
(
SCpnt
->
data_
cmnd
[
0
]
==
READ_6
)
stp
=
"read"
;
stp
=
"read"
;
else
if
(
SCpnt
->
cmnd
[
0
]
==
WRITE_6
)
else
if
(
SCpnt
->
data_
cmnd
[
0
]
==
WRITE_6
)
stp
=
"write"
;
stp
=
"write"
;
else
else
stp
=
"ioctl"
;
stp
=
"ioctl"
;
...
@@ -640,6 +640,12 @@ scsi_tape_open(struct inode * inode, struct file * filp)
...
@@ -640,6 +640,12 @@ scsi_tape_open(struct inode * inode, struct file * filp)
if
(
debugging
)
if
(
debugging
)
printk
(
"st%d: Write protected
\n
"
,
dev
);
printk
(
"st%d: Write protected
\n
"
,
dev
);
#endif
#endif
if
((
flags
&
O_ACCMODE
)
==
O_WRONLY
||
(
flags
&
O_ACCMODE
)
==
O_RDWR
)
{
(
STp
->
buffer
)
->
in_use
=
0
;
STp
->
buffer
=
0
;
STp
->
in_use
=
0
;
return
(
-
EROFS
);
}
}
}
if
(
scsi_tapes
[
dev
].
device
->
host
->
hostt
->
usage_count
)
if
(
scsi_tapes
[
dev
].
device
->
host
->
hostt
->
usage_count
)
...
...
fs/binfmt_elf.c
View file @
72835ece
...
@@ -208,10 +208,13 @@ static unsigned int load_elf_interp(struct elfhdr * interp_elf_ex,
...
@@ -208,10 +208,13 @@ static unsigned int load_elf_interp(struct elfhdr * interp_elf_ex,
eppnt
=
elf_phdata
;
eppnt
=
elf_phdata
;
for
(
i
=
0
;
i
<
interp_elf_ex
->
e_phnum
;
i
++
,
eppnt
++
)
for
(
i
=
0
;
i
<
interp_elf_ex
->
e_phnum
;
i
++
,
eppnt
++
)
if
(
eppnt
->
p_type
==
PT_LOAD
)
{
if
(
eppnt
->
p_type
==
PT_LOAD
)
{
int
elf_prot
=
(
eppnt
->
p_flags
&
PF_R
)
?
PROT_READ
:
0
;
if
(
eppnt
->
p_flags
&
PF_W
)
elf_prot
|=
PROT_WRITE
;
if
(
eppnt
->
p_flags
&
PF_X
)
elf_prot
|=
PROT_EXEC
;
error
=
do_mmap
(
file
,
error
=
do_mmap
(
file
,
eppnt
->
p_vaddr
&
0xfffff000
,
eppnt
->
p_vaddr
&
0xfffff000
,
eppnt
->
p_filesz
+
(
eppnt
->
p_vaddr
&
0xfff
),
eppnt
->
p_filesz
+
(
eppnt
->
p_vaddr
&
0xfff
),
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
elf_prot
,
MAP_PRIVATE
|
MAP_DENYWRITE
|
(
interp_elf_ex
->
e_type
==
ET_EXEC
?
MAP_FIXED
:
0
),
MAP_PRIVATE
|
MAP_DENYWRITE
|
(
interp_elf_ex
->
e_type
==
ET_EXEC
?
MAP_FIXED
:
0
),
eppnt
->
p_offset
&
0xfffff000
);
eppnt
->
p_offset
&
0xfffff000
);
...
@@ -530,10 +533,13 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
...
@@ -530,10 +533,13 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
if
(
elf_ppnt
->
p_type
==
PT_LOAD
)
{
if
(
elf_ppnt
->
p_type
==
PT_LOAD
)
{
int
elf_prot
=
(
elf_ppnt
->
p_flags
&
PF_R
)
?
PROT_READ
:
0
;
if
(
elf_ppnt
->
p_flags
&
PF_W
)
elf_prot
|=
PROT_WRITE
;
if
(
elf_ppnt
->
p_flags
&
PF_X
)
elf_prot
|=
PROT_EXEC
;
error
=
do_mmap
(
file
,
error
=
do_mmap
(
file
,
elf_ppnt
->
p_vaddr
&
0xfffff000
,
elf_ppnt
->
p_vaddr
&
0xfffff000
,
elf_ppnt
->
p_filesz
+
(
elf_ppnt
->
p_vaddr
&
0xfff
),
elf_ppnt
->
p_filesz
+
(
elf_ppnt
->
p_vaddr
&
0xfff
),
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
elf_prot
,
MAP_FIXED
|
MAP_PRIVATE
|
MAP_DENYWRITE
|
MAP_EXECUTABLE
,
MAP_FIXED
|
MAP_PRIVATE
|
MAP_DENYWRITE
|
MAP_EXECUTABLE
,
elf_ppnt
->
p_offset
&
0xfffff000
);
elf_ppnt
->
p_offset
&
0xfffff000
);
...
@@ -615,12 +621,15 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
...
@@ -615,12 +621,15 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
printk("(brk) %x\n" , current->mm->brk);
printk("(brk) %x\n" , current->mm->brk);
#endif
#endif
/* Why this, you ask??? Well SVr4 maps page 0 as read-only,
if
(
current
->
personality
==
PER_SVR4
)
and some applications "depend" upon this behavior.
{
Since we do not have the power to recompile these, we
/* Why this, you ask??? Well SVr4 maps page 0 as read-only,
emulate the SVr4 behavior. Sigh. */
and some applications "depend" upon this behavior.
error
=
do_mmap
(
NULL
,
0
,
4096
,
PROT_READ
|
PROT_EXEC
,
Since we do not have the power to recompile these, we
MAP_FIXED
|
MAP_PRIVATE
,
0
);
emulate the SVr4 behavior. Sigh. */
error
=
do_mmap
(
NULL
,
0
,
4096
,
PROT_READ
|
PROT_EXEC
,
MAP_FIXED
|
MAP_PRIVATE
,
0
);
}
start_thread
(
regs
,
elf_entry
,
bprm
->
p
);
start_thread
(
regs
,
elf_entry
,
bprm
->
p
);
if
(
current
->
flags
&
PF_PTRACED
)
if
(
current
->
flags
&
PF_PTRACED
)
...
...
include/linux/elf.h
View file @
72835ece
...
@@ -148,6 +148,12 @@ typedef struct elfhdr{
...
@@ -148,6 +148,12 @@ typedef struct elfhdr{
Elf32_Half
e_shstrndx
;
Elf32_Half
e_shstrndx
;
}
Elf32_Ehdr
;
}
Elf32_Ehdr
;
/* These constants define the permissions on sections in the program
header, p_flags. */
#define PF_R 0x4
#define PF_W 0x2
#define PF_X 0x1
typedef
struct
elf_phdr
{
typedef
struct
elf_phdr
{
Elf32_Word
p_type
;
Elf32_Word
p_type
;
Elf32_Off
p_offset
;
Elf32_Off
p_offset
;
...
@@ -235,6 +241,19 @@ typedef struct {
...
@@ -235,6 +241,19 @@ typedef struct {
#define EV_CURRENT 1
#define EV_CURRENT 1
#define EV_NUM 2
#define EV_NUM 2
/* Notes used in ET_CORE */
#define NT_PRSTATUS 1
#define NT_PRFPREG 2
#define NT_PRPSINFO 3
#define NT_TASKSTRUCT 4
/* Note header in a PT_NOTE section */
typedef
struct
elf_note
{
Elf32_Word
n_namesz
;
/* Name size */
Elf32_Word
n_descsz
;
/* Content size */
Elf32_Word
n_type
;
/* Content type */
}
Elf32_Nhdr
;
#define ELF_START_MMAP 0x80000000
#define ELF_START_MMAP 0x80000000
#endif
/* _LINUX_ELF_H */
#endif
/* _LINUX_ELF_H */
include/linux/sbpcd.h
View file @
72835ece
...
@@ -70,21 +70,25 @@
...
@@ -70,21 +70,25 @@
#if !(SBPCD_ISSUE-1)
/* first (or if you have only one) interface board: */
#if !(SBPCD_ISSUE-1)
/* first (or if you have only one) interface board: */
#define CDROM_PORT 0x340
/* <-----------<< port address */
#define CDROM_PORT 0x340
/* <-----------<< port address */
#define SBPRO 0
/* <-----------<< interface type */
#define SBPRO 0
/* <-----------<< interface type */
#define MAX_DRIVES 4
/* set to 1 if the card does not use "drive select" */
#define SOUND_BASE 0x220
/* <-----------<< sound address of this card or 0 */
#define SOUND_BASE 0x220
/* <-----------<< sound address of this card or 0 */
#endif
#endif
#if !(SBPCD_ISSUE-2)
/* ==================== second interface board: === */
#if !(SBPCD_ISSUE-2)
/* ==================== second interface board: === */
#define CDROM_PORT 0x344
/* <-----------<< port address */
#define CDROM_PORT 0x344
/* <-----------<< port address */
#define SBPRO 0
/* <-----------<< interface type */
#define SBPRO 0
/* <-----------<< interface type */
#define MAX_DRIVES 4
/* set to 1 if the card does not use "drive select" */
#define SOUND_BASE 0x000
/* <-----------<< sound address of this card or 0 */
#define SOUND_BASE 0x000
/* <-----------<< sound address of this card or 0 */
#endif
#endif
#if !(SBPCD_ISSUE-3)
/* ===================== third interface board: === */
#if !(SBPCD_ISSUE-3)
/* ===================== third interface board: === */
#define CDROM_PORT 0x634
/* <-----------<< port address */
#define CDROM_PORT 0x634
/* <-----------<< port address */
#define SBPRO 1
/* <-----------<< interface type */
#define SBPRO 1
/* <-----------<< interface type */
#define MAX_DRIVES 4
/* set to 1 if the card does not use "drive select" */
#define SOUND_BASE 0x240
/* <-----------<< sound address of this card or 0 */
#define SOUND_BASE 0x240
/* <-----------<< sound address of this card or 0 */
#endif
#endif
#if !(SBPCD_ISSUE-4)
/* ==================== fourth interface board: === */
#if !(SBPCD_ISSUE-4)
/* ==================== fourth interface board: === */
#define CDROM_PORT 0x634
/* <-----------<< port address */
#define CDROM_PORT 0x634
/* <-----------<< port address */
#define SBPRO 0
/* <-----------<< interface type */
#define SBPRO 0
/* <-----------<< interface type */
#define MAX_DRIVES 4
/* set to 1 if the card does not use "drive select" */
#define SOUND_BASE 0x000
/* <-----------<< sound address of this card or 0 */
#define SOUND_BASE 0x000
/* <-----------<< sound address of this card or 0 */
#endif
#endif
...
@@ -606,10 +610,11 @@ Read XA Parameter:
...
@@ -606,10 +610,11 @@ Read XA Parameter:
#define CMD1_SUBCHANINF 0x11
#define CMD1_SUBCHANINF 0x11
#define CMD2_SUBCHANINF 0x??
#define CMD2_SUBCHANINF 0x??
#define CMD1_ABORT 0x08
#define CMD2_ABORT 0x08
#define CMDT_ABORT 0x08
#define CMD2_x02 0x02
#define CMD2_x02 0x02
#define CMD1_x08 0x08
#define CMD2_x08 0x08
#define CMDT_x08 0x08
#define CMD2_SETSPEED 0xda
#define CMD2_SETSPEED 0xda
...
@@ -668,6 +673,7 @@ Read XA Parameter:
...
@@ -668,6 +673,7 @@ Read XA Parameter:
#define CMDL_PLAY_MSF 0x???
#define CMDL_PLAY_MSF 0x???
#define CMD0_PLAY_TI 0x0c
#define CMD0_PLAY_TI 0x0c
#define CMD1_PLAY_TI 0x0f
#define CMD0_STATUS 0x81
#define CMD0_STATUS 0x81
#define CMD1_STATUS 0x05
#define CMD1_STATUS 0x05
...
...
include/linux/tcp.h
View file @
72835ece
...
@@ -37,15 +37,15 @@ struct tcphdr {
...
@@ -37,15 +37,15 @@ struct tcphdr {
urg:
1
,
urg:
1
,
res2:
2
;
res2:
2
;
#elif defined(BIG_ENDIAN_BITFIELD)
#elif defined(BIG_ENDIAN_BITFIELD)
__u16
res2
:
2
,
__u16
doff
:
4
,
res1:
4
,
res2:
2
,
urg:
1
,
urg:
1
,
ack:
1
,
ack:
1
,
psh:
1
,
psh:
1
,
rst:
1
,
rst:
1
,
syn:
1
,
syn:
1
,
fin:
1
,
fin:
1
;
doff:
4
,
res1:
4
;
#else
#else
#error "Adjust your <asm/byteorder.h> defines"
#error "Adjust your <asm/byteorder.h> defines"
#endif
#endif
...
...
net/inet/af_inet.c
View file @
72835ece
...
@@ -941,9 +941,12 @@ static int inet_connect(struct socket *sock, struct sockaddr * uaddr,
...
@@ -941,9 +941,12 @@ static int inet_connect(struct socket *sock, struct sockaddr * uaddr,
if
(
sock
->
state
==
SS_CONNECTING
&&
sk
->
protocol
==
IPPROTO_TCP
&&
(
flags
&
O_NONBLOCK
))
{
if
(
sock
->
state
==
SS_CONNECTING
&&
sk
->
protocol
==
IPPROTO_TCP
&&
(
flags
&
O_NONBLOCK
))
{
if
(
sk
->
err
!=
0
)
if
(
sk
->
err
!=
0
)
return
-
sk
->
err
;
/* Connection must have failed */
{
else
err
=
sk
->
err
;
return
-
EALREADY
;
/* Connecting is currently in progress */
sk
->
err
=
0
;
return
-
err
;
}
return
-
EALREADY
;
/* Connecting is currently in progress */
}
}
if
(
sock
->
state
!=
SS_CONNECTING
)
if
(
sock
->
state
!=
SS_CONNECTING
)
...
...
net/inet/ip_fw.c
View file @
72835ece
...
@@ -961,7 +961,7 @@ static int ip_chain_procinfo(int stage, char *buffer, char **start,
...
@@ -961,7 +961,7 @@ static int ip_chain_procinfo(int stage, char *buffer, char **start,
ntohl
(
i
->
fw_src
.
s_addr
),
ntohl
(
i
->
fw_smsk
.
s_addr
),
ntohl
(
i
->
fw_src
.
s_addr
),
ntohl
(
i
->
fw_smsk
.
s_addr
),
ntohl
(
i
->
fw_dst
.
s_addr
),
ntohl
(
i
->
fw_dmsk
.
s_addr
),
ntohl
(
i
->
fw_dst
.
s_addr
),
ntohl
(
i
->
fw_dmsk
.
s_addr
),
ntohl
(
i
->
fw_via
.
s_addr
),
i
->
fw_flg
);
ntohl
(
i
->
fw_via
.
s_addr
),
i
->
fw_flg
);
len
+=
sprintf
(
buffer
+
len
,
"%u %u %
lu %
lu"
,
len
+=
sprintf
(
buffer
+
len
,
"%u %u %
10lu %10
lu"
,
i
->
fw_nsp
,
i
->
fw_ndp
,
i
->
fw_pcnt
,
i
->
fw_bcnt
);
i
->
fw_nsp
,
i
->
fw_ndp
,
i
->
fw_pcnt
,
i
->
fw_bcnt
);
for
(
p
=
0
;
p
<
IP_FW_MAX_PORTS
;
p
++
)
for
(
p
=
0
;
p
<
IP_FW_MAX_PORTS
;
p
++
)
len
+=
sprintf
(
buffer
+
len
,
" %u"
,
i
->
fw_pts
[
p
]);
len
+=
sprintf
(
buffer
+
len
,
" %u"
,
i
->
fw_pts
[
p
]);
...
...
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