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
41c8a0e4
Commit
41c8a0e4
authored
Oct 27, 2002
by
James Bottomley
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
fce4e14a
cbfec645
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
7 deletions
+15
-7
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_lib.c
+7
-1
drivers/scsi/sd.c
drivers/scsi/sd.c
+3
-1
drivers/scsi/sr.c
drivers/scsi/sr.c
+3
-1
drivers/scsi/sr_ioctl.c
drivers/scsi/sr_ioctl.c
+2
-4
No files found.
drivers/scsi/scsi_lib.c
View file @
41c8a0e4
...
...
@@ -514,6 +514,12 @@ void scsi_io_completion(Scsi_Cmnd * SCpnt, int good_sectors,
}
}
if
(
blk_pc_request
(
req
))
{
req
->
errors
=
result
&
0xff
;
if
(
!
result
)
req
->
data_len
-=
SCpnt
->
bufflen
;
}
/*
* Zero these out. They now point to freed memory, and it is
* dangerous to hang onto the pointers.
...
...
@@ -527,7 +533,7 @@ void scsi_io_completion(Scsi_Cmnd * SCpnt, int good_sectors,
* Next deal with any sectors which we were able to correctly
* handle.
*/
if
(
good_sectors
>
0
)
{
if
(
good_sectors
>
=
0
)
{
SCSI_LOG_HLCOMPLETE
(
1
,
printk
(
"%ld sectors total, %d sectors done.
\n
"
,
req
->
nr_sectors
,
good_sectors
));
SCSI_LOG_HLCOMPLETE
(
1
,
printk
(
"use_sg is %d
\n
"
,
SCpnt
->
use_sg
));
...
...
drivers/scsi/sd.c
View file @
41c8a0e4
...
...
@@ -299,6 +299,8 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
if
(
rq
->
timeout
)
timeout
=
rq
->
timeout
;
SCpnt
->
transfersize
=
rq
->
data_len
;
SCpnt
->
underflow
=
rq
->
data_len
;
goto
queue
;
}
...
...
@@ -422,10 +424,10 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
* host adapter, it's safe to assume that we can at least transfer
* this many bytes between each connect / disconnect.
*/
queue:
SCpnt
->
transfersize
=
sdp
->
sector_size
;
SCpnt
->
underflow
=
this_count
<<
9
;
queue:
SCpnt
->
allowed
=
SD_MAX_RETRIES
;
SCpnt
->
timeout_per_command
=
timeout
;
...
...
drivers/scsi/sr.c
View file @
41c8a0e4
...
...
@@ -284,6 +284,8 @@ static int sr_init_command(struct scsi_cmnd * SCpnt)
if
(
rq
->
timeout
)
timeout
=
rq
->
timeout
;
SCpnt
->
transfersize
=
rq
->
data_len
;
SCpnt
->
underflow
=
rq
->
data_len
;
goto
queue
;
}
...
...
@@ -359,10 +361,10 @@ static int sr_init_command(struct scsi_cmnd * SCpnt)
* host adapter, it's safe to assume that we can at least transfer
* this many bytes between each connect / disconnect.
*/
queue:
SCpnt
->
transfersize
=
cd
->
device
->
sector_size
;
SCpnt
->
underflow
=
this_count
<<
9
;
queue:
SCpnt
->
allowed
=
MAX_RETRIES
;
SCpnt
->
timeout_per_command
=
timeout
;
...
...
drivers/scsi/sr_ioctl.c
View file @
41c8a0e4
...
...
@@ -159,13 +159,11 @@ int sr_do_ioctl(Scsi_CD *cd, struct cdrom_generic_command *cgc)
if
(
!
cgc
->
quiet
)
printk
(
KERN_ERR
"%s: CDROM (ioctl) reports ILLEGAL "
"REQUEST.
\n
"
,
cd
->
cdi
.
name
);
err
=
-
EIO
;
if
(
SRpnt
->
sr_sense_buffer
[
12
]
==
0x20
&&
SRpnt
->
sr_sense_buffer
[
13
]
==
0x00
)
{
SRpnt
->
sr_sense_buffer
[
13
]
==
0x00
)
/* sense: Invalid command operation code */
err
=
-
EDRIVE_CANT_DO_THIS
;
}
else
{
err
=
-
EINVAL
;
}
#ifdef DEBUG
print_command
(
cgc
->
cmd
);
print_req_sense
(
"sr"
,
SRpnt
);
...
...
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