1. 18 5月, 2012 10 次提交
  2. 20 2月, 2012 1 次提交
    • 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
  3. 19 2月, 2012 1 次提交
  4. 18 2月, 2012 1 次提交
  5. 10 2月, 2012 1 次提交
  6. 16 1月, 2012 7 次提交
  7. 31 10月, 2011 1 次提交
  8. 22 9月, 2011 1 次提交
  9. 24 8月, 2011 2 次提交
  10. 03 7月, 2011 15 次提交
    • D
      isci: cleanup silicon revision detection · dc00c8b6
      Dan Williams 提交于
      Perform checking per-pci device (even though all systems will only have
      1 pci device in this generation), and delete support for silicon that
      does not report a proper revision (i.e. A0).
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      dc00c8b6
    • D
      isci: merge scu_unsolicited_frame.h into unsolicited_frame_control.h · 4e4dca3d
      Dan Williams 提交于
      Does not need its own file.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      4e4dca3d
    • D
      isci: kill 'get/set' macros · 34a99158
      Dan Williams 提交于
      Most of these simple dereference macros are longer than their open coded
      equivalent.  Deleting enum sci_controller_mode is thrown in for good
      measure.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      34a99158
    • D
      isci: retire scic_sds_ and scic_ prefixes · 89a7301f
      Dan Williams 提交于
      The distinction between scic_sds_ scic_ and sci_ are no longer relevant
      so just unify the prefixes on sci_.  The distinction between isci_ and
      sci_ is historically significant, and useful for comparing the old
      'core' to the current Linux driver. 'sci_' represents the former core as
      well as the routines that are closer to the hardware and protocol than
      their 'isci_' brethren. sci == sas controller interface.
      
      Also unwind the 'sds1' out of the parameter structs.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      89a7301f
    • D
      isci: unify isci_host and scic_sds_controller · d9dcb4ba
      Dan Williams 提交于
      Remove the distinction between these two implementations and unify on
      isci_host (local instances named ihost).  Hmmm, we had two
      'oem_parameters' instances, one was unused... nice.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      d9dcb4ba
    • D
      isci: unify isci_remote_device and scic_sds_remote_device · 78a6f06e
      Dan Williams 提交于
      Remove the distinction between these two implementations and unify on
      isci_remote_device (local instances named idev).
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      78a6f06e
    • D
      isci: unify isci_port and scic_sds_port · ffe191c9
      Dan Williams 提交于
      Remove the distinction between these two implementations and unify on
      isci_port (local instances named iport).  The duplicate '->owning_port' and
      '->isci_port' in both isci_phy and isci_remote_device will be fixed in a later
      patch... this is just the straightforward rename/unification.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      ffe191c9
    • D
      isci: unify isci_phy and scic_sds_phy · 85280955
      Dan Williams 提交于
      They are one in the same object so remove the distinction.  The near
      duplicate fields (owning_port, and isci_port) will be cleaned up
      after the scic_sds_port isci_port unification.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      85280955
    • D
      isci: unify isci_request and scic_sds_request · 5076a1a9
      Dan Williams 提交于
      They are one in the same object so remove the distinction.  The near
      duplicate fields (owning_controller, and isci_host) will be cleaned up
      after the scic_sds_contoller isci_host unification.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      5076a1a9
    • D
      isci: preallocate requests · db056250
      Dan Williams 提交于
      the dma_pool interface is optimized for object_size << page_size which
      is not the case with isci_request objects and the dma_pool routines show
      up in the top of the profile.
      
      The old io_request_table which tracked whether tci slots were in-flight
      or not is replaced with an IREQ_ACTIVE flag per request.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      db056250
    • D
      isci: unify can_queue tracking on the tci_pool, uplevel tag assignment · 312e0c24
      Dan Williams 提交于
      The tci_pool tracks our outstanding command slots which are also the 'index'
      portion of our tags.  Grabbing the tag early in ->lldd_execute_task let's us
      drop the isci_host_can_queue() and ->was_tag_assigned_by_user infrastructure.
      ->was_tag_assigned_by_user required the task context to be duplicated in
      request-local buffer.  With the tci established early we can build the
      task_context directly into its final location and skip a memcpy.
      
      With the task context buffer at a known address at request construction we
      have the opportunity/obligation to also fix sgl handling.  This rework feels
      like it belongs in another patch but the sgl handling and task_context are too
      intertwined.
      1/ fix the 'ab' pair embedded in the task context to point to the 'cd' pair in
         the task context (previously we were prematurely linking to the staging
         buffer).
      2/ fix the broken iteration of pio sgls that assumes all sgls are relative to
         the request, and does a dangerous looking reverse lookup of physical
         address to virtual address.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      312e0c24
    • D
      isci: kill isci_remote_device_change_state() · f2088267
      Dan Williams 提交于
      Now that "stopping/stopped" are one in the same and signalled by a NULL device
      pointer the rest of the device status infrastructure can be removed (->status
      and ->state_lock).  The "not ready for i/o state" is replaced with a state
      flag, and is evaluated under scic_lock so that we don't see transients from
      taking the device reference to submitting the i/o.
      
      This also fixes a potential leakage of can_queue slots in the rare case that
      SAS_TASK_ABORTED is set at submission.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      f2088267
    • D
      isci: atomic device lookup and reference counting · 209fae14
      Dan Williams 提交于
      We have unsafe references to remote devices that are notified to
      disappear at lldd_dev_gone.  In order to clean this up we need a single
      canonical source for device lookups and stable references once a lookup
      succeeds.  Towards that end guarantee that domain_device.lldd_dev is
      NULL as soon as we start the process of stopping a device.  Any code
      path that wants to safely lookup a remote device must do so through
      task->dev->lldd_dev (isci_lookup_device()).
      
      For in-flight references outside of scic_lock we need reference counting
      to ensure that the device is not recycled before we are done with it.
      Simplify device back references to just scic_sds_request.target_device
      which is now the only permissible internal reference that is maintained
      relative to the reference count.
      
      There were two occasions where we wanted new i/o's to be treated as
      SAS_TASK_UNDELIVERED but where the domain_dev->lldd_dev link is still
      intact.  Introduce a 'gone' flag to prevent i/o while waiting for libsas
      to take action on the port down event.
      
      One 'core' leftover is that we currently call
      scic_remote_device_destruct() from isci_remote_device_deconstruct()
      which is called when the 'core' says the device is stopped.  It would be
      more natural for the final put to trigger
      isci_remote_device_deconstruct() but this implementation is deferred as
      it requires other changes.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      209fae14
    • D
      isci: cleanup/optimize queue increment macros · 994a9303
      Dan Williams 提交于
      Every single i/o or event completion incurs a test and branch to see if
      the cycle bit changed.  For power-of-2 queue sizes the cycle bit can be
      read directly from the rollover of the queue pointer.
      
      Likely premature optimization, but the hidden if() and hidden
      assignments / side-effects in the macros were already asking to be
      cleaned up.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      994a9303
    • D
      isci: cleanup tag macros · dd047c8e
      Dan Williams 提交于
      A tag is a 16 bit number where the upper four bits is a sequence number
      and the remainder is the task context index (tci).  Sanitize the macro
      names and shave 256-bytes out of scic_sds_controller by reducing the size of
      io_request_sequence.
      
      scic_sds_io_tag_construct --> ISCI_TAG
      scic_sds_io_tag_get_sequence --> ISCI_TAG_SEQ
      scic_sds_io_tag_get_index() --> ISCI_TAG_TCI
      scic_sds_io_sequence_increment() [delete / open code]
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      dd047c8e