1. 20 6月, 2022 1 次提交
  2. 17 6月, 2022 1 次提交
    • S
      ata: make transfer mode masks *unsigned int* · f0a6d77b
      Sergey Shtylyov 提交于
      The packed transfer mode masks and also the {pio|mwdma|udma}_mask fields
      of *struct*s ata_device and ata_port_info are declared as *unsigned long*
      (which is a 64-bit type on 64-bit architectures) but actually the packed
      masks occupy only 20 bits (7 PIO modes, 5 MWDMA modes, and 8 UDMA modes)
      and the PIO/MWDMA/UDMA masks easily fit into just 8 bits each, so we can
      safely use (always 32-bit) *unsigned int* variables instead.  This saves
      745 bytes of object code in libata-core.o alone, not to mention LLDDs...
      Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru>
      Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
      f0a6d77b
  3. 06 6月, 2022 1 次提交
  4. 12 4月, 2022 1 次提交
  5. 11 4月, 2022 1 次提交
    • J
      libata: Improve ATA queued command allocation · 4f1a22ee
      John Garry 提交于
      Improve ATA queued command allocation as follows:
      
      - For attaining a qc tag for a SAS host we need to allocate a bit in
        ata_port.sas_tag_allocated bitmap.
      
        However we already have a unique tag per device in range
        [0, ATA_MAX_QUEUE -1] in the scsi cmnd budget token, so just use that
        instead.
      
      - It is a bit pointless to have ata_qc_new_init() in libata-core.c since it
        pokes scsi internals, so inline it in ata_scsi_qc_new() (in
        libata-scsi.c). Also update Doc accordingly.
      
      - Use standard SCSI helpers set_host_byte() and set_status_byte() in
        ata_scsi_qc_new().
      
      Christoph Hellwig originally contributed the change to inline
      ata_qc_new_init().
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
      4f1a22ee
  6. 20 2月, 2022 1 次提交
  7. 19 2月, 2022 1 次提交
  8. 04 2月, 2022 1 次提交
    • A
      ata: libata-core: Introduce ATA_HORKAGE_NO_LOG_DIR horkage · ac9f0c81
      Anton Lundin 提交于
      06f6c4c6 ("ata: libata: add missing ata_identify_page_supported() calls")
      introduced additional calls to ata_identify_page_supported(), thus also
      adding indirectly accesses to the device log directory log page through
      ata_log_supported(). Reading this log page causes SATADOM-ML 3ME devices
      to lock up.
      
      Introduce the horkage flag ATA_HORKAGE_NO_LOG_DIR to prevent accesses to
      the log directory in ata_log_supported() and add a blacklist entry
      with this flag for "SATADOM-ML 3ME" devices.
      
      Fixes: 636f6e2a ("libata: add horkage for missing Identify Device log")
      Cc: stable@vger.kernel.org # v5.10+
      Signed-off-by: NAnton Lundin <glance@acc.umu.se>
      Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
      ac9f0c81
  9. 14 1月, 2022 3 次提交
    • P
      ata: libata: Rename link flag ATA_LFLAG_NO_DB_DELAY · b9ba367c
      Paul Menzel 提交于
      Rename the link flag ATA_LFLAG_NO_DB_DELAY to
      ATA_LFLAG_NO_DEBOUNCE_DELAY. The new name is longer, but clearer.
      Signed-off-by: NPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
      b9ba367c
    • D
      ata: fix read_id() ata port operation interface · 0561e514
      Damien Le Moal 提交于
      Drivers that need to tweak a device IDENTIFY data implement the
      read_id() port operation. The IDENTIFY data buffer is passed as an
      argument to the read_id() operation for drivers to use. However, when
      this operation is called, the IDENTIFY data is not yet converted to CPU
      endian and contains le16 words.
      
      Change the interface of the read_id operation to pass a __le16 * pointer
      to the IDENTIFY data buffer to clarify the buffer endianness. Fix the
      pata_netcell, pata_it821x, ahci_xgene, ahci_ceva and ahci_brcm drivers
      implementation of this operation and modify the code to corretly deal
      with identify data words manipulation to avoid sparse warnings such as:
      
      drivers/ata/ahci_xgene.c:262:33: warning: invalid assignment: &=
      drivers/ata/ahci_xgene.c:262:33:    left side has type unsigned short
      drivers/ata/ahci_xgene.c:262:33:    right side has type restricted __le16
      Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      0561e514
    • D
      ata: sata_fsl: fix scsi host initialization · e5b48ee3
      Damien Le Moal 提交于
      When compiling with W=1, the sata_fsl driver compilation throws the
      warning:
      
      drivers/ata/sata_fsl.c:1385:22: error: initialized field overwritten
      [-Werror=override-init]
       1385 |         .can_queue = SATA_FSL_QUEUE_DEPTH,
      
      This is due to the driver scsi host template initialization overwriting
      the can_queue field that is already set using the ATA_NCQ_SHT()
      initializer macro, resulting in the same field being initialized twice
      in the host template declaration.
      
      To remove this warning, introduce the ATA_SUBBASE_SHT_QD() and
      ATA_NCQ_SHT_QD() initialization macros to allow specifying a queue depth
      different from the default ATA_DEF_QUEUE using an additional argument to
      the macro.
      Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      e5b48ee3
  10. 05 1月, 2022 10 次提交
  11. 04 1月, 2022 1 次提交
  12. 12 11月, 2021 1 次提交
    • D
      libata: add horkage for missing Identify Device log · 636f6e2a
      Damien Le Moal 提交于
      ACS-3 introduced the ATA Identify Device Data log as mandatory. A
      warning message currently signals to the user if a device does not
      report supporting this log page in the log directory page, regardless
      of the ATA version of the device. Furthermore, this warning will appear
      for all attempts at accessing this missing log page during device
      revalidation.
      
      Since it is useless to constantly access the log directory and warn
      about this lack of support once we have discovered that the device
      does not support this log page, introduce the horkage flag
      ATA_HORKAGE_NO_ID_DEV_LOG to mark a device as lacking support for
      the Identify Device Data log page. Set this flag when
      ata_log_supported() returns false in ata_identify_page_supported().
      The warning is printed only if the device ATA level is 10 or above
      (ACS-3 or above), and only once on device scan. With this flag set, the
      log directory page is not accessed again to test for Identify Device
      Data log page support.
      Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      636f6e2a
  13. 11 11月, 2021 1 次提交
    • D
      libata: fix read log timeout value · 68dbbe7d
      Damien Le Moal 提交于
      Some ATA drives are very slow to respond to READ_LOG_EXT and
      READ_LOG_DMA_EXT commands issued from ata_dev_configure() when the
      device is revalidated right after resuming a system or inserting the
      ATA adapter driver (e.g. ahci). The default 5s timeout
      (ATA_EH_CMD_DFL_TIMEOUT) used for these commands is too short, causing
      errors during the device configuration. Ex:
      
      ...
      ata9: SATA max UDMA/133 abar m524288@0x9d200000 port 0x9d200400 irq 209
      ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
      ata9.00: ATA-9: XXX  XXXXXXXXXXXXXXX, XXXXXXXX, max UDMA/133
      ata9.00: qc timeout (cmd 0x2f)
      ata9.00: Read log page 0x00 failed, Emask 0x4
      ata9.00: Read log page 0x00 failed, Emask 0x40
      ata9.00: NCQ Send/Recv Log not supported
      ata9.00: Read log page 0x08 failed, Emask 0x40
      ata9.00: 27344764928 sectors, multi 16: LBA48 NCQ (depth 32), AA
      ata9.00: Read log page 0x00 failed, Emask 0x40
      ata9.00: ATA Identify Device Log not supported
      ata9.00: failed to set xfermode (err_mask=0x40)
      ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
      ata9.00: configured for UDMA/133
      ...
      
      The timeout error causes a soft reset of the drive link, followed in
      most cases by a successful revalidation as that give enough time to the
      drive to become fully ready to quickly process the read log commands.
      However, in some cases, this also fails resulting in the device being
      dropped.
      
      Fix this by using adding the ata_eh_revalidate_timeouts entries for the
      READ_LOG_EXT and READ_LOG_DMA_EXT commands. This defines a timeout
      increased to 15s, retriable one time.
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
      68dbbe7d
  14. 27 10月, 2021 1 次提交
  15. 17 10月, 2021 1 次提交
  16. 03 9月, 2021 1 次提交
  17. 25 8月, 2021 1 次提交
  18. 18 8月, 2021 2 次提交
  19. 16 6月, 2021 1 次提交
  20. 03 9月, 2020 1 次提交
    • T
      libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks · 3b545563
      Tejun Heo 提交于
      All three generations of Sandisk SSDs lock up hard intermittently.
      Experiments showed that disabling NCQ lowered the failure rate significantly
      and the kernel has been disabling NCQ for some models of SD7's and 8's,
      which is obviously undesirable.
      
      Karthik worked with Sandisk to root cause the hard lockups to trim commands
      larger than 128M. This patch implements ATA_HORKAGE_MAX_TRIM_128M which
      limits max trim size to 128M and applies it to all three generations of
      Sandisk SSDs.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Karthik Shivaram <karthikgs@fb.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      3b545563
  21. 24 6月, 2020 1 次提交
  22. 18 6月, 2020 1 次提交
  23. 16 6月, 2020 2 次提交
  24. 23 4月, 2020 1 次提交
  25. 27 3月, 2020 3 次提交