09 Jan, 2012

1 commit


17 Nov, 2011

1 commit

  • The change in commit 904c04feaf13ed "ahci_platform: Add the board_ids..."
    doesn't work for the DT probing case as platform_get_device_id returns
    NULL. Pick the default ahci_port_info in this case.

    Signed-off-by: Rob Herring
    Acked-by: Anton Vorontsov
    Cc: Richard Zhu
    Cc: linux-ide@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Jeff Garzik

    Rob Herring
     

09 Nov, 2011

1 commit


04 Nov, 2011

1 commit


08 Oct, 2011

1 commit


22 Oct, 2010

2 commits

  • 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
     

02 Aug, 2010

2 commits

  • The driver is using platform_driver_probe() during initialization,
    so ahci_driver.probe hook is never used.

    But it causes the following (harmless, luckily) section mismatch:

    WARNING: vmlinux.o(.data+0x2fb20): Section mismatch in reference
    from the variable ahci_driver to the function .init.text:ahci_probe()

    This patch removes the ahci_driver.probe assignment, thus fixes
    the warning.

    p.s. Note that there's another patch[1] from Rene Bolldorf that
    tried to solve the same issue by __refdata annotation. __refdata
    says that this reference is actually OK, but in fact it is not OK,
    because dereferencing .probe() will cause problems. So the proper
    fix is to remove the assignment.

    [1] http://kerneltrap.org/mailarchive/linux-kernel/2010/3/18/4549547

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

    Anton Vorontsov
     
  • Some AHCI implementations may use Vendor Specific HBA[A0h, FFh]
    and/or Port[70h, 7Fh] registers to 'prepare' for initialization.
    For that, the platform needs memory mapped address of AHCI registers.

    This patch adds the 'mmio' argument and reorders the call to
    platform init function.

    Signed-off-by: Jassi Brar
    Signed-off-by: Jeff Garzik

    Jassi Brar
     

15 May, 2010

3 commits