1. 20 2月, 2012 5 次提交
    • D
      [SCSI] libsas: prevent domain rediscovery competing with ata error handling · 87c8331f
      Dan Williams 提交于
      libata error handling provides for a timeout for link recovery.  libsas
      must not rescan for previously known devices in this interval otherwise
      it may remove a device that is simply waiting for its link to recover.
      Let libata-eh make the determination of when the link is stable and
      prevent libsas (host workqueue) from taking action while this
      determination is pending.
      
      Using a mutex (ha->disco_mutex) to flush and disable revalidation while
      eh is running requires any discovery action that may block on eh be
      moved to its own context outside the lock.  Probing ATA devices
      explicitly waits on ata-eh and the cache-flush-io issued during device
      removal may also pend awaiting eh completion.  Essentially any rphy
      add/remove activity needs to run outside the lock.
      
      This adds two new cleanup states for sas_unregister_domain_devices()
      'allocated-but-not-probed', and 'flagged-for-destruction'.  In the
      'allocated-but-not-probed' state  dev->rphy points to a rphy that is
      known to have not been through a sas_rphy_add() event.  At domain
      teardown check if this device is still pending probe and cleanup
      accordingly.  Similarly if a device has already been queued for removal
      then sas_unregister_domain_devices has nothing to do.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      87c8331f
    • D
      [SCSI] libsas: introduce sas_drain_work() · b1124cd3
      Dan Williams 提交于
      When an lldd invokes ->notify_port_event() it can trigger a chain of libsas
      events to:
      
        1/ form the port and find the direct attached device
      
        2/ if the attached device is an expander perform domain discovery
      
      A call to flush_workqueue() will only flush the initial port formation work.
      Currently libsas users need to call scsi_flush_work() up to the max depth of
      chain (which will grow from 2 to 3 when ata discovery is moved to its own
      discovery event).  Instead of open coding multiple calls switch to use
      drain_workqueue() to flush sas work.
      
      drain_workqueue() does not handle new work submitted during the drain so
      libsas needs a bit of infrastructure to hold off unchained work submissions
      while a drain is in flight.  A lldd ->notify() event is considered 'unchained'
      while a sas_discover_event() is 'chained'.  As Tejun notes:
      
        "For now, I think it would be best to add private wrapper in libsas to
         support deferring unchained work items while draining."
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      b1124cd3
    • D
      [SCSI] libsas: convert ha->state to flags · f8daa6e6
      Dan Williams 提交于
      In preparation for adding new states (SAS_HA_DRAINING, SAS_HA_FROZEN),
      convert ha->state into a set of flags.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      f8daa6e6
    • D
      [SCSI] libsas: replace event locks with atomic bitops · b15ebe0b
      Dan Williams 提交于
      The locks only served to make sure the pending event bitmask was updated
      consistently.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      b15ebe0b
    • D
      [SCSI] libsas: fix domain_device leak · 735f7d2f
      Dan Williams 提交于
      Arrange for the deallocation of a struct domain_device object when it no
      longer has:
      1/ any children
      2/ references by any scsi_targets
      3/ references by a lldd
      
      The comment about domain_device lifetime in
      Documentation/scsi/libsas.txt is stale as it appears mainline never had
      a version of a struct domain_device that was registered as a kobject.
      We now manage domain_device reference counts on behalf of external
      agents.
      Reviewed-by: NJack Wang <jack_wang@usish.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      735f7d2f
  2. 27 5月, 2011 1 次提交
  3. 25 1月, 2011 1 次提交
  4. 09 10月, 2008 1 次提交
  5. 12 1月, 2008 2 次提交
  6. 19 7月, 2007 1 次提交
  7. 14 1月, 2007 1 次提交
  8. 22 11月, 2006 1 次提交
  9. 08 9月, 2006 2 次提交
  10. 29 8月, 2006 1 次提交
    • J
      [SCSI] aic94xx: new driver · 2908d778
      James Bottomley 提交于
      This is the end point of the separate aic94xx driver based on the
      original driver and transport class from Luben Tuikov
      <ltuikov@yahoo.com>
      
      The log of the separate development is:
      
      Alexis Bruemmer:
        o aic94xx: fix hotplug/unplug for expanderless systems
        o aic94xx: disable split completion timer/setting by default
        o aic94xx: wide port off expander support
        o aic94xx: remove various inline functions
        o aic94xx: use bitops
        o aic94xx: remove queue comment
        o aic94xx: remove sas_common.c
        o aic94xx: sas remove depot's
        o aic94xx: use available list_for_each_entry_safe_reverse()
        o aic94xx: sas header file merge
      
      James Bottomley:
        o aic94xx: fix TF_TMF_NO_CTX processing
        o aic94xx: convert to request_firmware interface
        o aic94xx: fix hotplug/unplug
        o aic94xx: add link error counts to the expander phys
        o aic94xx: add transport class phy reset capability
        o aic94xx: remove local_attached flag
        o Remove README
        o Fixup Makefile variable for libsas rename
        o Rename sas->libsas
        o aic94xx: correct return code for sas_discover_event
        o aic94xx: use parent backlink port
        o aic94xx: remove channel abstraction
        o aic94xx: fix routing algorithms
        o aic94xx: add backlink port
        o aic94xx: fix cascaded expander properties
        o aic94xx: fix sleep under lock
        o aic94xx: fix panic on module removal in complex topology
        o aic94xx: make use of the new sas_port
        o rename sas_port to asd_sas_port
        o Fix for eh_strategy_handler move
        o aic94xx: move entirely over to correct transport class formulation
        o remove last vestages of sas_rphy_alloc()
        o update for eh_timed_out move
        o Preliminary expander support for aic94xx
        o sas: remove event thread
        o minor warning cleanups
        o remove last vestiges of id mapping arrays
        o Further updates
        o Convert aic94xx over entirely to the transport class end device and
        o update aic94xx/sas to use the new sas transport class end device
        o [PATCH] aic94xx: attaching to the sas transport class
        o Add missing completion removal from prior patch
        o [PATCH] aic94xx: attaching to the sas transport class
        o Build fixes from akpm
      
      Jeff Garzik:
        o [scsi aic94xx] Remove ->owner from PCI info table
      
      Luben Tuikov:
        o initial aic94xx driver
      
      Mike Anderson:
        o aic94xx: fix panic on module insertion
        o aic94xx: stub out SATA_DEV case
        o aic94xx: compile warning cleanups
        o aic94xx: sas_alloc_task
        o aic94xx: ref count update
        o aic94xx nexus loss time value
        o [PATCH] aic94xx: driver assertion in non-x86 BIOS env
      
      Randy Dunlap:
        o libsas: externs not needed
      
      Robert Tarte:
        o aic94xx: sequence patch - fixes SATA support
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      2908d778