An error occurred fetching the project authors.
  1. 02 Aug, 2024 1 commit
  2. 04 Jul, 2024 2 commits
  3. 30 Jun, 2024 1 commit
  4. 28 Mar, 2024 1 commit
    • Damien Le Moal's avatar
      scsi: libsas: Fix declaration of ncq priority attributes · 0ff10cb7
      Damien Le Moal authored
      Commit b4d3ddd2 ("scsi: libsas: Define NCQ Priority sysfs attributes
      for SATA devices") introduced support for ATA NCQ priority control for ATA
      devices managed by libsas. This commit introduces the ncq_prio_supported
      and ncq_prio_enable sysfs device attributes to discover and control the use
      of this features, similarly to libata.  However, libata publicly declares
      these device attributes and export them for use in ATA low level
      drivers. This leads to a compilation error when libsas and libata are
      built-in due to the double definition:
      
      ld: drivers/ata/libata-sata.o:/home/Linux/scsi/drivers/ata/libata-sata.c:900:
      multiple definition of `dev_attr_ncq_prio_supported';
      drivers/scsi/libsas/sas_ata.o:/home/Linux/scsi/drivers/scsi/libsas/sas_ata.c:984:
      first defined here
      ld: drivers/ata/libata-sata.o:/home/Linux/scsi/drivers/ata/libata-sata.c:1026:
      multiple definition of `dev_attr_ncq_prio_enable';
      drivers/scsi/libsas/sas_ata.o:/home/Linux/scsi/drivers/scsi/libsas/sas_ata.c:1022:
      first defined here
      
      Resolve this problem by directly declaring the libsas attributes instead of
      using the DEVICE_ATTR() macro. And for good measure, the device attribute
      variables are also renamed.
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Fixes: b4d3ddd2 ("scsi: libsas: Define NCQ Priority sysfs attributes for SATA devices")
      Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Link: https://lore.kernel.org/r/20240327020122.439424-1-dlemoal@kernel.orgReviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      0ff10cb7
  5. 25 Mar, 2024 1 commit
  6. 21 Aug, 2023 3 commits
  7. 02 Aug, 2023 4 commits
  8. 12 Jan, 2023 1 commit
  9. 07 Jan, 2023 1 commit
  10. 04 Jan, 2023 2 commits
    • Damien Le Moal's avatar
      ata: libata: simplify qc_fill_rtf port operation interface · 931139af
      Damien Le Moal authored
      The boolean return value of the qc_fill_rtf operation is used nowhere.
      Simplify this operation interface by making it a void function. All
      drivers defining this operation are also updated.
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Signed-off-by: default avatarNiklas Cassel <niklas.cassel@wdc.com>
      Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      931139af
    • Niklas Cassel's avatar
      ata: scsi: rename flag ATA_QCFLAG_FAILED to ATA_QCFLAG_EH · 87629312
      Niklas Cassel authored
      The name ATA_QCFLAG_FAILED is misleading since it does not mean that a
      QC completed in error, or that it didn't complete at all. It means that
      libata decided to schedule EH for the QC, so the QC is now owned by the
      libata error handler (EH).
      
      The normal execution path is responsible for not accessing a QC owned
      by EH. libata core enforces the rule by returning NULL from
      ata_qc_from_tag() for QCs owned by EH.
      
      It is quite easy to mistake that a QC marked with ATA_QCFLAG_FAILED was
      an error. However, a QC that was actually an error is instead indicated
      by having qc->err_mask set. E.g. when we have a NCQ error, we abort all
      QCs, which currently will mark all QCs as ATA_QCFLAG_FAILED. However, it
      will only be a single QC that is an error (i.e. has qc->err_mask set).
      
      Rename ATA_QCFLAG_FAILED to ATA_QCFLAG_EH to more clearly highlight that
      this flag simply means that a QC is now owned by EH. This new name will
      not mislead to think that the QC was an error (which is instead
      indicated by having qc->err_mask set).
      
      This also makes it more obvious that the EH code skips all QCs that do
      not have ATA_QCFLAG_EH set (rather than ATA_QCFLAG_FAILED), since the EH
      code should simply only care about QCs that are owned by EH itself.
      Signed-off-by: default avatarNiklas Cassel <niklas.cassel@wdc.com>
      Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      87629312
  11. 30 Dec, 2022 2 commits
  12. 26 Nov, 2022 2 commits
  13. 19 Oct, 2022 1 commit
  14. 18 Oct, 2022 2 commits
  15. 20 May, 2022 1 commit
  16. 23 Feb, 2022 3 commits
  17. 19 Feb, 2022 1 commit
  18. 11 Feb, 2022 2 commits
  19. 12 Aug, 2021 1 commit
  20. 21 Jul, 2021 1 commit
  21. 02 Jun, 2021 1 commit
  22. 08 Apr, 2021 1 commit
    • Jolly Shah's avatar
      scsi: libsas: Reset num_scatter if libata marks qc as NODATA · 176ddd89
      Jolly Shah authored
      When the cache_type for the SCSI device is changed, the SCSI layer issues a
      MODE_SELECT command. The caching mode details are communicated via a
      request buffer associated with the SCSI command with data direction set as
      DMA_TO_DEVICE (scsi_mode_select()). When this command reaches the libata
      layer, as a part of generic initial setup, libata layer sets up the
      scatterlist for the command using the SCSI command (ata_scsi_qc_new()).
      This command is then translated by the libata layer into
      ATA_CMD_SET_FEATURES (ata_scsi_mode_select_xlat()). The libata layer treats
      this as a non-data command (ata_mselect_caching()), since it only needs an
      ATA taskfile to pass the caching on/off information to the device. It does
      not need the scatterlist that has been setup, so it does not perform
      dma_map_sg() on the scatterlist (ata_qc_issue()). Unfortunately, when this
      command reaches the libsas layer (sas_ata_qc_issue()), libsas layer sees it
      as a non-data command with a scatterlist. It cannot extract the correct DMA
      length since the scatterlist has not been mapped with dma_map_sg() for a
      DMA operation. When this partially constructed SAS task reaches pm80xx
      LLDD, it results in the following warning:
      
      "pm80xx_chip_sata_req 6058: The sg list address
      start_addr=0x0000000000000000 data_len=0x0end_addr_high=0xffffffff
      end_addr_low=0xffffffff has crossed 4G boundary"
      
      Update libsas to handle ATA non-data commands separately so num_scatter and
      total_xfer_len remain 0.
      
      Link: https://lore.kernel.org/r/20210318225632.2481291-1-jollys@google.com
      Fixes: 53de092f ("scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA")
      Tested-by: default avatarLuo Jiaxing <luojiaxing@huawei.com>
      Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarJolly Shah <jollys@google.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      176ddd89
  23. 06 Apr, 2021 1 commit
  24. 23 Sep, 2020 1 commit
  25. 02 Sep, 2020 1 commit
  26. 23 Aug, 2020 1 commit
  27. 25 Jul, 2020 1 commit