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
6f3e71c0
Commit
6f3e71c0
authored
Jan 27, 2017
by
James Bottomley
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'mkp-scsi/4.10/scsi-fixes' into fixes
parents
9208b75e
773c7220
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
drivers/scsi/virtio_scsi.c
drivers/scsi/virtio_scsi.c
+10
-1
No files found.
drivers/scsi/virtio_scsi.c
View file @
6f3e71c0
...
@@ -534,7 +534,9 @@ static int virtscsi_queuecommand(struct virtio_scsi *vscsi,
...
@@ -534,7 +534,9 @@ static int virtscsi_queuecommand(struct virtio_scsi *vscsi,
{
{
struct
Scsi_Host
*
shost
=
virtio_scsi_host
(
vscsi
->
vdev
);
struct
Scsi_Host
*
shost
=
virtio_scsi_host
(
vscsi
->
vdev
);
struct
virtio_scsi_cmd
*
cmd
=
scsi_cmd_priv
(
sc
);
struct
virtio_scsi_cmd
*
cmd
=
scsi_cmd_priv
(
sc
);
unsigned
long
flags
;
int
req_size
;
int
req_size
;
int
ret
;
BUG_ON
(
scsi_sg_count
(
sc
)
>
shost
->
sg_tablesize
);
BUG_ON
(
scsi_sg_count
(
sc
)
>
shost
->
sg_tablesize
);
...
@@ -562,8 +564,15 @@ static int virtscsi_queuecommand(struct virtio_scsi *vscsi,
...
@@ -562,8 +564,15 @@ static int virtscsi_queuecommand(struct virtio_scsi *vscsi,
req_size
=
sizeof
(
cmd
->
req
.
cmd
);
req_size
=
sizeof
(
cmd
->
req
.
cmd
);
}
}
if
(
virtscsi_kick_cmd
(
req_vq
,
cmd
,
req_size
,
sizeof
(
cmd
->
resp
.
cmd
))
!=
0
)
ret
=
virtscsi_kick_cmd
(
req_vq
,
cmd
,
req_size
,
sizeof
(
cmd
->
resp
.
cmd
));
if
(
ret
==
-
EIO
)
{
cmd
->
resp
.
cmd
.
response
=
VIRTIO_SCSI_S_BAD_TARGET
;
spin_lock_irqsave
(
&
req_vq
->
vq_lock
,
flags
);
virtscsi_complete_cmd
(
vscsi
,
cmd
);
spin_unlock_irqrestore
(
&
req_vq
->
vq_lock
,
flags
);
}
else
if
(
ret
!=
0
)
{
return
SCSI_MLQUEUE_HOST_BUSY
;
return
SCSI_MLQUEUE_HOST_BUSY
;
}
return
0
;
return
0
;
}
}
...
...
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