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