1. 04 Dec, 2014 1 commit
  2. 27 Nov, 2014 1 commit
    • Christoph Hellwig's avatar
      libsas: remove task_collector mode · 79855d17
      Christoph Hellwig authored
      The task_collector mode (or "latency_injector", (C) Dan Willians) is an
      optional I/O path in libsas that queues up scsi commands instead of
      directly sending it to the hardware.  It generall increases latencies
      to in the optiomal case slightly reduce mmio traffic to the hardware.
      Only the obsolete aic94xx driver and the mvsas driver allowed to use
      it without recompiling the kernel, and most drivers didn't support it
      at all.
      Remove the giant blob of code to allow better optimizations for scsi-mq
      in the future.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
      Acked-by: default avatarDan Williams <dan.j.williams@intel.com>
  3. 24 Nov, 2014 1 commit
  4. 05 Nov, 2014 1 commit
  5. 18 Mar, 2014 1 commit
    • Dan Williams's avatar
      libata, libsas: kill pm_result and related cleanup · bc6e7c4b
      Dan Williams authored
      Tejun says:
        "At least for libata, worrying about suspend/resume failures don't make
         whole lot of sense.  If suspend failed, just proceed with suspend.  If
         the device can't be woken up afterwards, that's that.  There isn't
         anything we could have done differently anyway.  The same for resume, if
         spinup fails, the device is dud and the following commands will invoke
         EH actions and will eventually fail.  Again, there really isn't any
         *choice* to make.  Just making sure the errors are handled gracefully
         (ie. don't crash) and the following commands are handled correctly
         should be enough."
      The only libata user that actually cares about the result from a suspend
      operation is libsas.  However, it only cares about whether queuing a new
      operation collides with an in-flight one.  All libsas does with the
      error is retry, but we can just let libata wait for the previous
      operation before continuing.
      Other cleanups include:
      1/ Unifying all ata port pm operations on an ata_port_pm_ prefix
      2/ Marking all ata port pm helper routines as returning void, only
         ata_port_pm_ entry points need to fake a 0 return value.
      3/ Killing ata_port_{suspend|resume}_common() in favor of calling
         ata_port_request_pm() directly
      4/ Killing the wrappers that just do a to_ata_port() conversion
      5/ Clearly marking the entry points that do async operations with an
        _async suffix.
      Reference: http://marc.info/?l=linux-scsi&m=138995409532286&w=2
      Cc: Phillip Susi <psusi@ubuntu.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Suggested-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarTodd Brandt <todd.e.brandt@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
  6. 04 Jun, 2013 1 commit
    • James Bottomley's avatar
      [SCSI] libsas: implement > 16 byte CDB support · e73823f7
      James Bottomley authored
      Remove the arbitrary expectation in libsas that all SCSI commands are 16 bytes
      or less.  Instead do all copies via cmd->cmd_len (and use a pointer to this in
      the libsas task instead of a copy).  Note that this still doesn't enable > 16
      byte CDB support in the underlying drivers because their internal format has
      to be fixed and the wire format of > 16 byte CDBs according to the SAS spec is
      different.  the libsas drivers (isci, aic94xx, mvsas and pm8xxx are all
      updated for this change.
      Cc: Lukasz Dorau <lukasz.dorau@intel.com>
      Cc: Maciej Patelczyk <maciej.patelczyk@intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Jack Wang <xjtuwjp@gmail.com>
      Cc: Lindar Liu <lindar_liu@usish.com>
      Cc: Xiangliang Yu <yuxiangl@marvell.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
  7. 10 May, 2013 1 commit
    • James Bottomley's avatar
      [SCSI] sas: unify the pointlessly separated enums sas_dev_type and sas_device_type · aa9f8328
      James Bottomley authored
      These enums have been separate since the dawn of SAS, mainly because the
      latter is a procotol only enum and the former includes additional state
      for libsas.  The dichotomy causes endless confusion about which one you
      should use where and leads to pointless warnings like this:
      drivers/scsi/mvsas/mv_sas.c: In function 'mvs_update_phyinfo':
      drivers/scsi/mvsas/mv_sas.c:1162:34: warning: comparison between 'enum sas_device_type' and 'enum sas_dev_type' [-Wenum-compare]
      Fix by eliminating one of them.  The one kept is effectively the sas.h
      one, but call it sas_device_type and make sure the enums are all
      properly namespaced with the SAS_ prefix.
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
  8. 24 Aug, 2012 1 commit
    • Dan Williams's avatar
      [SCSI] libsas: suspend / resume support · 303694ee
      Dan Williams authored
      libsas power management routines to suspend and recover the sas domain
      based on a model where the lldd is allowed and expected to be
      sas_suspend_ha - disable event processing allowing the lldd to take down
                       links without concern for causing hotplug events.
                       Regardless of whether the lldd actually posts link down
                       messages libsas notifies the lldd that all
                       domain_devices are gone.
      sas_prep_resume_ha - on the way back up before the lldd starts link
                           training clean out any spurious events that were
                           generated on the way down, and re-enable event
      sas_resume_ha - after the lldd has started and decided that all phys
      		have posted link-up events this routine is called to let
      		libsas start it's own timeout of any phys that did not
      		resume.  After the timeout an lldd can cancel the
                      phy teardown by posting a link-up event.
      Storage for ex_change_count (u16) and phy_change_count (u8) are changed
      to int so they can be set to -1 to indicate 'invalidated'.
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Reviewed-by: default avatarJacek Danecki <jacek.danecki@intel.com>
      Tested-by: default avatarMaciej Patelczyk <maciej.patelczyk@intel.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
  9. 20 Jul, 2012 5 commits
  10. 08 Jul, 2012 1 commit
  11. 23 Apr, 2012 1 commit
  12. 29 Feb, 2012 5 commits
  13. 19 Feb, 2012 15 commits
  14. 16 Oct, 2011 1 commit
  15. 02 Oct, 2011 3 commits
    • Dan Williams's avatar
      [SCSI] isci: atapi support · b50102d3
      Dan Williams authored
      Based on original implementation from Jiangbi Liu and Maciej Trela.
      ATAPI transfers happen in two-to-three stages.  The two stage atapi
      commands are those that include a dma data transfer.  The data transfer
      portion of these operations is handled by the hardware packet-dma
      acceleration.  The three-stage commands do not have a data transfer and
      are handled without hardware assistance in raw frame mode.
      stage1: transmit host-to-device fis to notify the device of an incoming
      atapi cdb.  Upon reception of the pio-setup-fis repost the task_context
      to perform the dma transfer of the cdb+data (go to stage3), or repost
      the task_context to transmit the cdb as a raw frame (go to stage 2).
      stage2: wait for hardware notification of the cdb transmission and then
      go to stage 3.
      stage3: wait for the arrival of the terminating device-to-host fis and
      terminate the command.
      To keep the implementation simple we only support ATAPI packet-dma
      protocol (for commands with data) to avoid needing to handle the data
      transfer manually (like we do for SATA-PIO).  This may affect
      compatibility for a small number of devices (see
      If the data-transfer underruns, or encounters an error the
      device-to-host fis is expected to arrive in the unsolicited frame queue
      to pass to libata for disposition.  However, in the DONE_UNEXP_FIS (data
      underrun) case it appears we need to craft a response.  In the
      DONE_REG_ERR case we do receive the UF and propagate it to libsas.
      Signed-off-by: default avatarMaciej Trela <maciej.trela@intel.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
    • Dan Williams's avatar
      [SCSI] libsas: fix try_test_sas_gpio_gp_bit() build error · d962480e
      Dan Williams authored
      If the user has disabled CONFIG_SCSI_SAS_HOST_SMP then libsas drivers
      will not be receiving smp-gpio frames and do not need this lookup code.
      Reported-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Tested-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
    • Luben Tuikov's avatar
      [SCSI] libsas: Allow expander T-T attachments · ffaac8f4
      Luben Tuikov authored
      Allow expander table-to-table attachments for
      expanders that support it.
      Signed-off-by: default avatarLuben Tuikov <ltuikov@yahoo.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
  16. 22 Sep, 2011 1 commit
    • Dan Williams's avatar
      [SCSI] libsas: sgpio write support · 8ec6552f
      Dan Williams authored
      Add SFF-8485 v0.7 / SAS-1 smp-write-gpio register support to libsas.
      Defer SAS-2 support unless/until it defines an sgpio interface.
      Minimum implementation needed to get the lights blinking.
      try_test_sas_gpio_gp_bit() provides a common method to parse the
      incoming write data (raw bitstream), and the to_sas_gpio_gp_bit() helper
      routine can be used as a basis for the set/clear operations for the
      'read' implementation.  Host implementations parse as many bits
      (ODx.[012]) as are locally supported and report the number of registers
      successfully written.  If the submitted data overruns the internal
      number of registers available report the write as a success with the
      number of bytes remaining reported in ->resid_len.
      Example (assuming an active backplane) set the "identify" pattern for
      the first 21 devices:
      smp_write_gpio --count=2 --data=92,49,24,92,24,92,49,24 -t 4 --index=1 /dev/bsg/sas_hostX
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>