24 Jul, 2011

1 commit


24 Apr, 2011

1 commit


31 Mar, 2011

1 commit


02 Mar, 2011

3 commits

  • Commit 6b7ae9545ad9875a289f4191c0216b473e313cb9 (libata: reimplement link power
    management) removed the check of ATA_FLAG_LPM but neglected to remove the flag
    itself. Do it now...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • All checks of ATA_FLAG_NO_LEGACY have been removed by the commits
    c791c30670ea61f19eec390124128bf278e854fe ([libata] minor PCI IDE probe
    fixes and cleanups) and f0d36efdc624beb3d9e29b9ab9e9537bf0f25d5b (libata:
    update libata core layer to use devres), so I think it's time to finally
    get rid of this flag...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Commit 0d5ff566779f894ca9937231a181eb31e4adff0e (libata: convert to iomap)
    removed all checks of ATA_FLAG_MMIO but neglected to remove the flag itself.
    Do it now, at last...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     

06 Jan, 2011

1 commit


22 Oct, 2010

3 commits

  • 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: Tejun Heo
    Reported-by: Mark Lord
    Cc: Robert Hancock
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik

    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: Tejun Heo
    Signed-off-by: Jeff Garzik

    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: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

29 Sep, 2010

1 commit

  • libata depends on scsi_host_template for module reference counting and
    sht's should be owned by each low level driver. During libahci split,
    the sht was left with libahci.ko leaving the actual low level drivers
    not reference counted. This made ahci and ahci_platform always
    unloadable even while they're being actively used.

    Fix it by defining AHCI_SHT() macro in ahci.h and defining a sht for
    each low level ahci driver.

    stable: only applicable to 2.6.35.

    Signed-off-by: Tejun Heo
    Reported-by: Pedro Francisco
    Tested-by: Michael Tokarev
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

26 Aug, 2010

1 commit


15 May, 2010

4 commits

  • Add "em_buffer" attribute for SATA AHCI hosts to provide a way for
    userland to access AHCI EM (enclosure management) buffer directly if the
    host supports EM.

    AHCI driver should support SGPIO EM messages. However the SATA/AHCI
    specs did not define the SGPIO message format filled in EM buffer.
    Different HW vendors may have different definitions. The mainly purpose
    of this attribute is to solve this issue by allowing HW vendors to
    provide userland drivers and tools for their SGPIO initiators.

    Signed-off-by: Harry Zhang
    Signed-off-by: Jeff Garzik

    Harry Zhang
     
  • Detect enclosure management message type automatically at driver
    initialization, instead of using module parameter "ahci_em_messages".

    Signed-off-by: Harry Zhang
    Signed-off-by: Jeff Garzik

    Harry Zhang
     
  • It turns out different generations of MCPs have differing quirks.

    * MCP 65-73 : FPDMA AA broken, lies about PMP support, forgets to report NCQ
    * MCP 77-79 : FPDMA AA broken, lies about PMP support
    * MCP 89 : FPDMA AA broken

    Instead of turngin off FPDMA AA on all NVIDIAs, implement
    HFLAG_NO_FPDMA_AA, define additional board IDs and apply necessary
    quirks.

    This fixes bko#15481 and the list of quirks is verified by Peer Chen.

    http://bugzilla.kernel.org/show_bug.cgi?id=15481

    Signed-off-by: Tejun Heo
    Cc: Peer Chen
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • This patch should contain no functional changes, just moves code
    around.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Jeff Garzik

    Anton Vorontsov