1. 17 11月, 2015 1 次提交
    • D
      ahci: per-port msix support · d684a90d
      Dan Williams 提交于
      Some AHCI controllers support per-port MSI-X vectors.  At the same time
      the Linux AHCI driver needs to support one-off architectures that
      implement a single MSI-X vector for all ports.  The heuristic for
      enabling AHCI ports becomes, in order of preference:
      
      1/ per-port multi-MSI-X
      
      2/ per-port multi-MSI
      
      3/ single MSI
      
      4/ single MSI-X
      
      5/ legacy INTX
      
      This all depends on AHCI implementations with potentially broken MSI-X
      requesting less vectors than the number of ports.  If this assumption is
      violated we will need to start explicitly white-listing AHCI-MSIX
      implementations.
      Reported-by: NRicardo Neri <ricardo.neri@intel.com>
      [ricardo: fix struct msix_entry handling]
      Reported-by: Nkernel test robot <ying.huang@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      d684a90d
  2. 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
  3. 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
  4. 10 5月, 2015 1 次提交
  5. 29 1月, 2015 1 次提交
    • A
      ata: ahci_platform: fix owner module reference mismatch for scsi host · 018d5ef2
      Akinobu Mita 提交于
      The owner module reference of the ahci platform's scsi_host is
      initialized to libahci_platform's one, because these drivers use a
      scsi_host_template defined in libahci_platform.  So these drivers can
      be unloaded even if the scsi device is being accessed.
      
      This fixes it by pushing the scsi_host_template from libahci_platform
      to all leaf drivers.  The scsi_host_template is passed through a new
      argument of ahci_platform_init_host().
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: linux-ide@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      018d5ef2
  6. 19 1月, 2015 1 次提交
    • G
      ata: libahci: Allow using multiple regulators · c7d7ddee
      Gregory CLEMENT 提交于
      The current implementation of the libahci allows using multiple PHYs
      but not multiple regulators. This patch adds the support of multiple
      regulators. Until now it was mandatory to have a PHY under a subnode,
      now a port subnode can contain either a regulator or a PHY (or both).
      
      In order to be able to asociate a port with a regulator the port are
      now a platform device in the device tree case.
      
      There was only one driver which used directly the regulator field of
      the ahci_host_priv structure. To preserve the bisectability the change
      in the ahci_imx driver was done in the same patch.
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Acked-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      c7d7ddee
  7. 06 10月, 2014 3 次提交
  8. 28 9月, 2014 1 次提交
  9. 23 9月, 2014 1 次提交
  10. 31 7月, 2014 2 次提交
  11. 19 7月, 2014 1 次提交
  12. 08 7月, 2014 1 次提交
  13. 15 5月, 2014 1 次提交
  14. 24 4月, 2014 1 次提交
  15. 17 4月, 2014 1 次提交
    • A
      ahci: Ensure "MSI Revert to Single Message" mode is not enforced · ab0f9e78
      Alexander Gordeev 提交于
      The AHCI specification allows hardware to choose to revert to
      single MSI mode when fewer messages are allocated than requested.
      Yet, at least ICH10 chipset reverts to single MSI mode even when
      enough messages are allocated in some cases (see below).
      
      This update forces the driver to not rely on initialization of
      multiple MSIs mode alone and always check if "MSI Revert to
      Single Message" (MRSM) mode was enforced by the controller and
      fallback to the single MSI mode in case it did.
      
      That prevents a situation when the driver configured multiple
      per-port IRQ handlers, but the controller sends all port's
      interrupts to a single IRQ, which could easily screw up the
      interrupt handling and lead to delays and possibly crashes.
      
      The fix was tested on a 6-port controller that successfully
      reverted to the single MSI mode:
      
      00:1f.2 SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA
      AHCI Controller (prog-if 01 [AHCI 1.0])
      	Subsystem: Super Micro Computer Inc Device 10a7
      	Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 101
      	I/O ports at f110 [size=8]
      	I/O ports at f100 [size=4]
      	I/O ports at f0f0 [size=8]
      	I/O ports at f0e0 [size=4]
      	I/O ports at f020 [size=32]
      	Memory at fbf00000 (32-bit, non-prefetchable) [size=2K]
      	Capabilities: [80] MSI: Enable+ Count=1/16 Maskable- 64bit-
      	Capabilities: [70] Power Management version 3
      	Capabilities: [a8] SATA HBA v1.0
      	Capabilities: [b0] PCI Advanced Features
      	Kernel driver in use: ahci
      
      With 6 ports just 8 MSI vectors should be enough, but the adapter
      enforces the MRSM mode when less than 16 vectors are written to
      the Multiple Messages Enable PCI register. I instigated MRSM mode
      by forcing @nvec to 8 in ahci_init_interrupts().
      Signed-off-by: NAlexander Gordeev <agordeev@redhat.com>
      Cc: linux-ide@vger.kernel.org
      Cc: stable@vger.kernel.org
      Signed-off-by: NTejun Heo <tj@kernel.org>
      ab0f9e78
  16. 23 2月, 2014 5 次提交
  17. 15 10月, 2013 1 次提交
    • R
      ahci: imx: setup power saving methods · 8b789d89
      Richard Zhu 提交于
      In order to save power consumption as much as possible.
      
      * Disable sata phy internal pll reference clock when sysetem enter
        into suspend mode, enable it after resume.
      
      * Setup module parameter used to enable imx ahci test power down
        mode(PDDQ) or not, when there is no device detected on the port
      
      * minor modifications:
        - The format of the copyright is changed, because that the original
          one can't pass fsl internal patch reivew without the character
          '(c)'.
        - Exports ahci_platform_ops and ahci_error_handler().
      
      NOTE:
      * The hot-plug can't be supported when PDDQ mode is ever enabled.
      
      * module parameter usage how-to:
        - default: enable PDDQ mode when no device detected.
        - add "ahci-imx.hotplug=1" into kernel command line if your don't
          want to enable PDDQ mode when no device detected on the port.
      
      tj: Slightly updated description and comments.
      Signed-off-by: NRichard Zhu <r65037@freescale.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      8b789d89
  18. 07 6月, 2013 1 次提交
  19. 22 5月, 2013 1 次提交
  20. 15 5月, 2013 1 次提交
  21. 25 1月, 2013 1 次提交
    • A
      AHCI: Support multiple MSIs · 5ca72c4f
      Alexander Gordeev 提交于
      Take advantage of multiple MSIs implementation on x86 - on
      systems with IRQ remapping AHCI ports not only get assigned
      separate MSI vectors - but also separate IRQs. As result,
      interrupts generated by different ports could be serviced on
      different CPUs rather than on a single one.
      
      In cases when number of allocated MSIs is less than requested
      the Sharing Last MSI mode does not get used, no matter
      implemented in hardware or not. Instead, the driver assumes the
      advantage of multiple MSIs is negated and falls back to the
      single MSI mode as if MRSM bit was set (some Intel chips
      implement this strategy anyway - MRSM bit gets set even if the
      number of allocated MSIs exceeds the number of implemented ports).
      Signed-off-by: NAlexander Gordeev <agordeev@redhat.com>
      Acked-by: NJeff Garzik <jgarzik@redhat.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/15bf7ee314dd55f21ec7d2a01c47613cd8190a7c.1353324359.git.agordeev@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      5ca72c4f
  22. 13 9月, 2012 2 次提交
  23. 18 8月, 2012 1 次提交
  24. 14 3月, 2012 2 次提交
  25. 24 7月, 2011 1 次提交
  26. 24 4月, 2011 1 次提交
  27. 31 3月, 2011 1 次提交
  28. 02 3月, 2011 3 次提交
  29. 06 1月, 2011 1 次提交