1. 28 1月, 2007 3 次提交
    • D
      [SCSI] libsas: Check return values of sysfs_create_link · 21434966
      Darrick J. Wong 提交于
      Get rid of: "warning: ignoring return value of sysfs_create_link..."
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      21434966
    • D
      [SCSI] libsas: Clean up discovery failure handler code · 6f63caae
      Darrick J. Wong 提交于
      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: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      6f63caae
    • D
      [SCSI] libsas: Fix incorrect sas_port deformation in sas_form_port · 3b6e9faf
      Darrick J. Wong 提交于
      Currently, sas_form_port checks the given asd_sas_phy's sas_phy to see if
      there's already a port attached.  If so, the SAS addresses of the port and
      the phy are compared to determine if we need to detach from the port
      because the addresses don't match or if we can stop; the SAS address stored
      in the sas_port reflects whatever device _was_ attached to the port/phy, and
      the SAS address stored in the sas_port reflects whatever device we just
      discovered.  As written, the code detaches from the port if the addresses
      _do_ match, and prints an error if they do _not_ match.  I believe this to
      be incorrect, as it seems more logical to keep the port if the addresses
      match (i.e. the phy was reset but the device didn't change), and detach it
      they do not (i.e. the device changed).
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      3b6e9faf
  2. 27 1月, 2007 11 次提交
  3. 14 1月, 2007 26 次提交