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
4175a2c1
Commit
4175a2c1
authored
Jun 17, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
839cc0e6
dbba62f3
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
95 additions
and
143 deletions
+95
-143
drivers/message/fusion/lsi/mpi_type.h
drivers/message/fusion/lsi/mpi_type.h
+6
-11
drivers/message/fusion/mptctl.c
drivers/message/fusion/mptctl.c
+66
-75
drivers/message/fusion/mptctl.h
drivers/message/fusion/mptctl.h
+5
-5
drivers/scsi/fd_mcs.c
drivers/scsi/fd_mcs.c
+7
-14
drivers/scsi/fdomain.c
drivers/scsi/fdomain.c
+7
-16
drivers/scsi/pcmcia/nsp_cs.c
drivers/scsi/pcmcia/nsp_cs.c
+4
-4
drivers/scsi/scsi_ioctl.c
drivers/scsi/scsi_ioctl.c
+0
-16
drivers/scsi/scsi_syms.c
drivers/scsi/scsi_syms.c
+0
-1
include/scsi/scsi_ioctl.h
include/scsi/scsi_ioctl.h
+0
-1
No files found.
drivers/message/fusion/lsi/mpi_type.h
View file @
4175a2c1
...
...
@@ -47,18 +47,13 @@ typedef signed short S16;
typedef
unsigned
short
U16
;
#if defined(unix) || defined(__arm) || defined(ALPHA)
typedef
signed
int
S32
;
typedef
unsigned
int
U32
;
#else
typedef
signed
long
S32
;
typedef
unsigned
long
U32
;
#endif
typedef
int32_t
S32
;
typedef
u_int32_t
U32
;
/*
* The only way crap below could work on big-endian boxen would be if it
* wasn't used at all.
*/
typedef
struct
_S64
{
...
...
drivers/message/fusion/mptctl.c
View file @
4175a2c1
This diff is collapsed.
Click to expand it.
drivers/message/fusion/mptctl.h
View file @
4175a2c1
...
...
@@ -115,7 +115,7 @@
struct
mpt_fw_xfer
{
unsigned
int
iocnum
;
/* IOC unit number */
unsigned
int
fwlen
;
void
*
bufp
;
/* Pointer to firmware buffer */
void
__user
*
bufp
;
/* Pointer to firmware buffer */
};
#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
...
...
@@ -332,10 +332,10 @@ typedef struct mpt_ioctl_replace_fw {
struct
mpt_ioctl_command
{
mpt_ioctl_header
hdr
;
int
timeout
;
/* optional (seconds) */
char
*
replyFrameBufPtr
;
char
*
dataInBufPtr
;
char
*
dataOutBufPtr
;
char
*
senseDataPtr
;
char
__user
*
replyFrameBufPtr
;
char
__user
*
dataInBufPtr
;
char
__user
*
dataOutBufPtr
;
char
__user
*
senseDataPtr
;
int
maxReplyBytes
;
int
dataInSize
;
int
dataOutSize
;
...
...
drivers/scsi/fd_mcs.c
View file @
4175a2c1
...
...
@@ -87,6 +87,7 @@
#include <linux/delay.h>
#include <linux/mca.h>
#include <linux/spinlock.h>
#include <scsi/scsicam.h>
#include <linux/mca-legacy.h>
#include <asm/io.h>
...
...
@@ -1337,23 +1338,14 @@ static int fd_mcs_bus_reset(Scsi_Cmnd * SCpnt) {
static
int
fd_mcs_biosparam
(
struct
scsi_device
*
disk
,
struct
block_device
*
bdev
,
sector_t
capacity
,
int
*
info_array
)
{
unsigned
char
buf
[
512
+
sizeof
(
int
)
*
2
]
;
unsigned
char
*
p
=
scsi_bios_ptable
(
bdev
)
;
int
size
=
capacity
;
int
*
sizes
=
(
int
*
)
buf
;
unsigned
char
*
data
=
(
unsigned
char
*
)
(
sizes
+
2
);
unsigned
char
do_read
[]
=
{
READ_6
,
0
,
0
,
0
,
1
,
0
};
int
retcode
;
/* BIOS >= 3.4 for MCA cards */
/* This algorithm was provided by Future Domain (much thanks!). */
sizes
[
0
]
=
0
;
/* zero bytes out */
sizes
[
1
]
=
512
;
/* one sector in */
memcpy
(
data
,
do_read
,
sizeof
(
do_read
));
retcode
=
kernel_scsi_ioctl
(
disk
,
SCSI_IOCTL_SEND_COMMAND
,
(
void
*
)
buf
);
if
(
!
retcode
/* SCSI command ok */
&&
data
[
511
]
==
0xaa
&&
data
[
510
]
==
0x55
/* Partition table valid */
&&
data
[
0x1c2
])
{
/* Partition type */
if
(
p
&&
p
[
65
]
==
0xaa
&&
p
[
64
]
==
0x55
/* Partition table valid */
&&
p
[
4
])
{
/* Partition type */
/* The partition table layout is as follows:
Start: 0x1b3h
...
...
@@ -1383,8 +1375,8 @@ static int fd_mcs_biosparam(struct scsi_device * disk, struct block_device *bdev
Future Domain algorithm, but it seemed to be a reasonable thing
to do, especially in the Linux and BSD worlds. */
info_array
[
0
]
=
data
[
0x1c3
]
+
1
;
/* heads */
info_array
[
1
]
=
data
[
0x1c4
]
&
0x3f
;
/* sectors */
info_array
[
0
]
=
p
[
5
]
+
1
;
/* heads */
info_array
[
1
]
=
p
[
6
]
&
0x3f
;
/* sectors */
}
else
{
/* Note that this new method guarantees that there will always be
less than 1024 cylinders on a platter. This is good for drives
...
...
@@ -1403,6 +1395,7 @@ static int fd_mcs_biosparam(struct scsi_device * disk, struct block_device *bdev
}
/* For both methods, compute the cylinders */
info_array
[
2
]
=
(
unsigned
int
)
size
/
(
info_array
[
0
]
*
info_array
[
1
]);
kfree
(
p
);
return
0
;
}
...
...
drivers/scsi/fdomain.c
View file @
4175a2c1
...
...
@@ -279,6 +279,7 @@
#include <linux/pci.h>
#include <linux/stat.h>
#include <linux/delay.h>
#include <scsi/scsicam.h>
#include <asm/io.h>
#include <asm/system.h>
...
...
@@ -1564,12 +1565,7 @@ static int fdomain_16x0_biosparam(struct scsi_device *sdev,
sector_t
capacity
,
int
*
info_array
)
{
int
drive
;
unsigned
char
buf
[
512
+
sizeof
(
Scsi_Ioctl_Command
)];
Scsi_Ioctl_Command
*
sic
=
(
Scsi_Ioctl_Command
*
)
buf
;
int
size
=
capacity
;
unsigned
char
*
data
=
sic
->
data
;
unsigned
char
do_read
[]
=
{
READ_6
,
0
,
0
,
0
,
1
,
0
};
int
retcode
;
unsigned
long
offset
;
struct
drive_info
{
unsigned
short
cylinders
;
...
...
@@ -1657,16 +1653,10 @@ static int fdomain_16x0_biosparam(struct scsi_device *sdev,
info_array
[
2
]
=
i
.
cylinders
;
}
else
{
/* 3.4 BIOS (and up?) */
/* This algorithm was provided by Future Domain (much thanks!). */
unsigned
char
*
p
=
scsi_bios_ptable
(
bdev
);
sic
->
inlen
=
0
;
/* zero bytes out */
sic
->
outlen
=
512
;
/* one sector in */
memcpy
(
data
,
do_read
,
sizeof
(
do_read
)
);
retcode
=
kernel_scsi_ioctl
(
sdev
,
SCSI_IOCTL_SEND_COMMAND
,
sic
);
if
(
!
retcode
/* SCSI command ok */
&&
data
[
511
]
==
0xaa
&&
data
[
510
]
==
0x55
/* Partition table valid */
&&
data
[
0x1c2
])
{
/* Partition type */
if
(
p
&&
p
[
65
]
==
0xaa
&&
p
[
64
]
==
0x55
/* Partition table valid */
&&
p
[
4
])
{
/* Partition type */
/* The partition table layout is as follows:
...
...
@@ -1697,8 +1687,8 @@ static int fdomain_16x0_biosparam(struct scsi_device *sdev,
Future Domain algorithm, but it seemed to be a reasonable thing
to do, especially in the Linux and BSD worlds. */
info_array
[
0
]
=
data
[
0x1c3
]
+
1
;
/* heads */
info_array
[
1
]
=
data
[
0x1c4
]
&
0x3f
;
/* sectors */
info_array
[
0
]
=
p
[
5
]
+
1
;
/* heads */
info_array
[
1
]
=
p
[
6
]
&
0x3f
;
/* sectors */
}
else
{
/* Note that this new method guarantees that there will always be
...
...
@@ -1718,6 +1708,7 @@ static int fdomain_16x0_biosparam(struct scsi_device *sdev,
}
/* For both methods, compute the cylinders */
info_array
[
2
]
=
(
unsigned
int
)
size
/
(
info_array
[
0
]
*
info_array
[
1
]
);
kfree
(
p
);
}
return
0
;
...
...
drivers/scsi/pcmcia/nsp_cs.c
View file @
4175a2c1
...
...
@@ -1936,10 +1936,10 @@ static void nsp_cs_config(dev_link_t *link)
nsp_dbg
(
NSP_DEBUG_INIT
,
"host=0x%p"
,
host
);
for
(
dev
=
host
->
host_queue
;
dev
!=
NULL
;
dev
=
dev
->
next
)
{
unsigned
long
arg
[
2
],
id
;
kernel_scsi_ioctl
(
dev
,
SCSI_IOCTL_GET_IDLUN
,
arg
);
id
=
(
arg
[
0
]
&
0x0f
)
+
((
arg
[
0
]
>>
4
)
&
0xf0
)
+
((
arg
[
0
]
>>
8
)
&
0xf00
)
+
((
arg
[
0
]
>>
12
)
&
0xf000
);
unsigned
long
id
;
id
=
(
dev
->
id
&
0x0f
)
+
((
dev
->
lun
&
0x0f
)
<<
4
)
+
((
dev
->
channel
&
0x0f
)
<<
8
)
+
((
dev
->
host
->
host_no
&
0x0f
)
<<
12
);
node
=
&
info
->
node
[
info
->
ndev
];
node
->
minor
=
0
;
switch
(
dev
->
type
)
{
...
...
drivers/scsi/scsi_ioctl.c
View file @
4175a2c1
...
...
@@ -447,19 +447,3 @@ int scsi_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
}
return
-
EINVAL
;
}
/*
* Just like scsi_ioctl, only callable from kernel space with no
* fs segment fiddling.
*/
int
kernel_scsi_ioctl
(
struct
scsi_device
*
sdev
,
int
cmd
,
void
*
arg
)
{
mm_segment_t
oldfs
;
int
tmp
;
oldfs
=
get_fs
();
set_fs
(
get_ds
());
tmp
=
scsi_ioctl
(
sdev
,
cmd
,
arg
);
set_fs
(
oldfs
);
return
tmp
;
}
drivers/scsi/scsi_syms.c
View file @
4175a2c1
...
...
@@ -54,7 +54,6 @@ EXPORT_SYMBOL(scsi_print_msg);
EXPORT_SYMBOL
(
scsi_print_status
);
EXPORT_SYMBOL
(
scsi_sense_key_string
);
EXPORT_SYMBOL
(
scsi_extd_sense_format
);
EXPORT_SYMBOL
(
kernel_scsi_ioctl
);
EXPORT_SYMBOL
(
scsi_block_when_processing_errors
);
EXPORT_SYMBOL
(
scsi_ioctl_send_command
);
EXPORT_SYMBOL
(
scsi_set_medium_removal
);
...
...
include/scsi/scsi_ioctl.h
View file @
4175a2c1
...
...
@@ -41,7 +41,6 @@ typedef struct scsi_fctargaddress {
}
Scsi_FCTargAddress
;
extern
int
scsi_ioctl
(
struct
scsi_device
*
,
int
,
void
__user
*
);
extern
int
kernel_scsi_ioctl
(
struct
scsi_device
*
,
int
,
void
*
);
extern
int
scsi_ioctl_send_command
(
struct
scsi_device
*
,
struct
scsi_ioctl_command
__user
*
);
...
...
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