[SCSI] iscsi: break up session creation into two stages
authorMike Christie <michaelc@cs.wisc.edu>
Wed, 28 Jun 2006 17:00:30 +0000 (12:00 -0500)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Thu, 29 Jun 2006 15:08:46 +0000 (11:08 -0400)
commit8434aa8b6fe5af27a33b8aa830c24e3680356c83
treedc8120fddd1d237dd9d47299b90c40874320daaf
parente6f3b63f50b4bb9fdc9025e0c3994acd265ad3a2
[SCSI] iscsi: break up session creation into two stages

qla4xxx is initialized in two steps like other HW drivers.
It allocates the host, sets up the HW, then adds the host.
For iscsi part of HW setup is setting up persistent iscsi
sessions. At that time, the interupts are off and the driver
is not completely set up so we just want to allocate them.
We do not want to add them to sysfs and expose them to userspace
because userspace could try to do lots of fun things with them
like scanning and at that time the driver is not ready.

So this patch breakes up the session creation like other
functions that use the driver model in two the alloc
and add parts. When the driver is ready, it can then add
the sessions and userspace can begin using them.

This also fixes a bug in the addition error patch where
we forgot to do a get on the session.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_transport_iscsi.c
include/scsi/scsi_transport_iscsi.h