diff mbox

[1/2,scsi-bus] : Add PR-OUT and PR-IN case for SCSIRequest xfer and xfer_mode setup

Message ID 1275270181-10992-1-git-send-email-nab@linux-iscsi.org (mailing list archive)
State New, archived
Headers show

Commit Message

Nicholas A. Bellinger May 31, 2010, 1:43 a.m. UTC
None
diff mbox

Patch

diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index b8e4b71..75ec74e 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -325,6 +325,10 @@  static int scsi_req_length(SCSIRequest *req, uint8_t *cmd)
     case INQUIRY:
         req->cmd.xfer = cmd[4] | (cmd[3] << 8);
         break;
+    case PERSISTENT_RESERVE_OUT:
+    case PERSISTENT_RESERVE_IN:
+        req->cmd.xfer = cmd[8] | (cmd[7] << 8);
+        break;
     }
     return 0;
 }
@@ -389,6 +393,7 @@  static void scsi_req_xfer_mode(SCSIRequest *req)
     case MEDIUM_SCAN:
     case SEND_VOLUME_TAG:
     case WRITE_LONG_2:
+    case PERSISTENT_RESERVE_OUT:
         req->cmd.mode = SCSI_XFER_TO_DEV;
         break;
     default: