]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[SCSI] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 11 Jul 2012 21:22:16 +0000 (21:22 +0000)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 20 Jul 2012 07:59:03 +0000 (08:59 +0100)
commit59057fbc37178f10a196ab7ec170b80273f75a47
tree79b85034672f27cf605d90736c8f1a75ac2c0656
parent0b1017aab197271a78169fde3d7e487bb721997c
[SCSI] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning

This patch changes virtio-scsi to use a new virtio_driver->scan() callback
so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has
set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring
operation, instead of from within virtscsi_probe().

This fixes a bug where SCSI LUN scanning for both virtio-scsi-raw and
virtio-scsi/tcm_vhost setups was happening before VIRTIO_CONFIG_S_DRIVER_OK
had been set, causing VIRTIO_SCSI_S_BAD_TARGET to occur.  This fixes a bug
with virtio-scsi/tcm_vhost where LUN scan was not detecting LUNs.

Tested with virtio-scsi-raw + virtio-scsi/tcm_vhost w/ IBLOCK on 3.5-rc2 code.

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/virtio_scsi.c
drivers/virtio/virtio.c
include/linux/virtio.h