diff mbox

virtio_scsi: always read VPD pages for multiqueue too

Message ID 1499243456-29978-1-git-send-email-pbonzini@redhat.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Paolo Bonzini July 5, 2017, 8:30 a.m. UTC
Multi-queue virtio-scsi uses a different scsi_host_template struct.
Add the .device_alloc field there, too.

Fixes: 25d1d50e23275e141e3a3fe06c25a99f4c4bf4e0
Cc: stable@vger.kernel.org
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 drivers/scsi/virtio_scsi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Fam Zheng July 5, 2017, 8:43 a.m. UTC | #1
On Wed, 07/05 10:30, Paolo Bonzini wrote:
> Multi-queue virtio-scsi uses a different scsi_host_template struct.
> Add the .device_alloc field there, too.
> 
> Fixes: 25d1d50e23275e141e3a3fe06c25a99f4c4bf4e0
> Cc: stable@vger.kernel.org
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  drivers/scsi/virtio_scsi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index f8dbfeee6c63..ad1e7f1aba4c 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -826,6 +826,7 @@ static int virtscsi_map_queues(struct Scsi_Host *shost)
>  	.change_queue_depth = virtscsi_change_queue_depth,
>  	.eh_abort_handler = virtscsi_abort,
>  	.eh_device_reset_handler = virtscsi_device_reset,
> +	.slave_alloc = virtscsi_device_alloc,
>  
>  	.can_queue = 1024,
>  	.dma_boundary = UINT_MAX,
> -- 
> 1.8.3.1
> 

Reviewed-by: Fam Zheng <famz@redhat.com>
Stefan Hajnoczi July 11, 2017, 12:29 p.m. UTC | #2
On Wed, Jul 05, 2017 at 10:30:56AM +0200, Paolo Bonzini wrote:
> Multi-queue virtio-scsi uses a different scsi_host_template struct.
> Add the .device_alloc field there, too.
> 
> Fixes: 25d1d50e23275e141e3a3fe06c25a99f4c4bf4e0
> Cc: stable@vger.kernel.org
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  drivers/scsi/virtio_scsi.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Martin K. Petersen July 12, 2017, 9:16 p.m. UTC | #3
Paolo,

> Multi-queue virtio-scsi uses a different scsi_host_template struct.
> Add the .device_alloc field there, too.

Applied to 4.13/scsi-fixes by hand. Thanks!
diff mbox

Patch

diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index f8dbfeee6c63..ad1e7f1aba4c 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -826,6 +826,7 @@  static int virtscsi_map_queues(struct Scsi_Host *shost)
 	.change_queue_depth = virtscsi_change_queue_depth,
 	.eh_abort_handler = virtscsi_abort,
 	.eh_device_reset_handler = virtscsi_device_reset,
+	.slave_alloc = virtscsi_device_alloc,
 
 	.can_queue = 1024,
 	.dma_boundary = UINT_MAX,