diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-05-03 14:34:45 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-05-07 08:44:21 +0200 |
commit | 3c3d8a95cafb6b38515497688db5a26db67fe6ce (patch) | |
tree | b13d6816159d7823eca892fb439d7a8ef873e090 /hw/scsi-disk.c | |
parent | 065c25996b6275e306704816c6075d6c0ff66e84 (diff) |
scsi: do not require a minimum allocation length for INQUIRY
The requirements on the INQUIRY buffer size are not in my copy of SPC
(SPC-4 r27) and not observed by LIO. Rip them out.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r-- | hw/scsi-disk.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 43726ffb89..41580321c4 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -524,11 +524,6 @@ static int scsi_disk_emulate_inquiry(SCSIRequest *req, uint8_t *outbuf) if (req->cmd.buf[1] & 0x1) { /* Vital product data */ uint8_t page_code = req->cmd.buf[2]; - if (req->cmd.xfer < 4) { - BADF("Error: Inquiry (EVPD[%02X]) buffer size %zd is " - "less than 4\n", page_code, req->cmd.xfer); - return -1; - } outbuf[buflen++] = s->qdev.type & 0x1f; outbuf[buflen++] = page_code ; // this page @@ -659,12 +654,6 @@ static int scsi_disk_emulate_inquiry(SCSIRequest *req, uint8_t *outbuf) } /* PAGE CODE == 0 */ - if (req->cmd.xfer < 5) { - BADF("Error: Inquiry (STANDARD) buffer size %zd " - "is less than 5\n", req->cmd.xfer); - return -1; - } - buflen = req->cmd.xfer; if (buflen > SCSI_MAX_INQUIRY_LEN) { buflen = SCSI_MAX_INQUIRY_LEN; |