1. 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
  2. 23 9月, 2013 1 次提交
  3. 25 6月, 2013 1 次提交
  4. 10 6月, 2013 1 次提交
  5. 07 6月, 2013 1 次提交
  6. 22 5月, 2013 1 次提交
  7. 15 5月, 2013 1 次提交
  8. 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
  9. 15 1月, 2013 1 次提交
  10. 14 12月, 2012 1 次提交
  11. 13 9月, 2012 1 次提交
    • S
      ahci: implement aggressive SATA device sleep support · 65fe1f0f
      Shane Huang 提交于
      Device Sleep is a feature as described in AHCI 1.3.1 Technical Proposal.
      This feature enables an HBA and SATA storage device to enter the DevSleep
      interface state, enabling lower power SATA-based systems.
      
      Aggressive Device Sleep enables the HBA to assert the DEVSLP signal as
      soon as there are no commands outstanding to the device and the port
      specific Device Sleep idle timer has expired. This enables autonomous
      entry into the DevSleep interface state without waiting for software
      in power sensitive systems.
      
      This patch enables Aggressive Device Sleep only if both host controller
      and device support it.
      
      Tested on AMD reference board together with Device Sleep supported device
      sample.
      Signed-off-by: NShane Huang <shane.huang@amd.com>
      Reviewed-by: NAaron Lu <aaron.lwe@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      65fe1f0f
  12. 18 8月, 2012 1 次提交
  13. 14 3月, 2012 1 次提交
    • B
      ahci: add AHCI_HFLAG_DELAY_ENGINE host flag · 66583c9f
      Brian Norris 提交于
      The following commit was intended to fix problems with specific AHCI
      controller(s) that would become bricks if the AHCI specification was not
      followed strictly (that is, if ahci_start_engine() was called while the
      controller was in the wrong state):
      
          commit 7faa33da
          ahci: start engine only during soft/hard resets
      
      However, some devices currently have issues with that fix, so we must
      implement a flag that delays the ahci_start_engine() call only for specific
      controllers.
      
      This commit simply introduces the flag, without enabling it in any driver.
      
      Note that even when AHCI_HFLAG_DELAY_ENGINE is not enabled, this patch does
      not constitue a full revert to commit 7faa33da; there is still a change in
      behavior to the ahci_port_suspend() failure path.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Cc: stable@kernel.org
      66583c9f
  14. 09 1月, 2012 1 次提交
    • T
      ahci: start engine only during soft/hard resets · 7faa33da
      Tejun Heo 提交于
      This is another attempt at fixing the same problem that 270dac35
      (libata: ahci_start_engine compliant to AHCI spec) tried to solve.
      Unfortunately, 270dac35 created regressions for a lot more common
      controllers and got reverted.
      
      This specific AHCI IP block becomes a brick if the DMA engine is
      started while DRQ is set.  It is not possible to avoid the condition
      completely but the most common occurrence is caused by spurious use of
      ahci_start_engine() from ahci_start_port() during init sequence.
      
      DMA engine is started after both soft and hard resets and
      ahci_start_port() is always followed by resets, so there is no reason
      to start DMA engine from ahci_start_port().
      
      This patch removes ahci_start_engine() invocation from
      ahci_start_port().  This change makes failure path of
      ahci_port_suspend() leave engine stopped without following resets.
      This is resolved by replacing ahci_start_port() call with
      ata_port_freeze() which forces resets afterwards, which is the better
      behavior anyway.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NBrian Norris <computersforpeace@gmail.com>
      Reported-by: NJian Peng <jipeng2005@gmail.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      7faa33da
  15. 24 7月, 2011 3 次提交
    • Y
      ahci: move ahci_sb600_softreset to libahci.c and rename it · 345347c5
      Yuan-Hsin Chen 提交于
      ahci_sb600_softreset was in ahci.c. This function is used
      to fix soft reset failure and renames as ahci_pmp_retry_softreset
      in libahci.c.
      Signed-off-by: NYuan-Hsin Chen <yhchen@faraday-tech.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      345347c5
    • J
      ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level> · a9a79dfe
      Joe Perches 提交于
      Saves text by removing nearly duplicated text format strings by
      creating ata_<foo>_printk functions and printf extension %pV.
      
      ata defconfig size shrinks ~5% (~8KB), allyesconfig ~2.5% (~13KB)
      
      Format string duplication comes from:
      
       #define ata_link_printk(link, lv, fmt, args...) do { \
             if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link)    \
                     printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id,   \
                            (link)->pmp , ##args); \
             else \
                     printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
             } while(0)
      
      Coalesce long formats.
      
      $ size drivers/ata/built-in.*
         text	   data	    bss	    dec	    hex	filename
       544969	  73893	 116584	 735446	  b38d6	drivers/ata/built-in.allyesconfig.ata.o
       558429	  73893	 117864	 750186	  b726a	drivers/ata/built-in.allyesconfig.dev_level.o
       141328	  14689	   4220	 160237	  271ed	drivers/ata/built-in.defconfig.ata.o
       149567	  14689	   4220	 168476	  2921c	drivers/ata/built-in.defconfig.dev_level.o
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      a9a79dfe
    • J
      ata: Convert dev_printk(KERN_<LEVEL> to dev_<level>( · a44fec1f
      Joe Perches 提交于
      Saves a bit of text as the call takes fewer args.
      
      Coalesce a few formats.
      Convert a few bare printks to pr_cont.
      
      $ size drivers/ata/built-in.o*
         text	   data	    bss	    dec	    hex	filename
       558429	  73893	 117864	 750186	  b726a	drivers/ata/built-in.o.allyesconfig.new
       559574	  73893	 117888	 751355	  b76fb	drivers/ata/built-in.o.allyesconfig.old
       149567	  14689	   4220	 168476	  2921c	drivers/ata/built-in.o.defconfig.new
       149851	  14689	   4220	 168760	  29338	drivers/ata/built-in.o.defconfig.old
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      a44fec1f
  16. 30 6月, 2011 1 次提交
    • L
      ahci: change 'masking port_map' printk to KERN_WARNING level · 49743170
      Linus Torvalds 提交于
      It's not so much an error as a warning about normal Marvell crazines.
      So don't use KERN_ERR that ends up spamming the console even in quiet
      mode, it's not _that_ critical.
      
      Explained by Jeff:
      
       "Long explanation, it's a mess:
      
        Marvell took standard AHCI, and bastardized it to include a weird mode
        whereby PATA devices appear inside the AHCI DMA and interrupt
        infrastructure you're familiar with.
      
        So, PATA devices appear via pata_marvell driver, using basic legacy
        IDE programming interface.  But SATA devices, which might also be
        attached to this chip, either work in under-performing mode or
        simply don't work at all (e.g.  newer 6 Gbps devices or port
        multiplier attachments, NCQ, ...)
      
        On the other hand, 'ahci' driver loads and works with the chip's
        attached SATA devices quite beautifully, but is completely unable to
        drive any attached PATA devices, due to the Marvell-specific
        PATA-under-AHCI interface.
      
        The "masking port_map 0x7 -> 0x3" message is the ahci driver "hiding"
        the PATA port(s) from itself, making sure it will only drive the SATA
        ports it knows how to drive."
      Acked-by: NJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      49743170
  17. 15 5月, 2011 1 次提交
  18. 24 4月, 2011 3 次提交
  19. 06 1月, 2011 1 次提交
  20. 22 10月, 2010 4 次提交
    • T
      libahci: fix result_tf handling after an ATA PIO data-in command · 6ad60195
      Tejun Heo 提交于
      ATA devices don't send D2H Reg FIS after an successful ATA PIO data-in
      command.  The host is supposed to take the TF and E_Status of the
      preceding PIO Setup FIS.  Update ahci_qc_fill_rtf() such that it takes
      TF + E_Status from PIO Setup FIS after a successful ATA PIO data-in
      command.
      
      Without this patch, result_tf for such a command is filled with the
      content of the previous D2H Reg FIS which belongs to a previous
      command, which can make the command incorrectly seen as failed.
      
      * Patch updated to grab the whole TF + E_Status from PIO Setup FIS
        instead of just E_Status as suggested by Robert Hancock.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NMark Lord <kernel@teksavvy.com>
      Cc: Robert Hancock <hancockrwd@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6ad60195
    • T
      libata: add @ap to ata_wait_register() and introduce ata_msleep() · 97750ceb
      Tejun Heo 提交于
      Add optional @ap argument to ata_wait_register() and replace msleep()
      calls with ata_msleep() which take optional @ap in addition to the
      duration.  These will be used to implement EH exclusion.
      
      This patch doesn't cause any behavior difference.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      97750ceb
    • T
      libata: reimplement link power management · 6b7ae954
      Tejun Heo 提交于
      The current LPM implementation has the following issues.
      
      * Operation order isn't well thought-out.  e.g. HIPM should be
        configured after IPM in SControl is properly configured.  Not the
        other way around.
      
      * Suspend/resume paths call ata_lpm_enable/disable() which must only
        be called from EH context directly.  Also, ata_lpm_enable/disable()
        were called whether LPM was in use or not.
      
      * Implementation is per-port when it should be per-link.  As a result,
        it can't be used for controllers with slave links or PMP.
      
      * LPM state isn't managed consistently.  After a link reset for
        whatever reason including suspend/resume the actual LPM state would
        be reset leaving ap->lpm_policy inconsistent.
      
      * Generic/driver-specific logic boundary isn't clear.  Currently,
        libahci has to mangle stuff which libata EH proper should be
        handling.  This makes the implementation unnecessarily complex and
        fragile.
      
      * Tied to ALPM.  Doesn't consider DIPM only cases and doesn't check
        whether the device allows HIPM.
      
      * Error handling isn't implemented.
      
      Given the extent of mismatch with the rest of libata, I don't think
      trying to fix it piecewise makes much sense.  This patch reimplements
      LPM support.
      
      * The new implementation is per-link.  The target policy is still
        port-wide (ap->target_lpm_policy) but all the mechanisms and states
        are per-link and integrate well with the rest of link abstraction
        and can work with slave and PMP links.
      
      * Core EH has proper control of LPM state.  LPM state is reconfigured
        when and only when reconfiguration is necessary.  It makes sure that
        LPM state is reset when probing for new device on the link.
        Controller agnostic logic is now implemented in libata EH proper and
        driver implementation only has to deal with controller specifics.
      
      * Proper error handling.  LPM config failure is attributed to the
        device on the link and LPM is disabled for the link if it fails
        repeatedly.
      
      * ops->enable/disable_pm() are replaced with single ops->set_lpm()
        which takes @policy and @hints.  This simplifies driver specific
        implementation.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6b7ae954
    • T
      libata: clean up lpm related symbols and sysfs show/store functions · c93b263e
      Tejun Heo 提交于
      Link power management related symbols are in confusing state w/ mixed
      usages of lpm, ipm and pm.  This patch cleans up lpm related symbols
      and sysfs show/store functions as follows.
      
      * lpm states - NOT_AVAILABLE, MIN_POWER, MAX_PERFORMANCE and
        MEDIUM_POWER are renamed to ATA_LPM_UNKNOWN and
        ATA_LPM_{MIN|MAX|MED}_POWER.
      
      * Pre/postfixes are unified to lpm.
      
      * sysfs show/store functions for link_power_management_policy were
        curiously named get/put and unnecessarily complex.  Renamed to
        show/store and simplified.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c93b263e
  21. 29 9月, 2010 1 次提交
  22. 10 9月, 2010 1 次提交
  23. 26 8月, 2010 1 次提交
  24. 02 7月, 2010 1 次提交
  25. 08 6月, 2010 1 次提交
  26. 15 5月, 2010 8 次提交