xemu/hw/scsi
Fam Zheng 4f577e9e69 scsi: Change scsi sense buf size to 252
Current buffer size fails the assersion check in like

    hw/scsi/scsi-bus.c:1655:    assert(req->sense_len <= sizeof(req->sense));

when backend (block/iscsi.c) returns more data then 96.

Exercise the core dump path by booting an Gentoo ISO with scsi-generic
device backed with iscsi (built with libiscsi 1.7.0):

    x86_64-softmmu/qemu-system-x86_64 \
    -drive file=iscsi://localhost:3260/iqn.foobar/0,if=none,id=drive-disk \
    -device virtio-scsi-pci,id=scsi1,bus=pci.0,addr=0x6 \
    -device scsi-generic,drive=drive-disk,bus=scsi1.0,id=iscsi-disk \
    -boot d \
    -cdrom gentoo.iso

    qemu-system-x86_64: hw/scsi/scsi-bus.c:1655: scsi_req_complete:
    Assertion `req->sense_len <= sizeof(req->sense)' failed.

According to SPC-4, section 4.5.2.1, 252 is the limit of sense data. So
increase the value to fix it.

Also remove duplicated define for the macro.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit c5f52875b9)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2014-06-25 15:05:09 -05:00
..
Makefile.objs vhost-scsi: new device supporting the tcm_vhost Linux kernel module 2013-04-19 16:18:11 +02:00
esp-pci.c hw: set interrupts using pci irq wrappers 2013-10-14 17:11:45 +03:00
esp.c scsi: Pass size to scsi_bus_new() 2013-08-30 20:14:39 +02:00
lsi53c895a.c pci, pc, acpi fixes, enhancements 2013-10-31 16:58:32 +01:00
megasas.c hw: set interrupts using pci irq wrappers 2013-10-14 17:11:45 +03:00
mfi.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
scsi-bus.c scsi-bus: Fix transfer length for VERIFY with BYTCHK=11b 2014-06-25 11:00:29 -05:00
scsi-disk.c scsi: Assign cancel_io vector for scsi_disk_emulate_ops 2014-02-21 00:34:40 -06:00
scsi-generic.c scsi: Change scsi sense buf size to 252 2014-06-25 15:05:09 -05:00
spapr_vscsi.c scsi: Change scsi sense buf size to 252 2014-06-25 15:05:09 -05:00
srp.h spapr-vscsi: add task management 2013-09-12 08:46:21 +02:00
vhost-scsi.c virtio-scsi: switch exit callback to VirtioDeviceClass 2014-02-20 21:36:15 -06:00
viosrp.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
virtio-scsi.c virtio-scsi: Prevent assertion on missed events 2014-02-21 00:34:40 -06:00
vmw_pvscsi.c hw: set interrupts using pci irq wrappers 2013-10-14 17:11:45 +03:00
vmw_pvscsi.h scsi: VMWare PVSCSI paravirtual device implementation 2013-04-19 10:44:17 +02:00