linux/drivers/scsi/libsas
Darrick J. Wong 6f63caae21 [SCSI] libsas: Clean up discovery failure handler code
sas_rphy_delete does two things: it removes the sas_rphy from the transport
layer and frees the sas_rphy.  This can be broken down into two functions,
sas_rphy_remove and sas_rphy_free; sas_rphy_remove is of interest to
sas_discover_root_expander because it calls functions that require
sas_rphy_add as a prerequisite and can fail (namely sas_discover_expander).
In that case, sas_discover_root_expander needs to be able to undo the effects
of sas_rphy_add yet leave the job of freeing the sas_rphy to the caller of
sas_discover_root_expander.

This patch also removes some unnecessary code from sas_discover_end_dev
to eliminate an unnecessary cycle of sas_notify_lldd_gone/found for SAS
devices, thus eliminating a sas_rphy_remove call (and fixing a race condition
where a SCSI target scan can come in between the gone and found call).
It also moves the sas_rphy_free calls into sas_discover_domain and
sas_ex_discover_end_dev to complement the sas_rphy_allocation via
sas_get_port_device.

This patch does not change the semantics of sas_rphy_delete.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-01-27 10:05:15 -06:00
..
Kconfig [SCSI] aic94xx: new driver 2006-08-29 09:52:29 -05:00
Makefile [SCSI] aic94xx: new driver 2006-08-29 09:52:29 -05:00
sas_discover.c [SCSI] libsas: Clean up discovery failure handler code 2007-01-27 10:05:15 -06:00
sas_dump.c [SCSI] aic94xx: new driver 2006-08-29 09:52:29 -05:00
sas_dump.h [SCSI] aic94xx: new driver 2006-08-29 09:52:29 -05:00
sas_event.c [SCSI] libsas: Add SAS_HA state flags to avoid queueing events while unloading 2007-01-13 16:21:53 -06:00
sas_expander.c [SCSI] libsas: Clean up discovery failure handler code 2007-01-27 10:05:15 -06:00
sas_init.c [SCSI] libsas: Add SAS_HA state flags to avoid queueing events while unloading 2007-01-13 16:21:53 -06:00
sas_internal.h [SCSI] libsas: Add SAS_HA state flags to avoid queueing events while unloading 2007-01-13 16:21:53 -06:00
sas_phy.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
sas_port.c [SCSI] libsas: Fix incorrect sas_port deformation in sas_form_port 2007-01-27 10:04:58 -06:00
sas_scsi_host.c [SCSI] libsas: Start I_T recovery if ABORT TASK fails 2007-01-13 16:23:40 -06:00