]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: virtio_scsi: Always try to read VPD pages
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 13 Apr 2017 02:13:00 +0000 (12:13 +1000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 19 Apr 2017 23:12:11 +0000 (19:12 -0400)
commit62281b214a2661ff4c4a411d779703ac066eea50
treeb22ddc5b4d4fd62a0286f53a2338e24f454277b0
parent17e66ec76ac50a9c3b8416d7f4f2c50268817770
scsi: virtio_scsi: Always try to read VPD pages

Passed through SCSI targets may have transfer limits which come from the
host SCSI controller or something on the host side other than the target
itself.

To make this work properly, the hypervisor can adjust the target's VPD
information to advertise these limits.  But for that to work, the guest
has to look at the VPD pages, which we won't do by default if it is an
SPC-2 device, even if it does actually support it.

This adds a workaround to address this, forcing devices attached to a
virtio-scsi controller to always check the VPD pages.  This is modelled
on a similar workaround for the storvsc (Hyper-V) SCSI controller,
although that exists for slightly different reasons.

A specific case which causes this is a volume from IBM's IPR RAID
controller (which presents as an SPC-2 device, although it does support
VPD) passed through with qemu's 'scsi-block' device.

[mkp: fixed typo]

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/virtio_scsi.c