aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-03-01 01:36:34 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-03-03 14:19:03 -0500
commitb560665ce5a617aff9c62b94a82340fe11fc0d91 (patch)
tree3f55c9ee12459c6b373cc298f854f7dde65b0e6b /drivers/scsi/ibmvscsi
parentab3b0be84c3877dd0cccef38693254b83782bb70 (diff)
[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')
-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 bd62131b97a1..429bf53f4118 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)
838 if (!shost) 838 if (!shost)
839 goto free_vport; 839 goto free_vport;
840 shost->transportt = ibmvstgt_transport_template; 840 shost->transportt = ibmvstgt_transport_template;
841 err = scsi_tgt_alloc_queue(shost);
842 if (err)
843 goto put_host;
844 841
845 target = host_to_srp_target(shost); 842 target = host_to_srp_target(shost);
846 target->shost = shost; 843 target->shost = shost;
@@ -872,6 +869,10 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id)
872 if (err) 869 if (err)
873 goto destroy_queue; 870 goto destroy_queue;
874 871
872 err = scsi_tgt_alloc_queue(shost);
873 if (err)
874 goto destroy_queue;
875
875 return 0; 876 return 0;
876destroy_queue: 877destroy_queue:
877 crq_queue_destroy(target); 878 crq_queue_destroy(target);