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
3aab50ad
Commit
3aab50ad
authored
May 30, 2003
by
James Bottomley
Browse files
Options
Browse Files
Download
Plain Diff
Merge raven.il.steeleye.com:/home/jejb/BK/scsi-sg-2.5
into raven.il.steeleye.com:/home/jejb/BK/scsi-misc-2.5
parents
28e10eb7
54156ef1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
drivers/scsi/sg.c
drivers/scsi/sg.c
+12
-12
include/scsi/sg.h
include/scsi/sg.h
+10
-3
No files found.
drivers/scsi/sg.c
View file @
3aab50ad
...
@@ -18,8 +18,8 @@
...
@@ -18,8 +18,8 @@
*
*
*/
*/
#include <linux/config.h>
#include <linux/config.h>
static
char
*
sg_version_str
=
"3.5.2
8 [20030308
]"
;
static
char
*
sg_version_str
=
"3.5.2
9 [20030529
]"
;
static
int
sg_version_num
=
3052
8
;
/* 2 digits for each component */
static
int
sg_version_num
=
3052
9
;
/* 2 digits for each component */
/*
/*
* D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au), notes:
* D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au), notes:
* - scsi logging is available via SCSI_LOG_TIMEOUT macros. First
* - scsi logging is available via SCSI_LOG_TIMEOUT macros. First
...
@@ -1884,11 +1884,8 @@ sg_write_xfer(Sg_request * srp)
...
@@ -1884,11 +1884,8 @@ sg_write_xfer(Sg_request * srp)
if
(
res
)
if
(
res
)
return
res
;
return
res
;
for
(;
k
<
schp
->
k_use_sg
;
++
k
,
++
sclp
)
{
for
(;
p
;
++
sclp
,
ksglen
=
(
int
)
sclp
->
length
,
ksglen
=
(
int
)
sclp
->
length
;
p
=
sg_scatg2virt
(
sclp
))
{
p
=
sg_scatg2virt
(
sclp
);
if
(
NULL
==
p
)
break
;
if
(
usglen
<=
0
)
if
(
usglen
<=
0
)
break
;
break
;
if
(
ksglen
>
usglen
)
{
if
(
ksglen
>
usglen
)
{
...
@@ -1915,6 +1912,9 @@ sg_write_xfer(Sg_request * srp)
...
@@ -1915,6 +1912,9 @@ sg_write_xfer(Sg_request * srp)
up
+=
ksglen
;
up
+=
ksglen
;
usglen
-=
ksglen
;
usglen
-=
ksglen
;
}
}
++
k
;
if
(
k
>=
schp
->
k_use_sg
)
return
0
;
}
}
}
}
}
}
...
@@ -2041,11 +2041,8 @@ sg_read_xfer(Sg_request * srp)
...
@@ -2041,11 +2041,8 @@ sg_read_xfer(Sg_request * srp)
if
(
res
)
if
(
res
)
return
res
;
return
res
;
for
(;
k
<
schp
->
k_use_sg
;
++
k
,
++
sclp
)
{
for
(;
p
;
++
sclp
,
ksglen
=
(
int
)
sclp
->
length
,
ksglen
=
(
int
)
sclp
->
length
;
p
=
sg_scatg2virt
(
sclp
))
{
p
=
sg_scatg2virt
(
sclp
);
if
(
NULL
==
p
)
break
;
if
(
usglen
<=
0
)
if
(
usglen
<=
0
)
break
;
break
;
if
(
ksglen
>
usglen
)
{
if
(
ksglen
>
usglen
)
{
...
@@ -2072,6 +2069,9 @@ sg_read_xfer(Sg_request * srp)
...
@@ -2072,6 +2069,9 @@ sg_read_xfer(Sg_request * srp)
up
+=
ksglen
;
up
+=
ksglen
;
usglen
-=
ksglen
;
usglen
-=
ksglen
;
}
}
++
k
;
if
(
k
>=
schp
->
k_use_sg
)
return
0
;
}
}
}
}
}
}
...
...
include/scsi/sg.h
View file @
3aab50ad
...
@@ -9,11 +9,18 @@
...
@@ -9,11 +9,18 @@
Original driver (sg.h):
Original driver (sg.h):
* Copyright (C) 1992 Lawrence Foard
* Copyright (C) 1992 Lawrence Foard
Version 2 and 3 extensions to driver:
Version 2 and 3 extensions to driver:
* Copyright (C) 1998 - 200
2
Douglas Gilbert
* Copyright (C) 1998 - 200
3
Douglas Gilbert
Version: 3.5.2
7 (20020812
)
Version: 3.5.2
9 (20030529
)
This version is for 2.5 series kernels.
This version is for 2.5 series kernels.
Changes since 3.5.28 (20030308)
- fix bug introduced in version 3.1.24 (last segment of sgat list)
Changes since 3.5.27 (20020812)
- remove procfs entries: hosts, host_hdr + host_strs (now in sysfs)
- add sysfs sg driver params: def_reserved_size, allow_dio, version
- new boot option: "sg_allow_dio" and module parameter: "allow_dio"
- multiple internal changes due to scsi subsystem rework
Changes since 3.5.26 (20020708)
Changes since 3.5.26 (20020708)
- re-add direct IO using Kai Makisara's work
- re-add direct IO using Kai Makisara's work
- re-tab to 8, start using C99-isms
- re-tab to 8, start using C99-isms
...
@@ -237,7 +244,7 @@ typedef struct sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */
...
@@ -237,7 +244,7 @@ typedef struct sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */
read/written by a single scsi command. The user can find the value of
read/written by a single scsi command. The user can find the value of
PAGE_SIZE by calling getpagesize() defined in unistd.h . */
PAGE_SIZE by calling getpagesize() defined in unistd.h . */
#define SG_DEFAULT_RETRIES
1
#define SG_DEFAULT_RETRIES
0
/* Defaults, commented if they differ from original sg driver */
/* Defaults, commented if they differ from original sg driver */
#define SG_DEF_FORCE_LOW_DMA 0
/* was 1 -> memory below 16MB on i386 */
#define SG_DEF_FORCE_LOW_DMA 0
/* was 1 -> memory below 16MB on i386 */
...
...
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