summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi/ibmvstgt.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-03-01 15:36:34 +0900
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-03-03 13:19:03 -0600
commitb560665ce5a617aff9c62b94a82340fe11fc0d91 (patch)
tree3f55c9ee12459c6b373cc298f854f7dde65b0e6b /drivers/scsi/ibmvscsi/ibmvstgt.c
parentab3b0be84c3877dd0cccef38693254b83782bb70 (diff)
downloadop-kernel-dev-b560665ce5a617aff9c62b94a82340fe11fc0d91.zip
op-kernel-dev-b560665ce5a617aff9c62b94a82340fe11fc0d91.tar.gz
[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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvstgt.c')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvstgt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c
index bd62131..429bf53 100644
--- a/drivers/scsi/ibmvscsi/ibmvstgt.c
+++ b/drivers/scsi/ibmvscsi/ibmvstgt.c
@@ -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);
OpenPOWER on IntegriCloud