Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b560665c authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by James Bottomley
Browse files

[SCSI] ibmvstgt: set up scsi_host properly before __scsi_alloc_queue



Before calling __scsi_alloc_queue, scsi_host->shost_gendev.parent must
be initialized properly.

This patch moves __scsi_alloc_queue after scsi_add_host (like
initiator drivers do).

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent ab3b0be8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -838,9 +838,6 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id)
	if (!shost)
		goto free_vport;
	shost->transportt = ibmvstgt_transport_template;
	err = scsi_tgt_alloc_queue(shost);
	if (err)
		goto put_host;

	target = host_to_srp_target(shost);
	target->shost = shost;
@@ -872,6 +869,10 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id)
	if (err)
		goto destroy_queue;

	err = scsi_tgt_alloc_queue(shost);
	if (err)
		goto destroy_queue;

	return 0;
destroy_queue:
	crq_queue_destroy(target);