diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-23 09:08:54 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-23 09:08:54 -0600 |
commit | 177f7fc6884c47666f6c6eeca376a92432ccda38 (patch) | |
tree | 75f5ec98b1aa5c9c15b95033431e9a141cf59fd5 /hw/scsi-disk.c | |
parent | 36ba58044e70a82b93e84b1f31076df847f23109 (diff) | |
parent | 0bf8264e2d2bd19c1eecf9bde0e59284ef47eabb (diff) | |
download | hqemu-177f7fc6884c47666f6c6eeca376a92432ccda38.zip hqemu-177f7fc6884c47666f6c6eeca376a92432ccda38.tar.gz |
Merge remote-tracking branch 'bonzini/scsi-next' into staging
# By Peter Lieven (3) and others
# Via Paolo Bonzini
* bonzini/scsi-next:
scsi: Drop useless null test in scsi_unit_attention()
lsi: use qbus_reset_all to reset SCSI bus
scsi: fix segfault with 0-byte disk
iscsi: add support for iSCSI NOPs [v2]
iscsi: partly avoid iovec linearization in iscsi_aio_writev
iscsi: add iscsi_create support
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r-- | hw/scsi-disk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 96db9a7..28e75bb 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1680,7 +1680,7 @@ static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf) bdrv_get_geometry(s->qdev.conf.bs, &nb_sectors); if (!nb_sectors) { scsi_check_condition(r, SENSE_CODE(LUN_NOT_READY)); - return -1; + return 0; } if ((req->cmd.buf[8] & 1) == 0 && req->cmd.lba) { goto illegal_request; @@ -1749,7 +1749,7 @@ static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf) bdrv_get_geometry(s->qdev.conf.bs, &nb_sectors); if (!nb_sectors) { scsi_check_condition(r, SENSE_CODE(LUN_NOT_READY)); - return -1; + return 0; } if ((req->cmd.buf[14] & 1) == 0 && req->cmd.lba) { goto illegal_request; |