1. 19 6月, 2018 1 次提交
  2. 12 5月, 2018 1 次提交
  3. 27 4月, 2018 1 次提交
    • E
      libahci: Allow drivers to override stop_engine · fa89f53b
      Evan Wang 提交于
      Marvell armada37xx, armada7k and armada8k share the same
      AHCI sata controller IP, and currently there is an issue
      (Errata Ref#226)that the SATA can not be detected via SATA
      Port-MultiPlayer(PMP). After debugging, the reason is
      found that the value of Port-x FIS-based Switching Control
      (PxFBS@0x40) became wrong.
      According to design, the bits[11:8, 0] of register PxFBS
      are cleared when Port Command and Status (0x18) bit[0]
      changes its value from 1 to 0, i.e. falling edge of Port
      Command and Status bit[0] sends PULSE that resets PxFBS
      bits[11:8; 0].
      So it needs save the port PxFBS register before PxCMD
      ST write and restore the port PxFBS register afterwards
      in ahci_stop_engine().
      
      This commit allows drivers to override ahci_stop_engine
      behavior for use by the Marvell AHCI driver(and potentially
      other drivers in the future).
      Signed-off-by: NEvan Wang <xswang@marvell.com>
      Cc: Ofer Heifetz <oferh@marvell.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      fa89f53b
  4. 13 2月, 2018 1 次提交
  5. 20 10月, 2017 1 次提交
  6. 23 6月, 2017 2 次提交
  7. 13 6月, 2017 1 次提交
  8. 16 5月, 2017 2 次提交
  9. 31 1月, 2017 1 次提交
  10. 20 10月, 2016 1 次提交
  11. 07 9月, 2016 1 次提交
    • C
      ahci: use pci_alloc_irq_vectors · 0b9e2988
      Christoph Hellwig 提交于
      Use the new pci_alloc_irq_vectors API to allocate MSI-X and MSI vectors.
      The big advantage over the old code is that we can use the same API for
      MSI and MSI-X, and that we don't need to store the MSI-X vector mapping
      in driver-private data structures.
      
      This first conversion keeps the probe order as-is: MSI-X multi vector,
      MSI multi vector, MSI single vector, MSI-X single vector and last a
      single least legacy interrupt line.  There is one small change of
      behavior: we now check the "MSI Revert to Single Message" flag for
      MSI-X in addition to MSI.
      
      Because the API to find the Linux IRQ number for a MSI/MSI-X vector
      is PCI specific, but libahaci is bus-agnostic I had to a
      get_irq_vector function pointer to struct ahci_host_priv.  The
      alternative would be to move the multi-vector case of ahci_host_activate
      to ahci.c and just call ata_host_activate directly from the others
      users of ahci_host_activate.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      0b9e2988
  12. 12 8月, 2016 2 次提交
  13. 20 7月, 2016 1 次提交
    • P
      AHCI: Clear GHC.IS to prevent unexpectly asserting INTx · 0516900a
      Pang Raymond 提交于
      Due to PCI subsystem behaviour, unloading AHCI driver will disable
      MSI and enable INTx. When HBA supports MSIx or Multiple MSI, Driver's
      irq handler doesn't clear GHC.IS register. It works well when reading or
      writing data and GHC.IS is always non-zero. But when unloading driver
      (or any other operation which causes disable MSIx and enable INTx), PCI
       subsystem uses config write(Rx04.bit10) to enable INTx. Because
      GHC.IS is non-zero, HBA will falsely assume some port needs interrupt
      service. Then it asserts INTx. To make things worse, when AHCI controller
      shares the same interrupt pin with other PCI device, that PCI device's ISR
      will be called and nobody de-asserts previous INTx.
      This patch clears GHC.IS in ahci_port_stop() even when using MSIx or
      MMSI to prevent this case. It ensures GHC.IS is zero before PCI subsystem
      enables INTx.
      
      tj: Minor updates to the comment.
      Signed-off-by: NRaymond Pang <raymond_rule@hotmail.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      0516900a
  14. 14 7月, 2016 1 次提交
  15. 01 4月, 2016 1 次提交
  16. 31 3月, 2016 1 次提交
  17. 01 3月, 2016 1 次提交
  18. 19 2月, 2016 2 次提交
  19. 11 2月, 2016 2 次提交
  20. 26 1月, 2016 2 次提交
    • T
      libata: disable forced PORTS_IMPL for >= AHCI 1.3 · 566d1827
      Tejun Heo 提交于
      Some early controllers incorrectly reported zero ports in PORTS_IMPL
      register and the ahci driver fabricates PORTS_IMPL from the number of
      ports in those cases.  This hasn't mattered but with the new nvme
      controllers there are cases where zero PORTS_IMPL is valid and should
      be honored.
      
      Disable the workaround for >= AHCI 1.3.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NAndy Lutomirski <luto@amacapital.net>
      Link: http://lkml.kernel.org/g/CALCETrU7yMvXEDhjAUShoHEhDwifJGapdw--BKxsP0jmjKGmRw@mail.gmail.com
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Cc: stable@vger.kernel.org
      566d1827
    • D
      drivers: ata: wake port before DMA stop for ALPM · fb329633
      Danesh Petigara 提交于
      The AHCI driver code stops and starts port DMA engines at will
      without considering the power state of the particular port. The
      AHCI specification isn't very clear on how to handle this scenario,
      leaving implementation open to interpretation.
      
      Broadcom's STB SATA host controller is unable to handle port DMA
      controller restarts when the port in question is in low power mode.
      When a port enters partial or slumber mode, its PHY is powered down.
      When a controller restart is requested, the controller's internal
      state machine expects the PHY to be brought back up by software which
      never happens in this case, resulting in failures.
      
      To avoid this situation, logic is added to manually wake up the port
      just before its DMA engine is stopped, if the port happens to be in
      a low power state. HBA initiated power management ensures that the port
      eventually returns to its configured low power state, when the link is
      idle (as per the conditions listed in the spec). A new host flag is also
      added to ensure this logic is only exercised for hosts with the above
      limitation.
      
      tj: Formatting changes.
      Signed-off-by: NDanesh Petigara <dpetigara@broadcom.com>
      Reviewed-by: NMarkus Mayer <mmayer@broadcom.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      fb329633
  21. 07 12月, 2015 1 次提交
  22. 30 11月, 2015 1 次提交
    • X
      AHCI: Fix softreset failed issue of Port Multiplier · 023113d2
      Xiangliang Yu 提交于
      Current code doesn't update port value of Port Multiplier(PM) when
      sending FIS of softreset to device, command will fail if FBS is
      enabled.
      
      There are two ways to fix the issue: the first is to disable FBS
      before sending softreset command to PM device and the second is
      to update port value of PM when sending command.
      
      For the first way, i can't find any related rule in AHCI Spec. The
      second way can avoid disabling FBS and has better performance.
      Signed-off-by: NXiangliang Yu <Xiangliang.Yu@amd.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      023113d2
  23. 17 11月, 2015 2 次提交
  24. 31 10月, 2015 2 次提交
  25. 01 10月, 2015 1 次提交
    • M
      ata: ahci: find eSATA ports and flag them as removable · 8a3e33cf
      Manuel Lauss 提交于
      If the AHCI ports' HPCP or ESP bits are set, the port
      should be considered external (e.g. eSATA) and is marked
      as removable.  Userspace tools like udisks then treat it
      like an usb drive.
      
      With this patch applied, when I plug a drive into the esata port,
      KDE pops up a window asking what to do with the drives(s), just
      like it does for any random USB stick.
      
      Removability is indicated to the upper layers by way of the
      SCSI RMB bit, as I haven't found another way to signal
      userspace to treat a sata disk like any usb stick.
      Signed-off-by: NManuel Lauss <manuel.lauss@gmail.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      8a3e33cf
  26. 03 6月, 2015 1 次提交
    • R
      ahci: Store irq number in struct ahci_host_priv · 21bfd1aa
      Robert Richter 提交于
      Currently, ahci supports only msi and intx. To also support msix the
      handling of the irq number need to be changed. The irq number for msix
      devices is taken from msi_list instead of pci_dev. Thus, the irq
      number of a device needs to be stored in struct ahci_host_priv now.
      This allows the host controller to be activated in a generic way.
      
      This change is only intended for ahci drivers. For that reason the irq
      number is stored in struct ahci_host_priv used only by ahci drivers.
      Thus, the ABI changes only for ahci_host_activate(), but existing ata
      drivers (about 50) are unaffected and keep unchanged. All users of
      ahci_host_activate() have been updated.
      
      While touching drivers/ata/libahci.c, doing a small code cleanup in
      ahci_port_start().
      Signed-off-by: NRobert Richter <rrichter@cavium.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      21bfd1aa
  27. 10 5月, 2015 2 次提交
  28. 26 4月, 2015 1 次提交
  29. 10 1月, 2015 1 次提交
  30. 28 10月, 2014 2 次提交