summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorBernhard Kohl <bernhard.kohl@nsn.com>2010-09-06 16:58:44 +0200
committerKevin Wolf <kwolf@redhat.com>2010-09-21 15:39:43 +0200
commita5e3d9ef4dcca9b709999a98f6b37b9506c93ad3 (patch)
tree8eaf41065b7ec0d47dd53e841bf1bf10eb9c1872 /hw
parentf8b6d67251cfafed930d5f8be402fb0adac61299 (diff)
downloadqemu-a5e3d9ef4dcca9b709999a98f6b37b9506c93ad3.tar.gz
scsi_bus: fix length and xfer_mode for RESERVE and RELEASE commands
For the RESERVE and RELEASE commands the length must be zero and xfer_mode must be SCSI_XFER_NONE. Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi-bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index 7aa0bcd1ee..5a3fd4b7ac 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -208,6 +208,8 @@ static int scsi_req_length(SCSIRequest *req, uint8_t *cmd)
case SEEK_6:
case WRITE_FILEMARKS:
case SPACE:
+ case RESERVE:
+ case RELEASE:
case ERASE:
case ALLOW_MEDIUM_REMOVAL:
case VERIFY:
@@ -319,7 +321,6 @@ static void scsi_req_xfer_mode(SCSIRequest *req)
case WRITE_BUFFER:
case FORMAT_UNIT:
case REASSIGN_BLOCKS:
- case RESERVE:
case SEARCH_EQUAL:
case SEARCH_HIGH:
case SEARCH_LOW: