1. 11 9月, 2019 3 次提交
  2. 08 8月, 2019 4 次提交
  3. 21 6月, 2019 1 次提交
  4. 19 6月, 2019 1 次提交
  5. 31 5月, 2019 1 次提交
  6. 13 4月, 2019 1 次提交
    • J
      scsi: hisi_sas: Fix for setting the PHY linkrate when disconnected · c63b88cc
      John Garry 提交于
      In commit efdcad62 ("scsi: hisi_sas: Set PHY linkrate when
      disconnected"), we use the sas_phy_data.enable flag to track whether the
      PHY was enabled or not, so that we know if we should set the PHY negotiated
      linkrate at SAS_LINK_RATE_UNKNOWN or SAS_PHY_DISABLED.
      
      However, it is not proper to use sas_phy_data.enable, since it is only set
      when libsas attempts to set the PHY disabled/enabled; hence, it may not
      even have an initial value.
      
      As a solution to this problem, introduce hisi_sas_phy.enable to track
      whether the PHY is enabled or not, so that we can set the negotiated
      linkrate properly when the PHY comes down.
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      c63b88cc
  7. 07 3月, 2019 2 次提交
  8. 09 2月, 2019 4 次提交
  9. 29 1月, 2019 6 次提交
  10. 09 1月, 2019 4 次提交
  11. 19 12月, 2018 1 次提交
  12. 13 12月, 2018 1 次提交
    • J
      scsi: hisi_sas: Fix warnings detected by sparse · 735bcc77
      John Garry 提交于
      This patchset fixes some warnings detected by the sparse tool, like these:
      drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52: warning: incorrect type in assignment (different base types)
      drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52:    expected unsigned short [unsigned] [assigned] [usertype] tag_of_task_to_be_managed
      drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52:    got restricted __le16 [usertype] <noident>
      drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52: warning: incorrect type in assignment (different base types)
      drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52:    expected unsigned short [unsigned] [assigned] [usertype] tag_of_task_to_be_managed
      drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52:    got restricted __le16 [usertype] <noident>
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      735bcc77
  13. 16 11月, 2018 2 次提交
  14. 16 10月, 2018 1 次提交
  15. 20 7月, 2018 2 次提交
  16. 20 6月, 2018 2 次提交
    • X
      scsi: hisi_sas: Pre-allocate slot DMA buffers · 2ba5afb6
      Xiang Chen 提交于
      Currently the driver spends much time allocating and freeing the slot DMA
      buffer for command delivery/completion. To boost the performance,
      pre-allocate the buffers for all IPTT. The downside of this approach is
      that we are reallocating all buffer memory upfront, so hog memory which we
      may not need.
      
      However, the current method - DMA buffer pool - also caches all buffers and
      does not free them until the pool is destroyed, so is not exactly efficient
      either.
      
      On top of this, since the slot DMA buffer is slightly bigger than a 4K
      page, we need to allocate 2x4K pages per buffer (for 4K page kernel), which
      is quite wasteful. For 64K page size this is not such an issue.
      
      So, for the 4K page case, in order to make memory usage more efficient,
      pre-allocating larger blocks of DMA memory for the buffers can be more
      efficient.
      
      To make DMA memory usage most efficient, we would choose a single
      contiguous DMA memory block, but this could use up all the DMA memory in
      the system (when CMA enabled and no IOMMU), or we may just not be able to
      allocate a DMA buffer large enough when no CMA or IOMMU.
      
      To decide the block size we use the LCM (least common multiple) of the
      buffer size and the page size. We roundup(64) to ensure the LCM is not too
      large, even though a little memory may be wasted per block.
      
      So, with this, the total memory requirement is about is about 17MB for 4096
      max IPTT.
      
      Previously (for 4K pages case), it would be 32MB (for all slots
      allocated).
      
      With this change, the relative increase of IOPS for bs=4K read when
      PAGE_SIZE=4K and PAGE_SIZE=64K is as follows:
          IODEPTH     4K PAGE_SIZE      64K PAGE_SIZE
          32          56%               47%
          64          53%               44%
          128         64%               43%
          256         67%               45%
      Signed-off-by: NXiang Chen <chenxiang66@hisilicon.com>
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      2ba5afb6
    • X
      scsi: hisi_sas: Fix the conflict between dev gone and host reset · d2fc401e
      Xiaofei Tan 提交于
      There is a possible conflict when a device is removed and host reset occurs
      concurrently.
      
      The reason is that then the device is notified as gone, we try to clear the
      ITCT, which is notified via an interrupt. The dev gone function pends on
      this event with a completion, which is completed when the ITCT interrupt
      occurs.
      
      But host reset will disable all interrupts, the wait_for_completion() may
      wait indefinitely.
      
      This patch adds an semaphore to synchronise this two processes. The
      semaphore is taken by the host reset as the basis of synchronising.
      Signed-off-by: NXiaofei Tan <tanxiaofei@huawei.com>
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      d2fc401e
  17. 29 5月, 2018 4 次提交