03 Jun, 2015

1 commit

  • 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: Robert Richter
    Signed-off-by: Tejun Heo

    Robert Richter
     

03 Feb, 2015

1 commit

  • of_platform_device_create does not exist if OF_ADDRESS is not configured,
    so limit its use accordingly.

    Without this fix, the sparc64:allmodconfig build fails with

    ERROR: "of_platform_device_create" [drivers/ata/libahci_platform.ko] undefined!

    Fixes: c7d7ddee7e24 ("ata: libahci: Allow using multiple regulators")
    Cc: Gregory CLEMENT
    Signed-off-by: Guenter Roeck
    Signed-off-by: Tejun Heo

    Guenter Roeck
     

29 Jan, 2015

1 commit

  • 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: Akinobu Mita
    Signed-off-by: Tejun Heo
    Cc: Hans de Goede
    Cc: Christoph Hellwig
    Cc: "James E.J. Bottomley"
    Cc: linux-ide@vger.kernel.org
    Cc: linux-scsi@vger.kernel.org

    Akinobu Mita
     

22 Jan, 2015

1 commit

  • Commit c7d7ddee7e24 ("ata: libahci: Allow using multiple regulators")
    releases regulators during ahci_platform_put_resources(). That doesn't
    work because the function is run as part of the devres machinery. Such
    resources are torn down in reverse order. Since the array that holds
    pointers to the regulators is allocated using devres after the device
    context to which ahci_platform_put_resources() is attached, the memory
    will be freed before calling ahci_platform_put_resources() and thereby
    causing a use-after-free error.

    This commit fixes this by using regular allocations for the array. The
    memory can then be freed after the regulators have been released. This
    conserves the advantages of using the managed API.

    Reported-by: Paul Walmsley
    Signed-off-by: Thierry Reding
    Signed-off-by: Tejun Heo

    Thierry Reding
     

19 Jan, 2015

2 commits

  • 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: Gregory CLEMENT
    Acked-by: Hans de Goede
    Signed-off-by: Tejun Heo

    Gregory CLEMENT
     
  • The phy_ functions handle the NULL pointer case, so there is no need
    to skip them if there is a NULL pointer. Moreover, after the error
    label there is already no check on the pointer. This patch removes the
    unnecessary tests and brings some consistency.

    Signed-off-by: Gregory CLEMENT
    Acked-by: Hans de Goede
    Signed-off-by: Tejun Heo

    Gregory CLEMENT
     

06 Oct, 2014

1 commit


31 Aug, 2014

1 commit

  • ahci_platform_enable_phys() and ahci_platform_disable_phys() are currently
    exported, but they are not used anywhere else other than libahci_platform.c.

    So make them static and do not export them to fix the following sparse
    warnings:

    drivers/ata/libahci_platform.c:52:5: warning: symbol 'ahci_platform_enable_phys' was not declared. Should it be static?
    drivers/ata/libahci_platform.c:88:6: warning: symbol 'ahci_platform_disable_phys' was not declared. Should it be static?

    Signed-off-by: Fabio Estevam
    Signed-off-by: Tejun Heo

    Fabio Estevam
     

16 Aug, 2014

1 commit


01 Aug, 2014

1 commit

  • Commit 725c7b570fda (ata: libahci_platform: move port_map parameters
    into the AHCI structure) moves flags into the struct ahci_host_priv's
    .flags field, which causes compiler warnings on 64-bit builds when that
    value is cast to a void * pointer. Cast to an unsigned long so that the
    subsequent cast to a pointer doesn't produce a warning.

    Signed-off-by: Thierry Reding
    Signed-off-by: Tejun Heo

    Thierry Reding
     

31 Jul, 2014

3 commits

  • The current implementation of the libahci does not allow to use multiple
    PHYs. This patch adds the support of multiple PHYs by the libahci while
    keeping the old bindings valid for device tree compatibility.

    This introduce a new way of defining SATA ports in the device tree, with
    one port per sub-node. This as the advantage of allowing a per port
    configuration. Because some ports may be accessible but disabled in the
    device tree, the port_map mask is computed automatically when using
    this.

    Signed-off-by: Antoine Ténart
    Acked-by: Hans de Goede
    Acked-by: Kishon Vijay Abraham I
    Signed-off-by: Tejun Heo

    Antoine Ténart
     
  • This patch moves force_port_map and mask_port_map into the
    ahci_host_priv structure. This allows to modify them into the AHCI
    framework. This is needed by the new dt bindings representing ports as
    the port_map mask is computed automatically.

    Parameters modifying force_port_map, mask_port_map and flags have been
    removed from the ahci_platform_init_host() function, and inputs in the
    ahci_host_priv structure are now directly filed.

    Signed-off-by: Antoine Ténart
    Signed-off-by: Tejun Heo

    Antoine Ténart
     
  • …j/libata into for-3.17

    The scheduled ahci platform patches depend on change in
    for-3.16-fixes. Pull it into for-3.17.

    Signed-off-by: Tejun Heo <tj@kernel.org>

    Tejun Heo
     

18 Jun, 2014

2 commits

  • The current platform AHCI driver does not set the dma_mask correctly
    for 64-bit DMA capable AHCI controller. This patch checks the AHCI
    capability bit and set the dma_mask and coherent_dma_mask accordingly.

    Signed-off-by: Suravee Suthikulpanit
    Reviewed-by: Bartlomiej Zolnierkiewicz
    Reviewed-by: Hans de Goede
    Tested-by: Hans de Goede
    Tested-by: Suman Tripathi
    Signed-off-by: Tejun Heo

    Suravee Suthikulpanit
     
  • ahci_platform_get_resources handles resource management for
    platform AHCI drivers, including getting a possible PHY
    from the device tree. Since not all drivers need a PHY, it
    ignores -ENODEV and -ENOSYS from devm_get_phy. However, when
    the PHY subsystem is mistakenly disabled, -ENOSYS can be
    returned even when a PHY is needed.

    This patch modifies the -ENOSYS case to check if a "phys"
    device tree node exists. If it exists, then clearly the PHY
    subsystem is mistakenly disabled and the driver cannot work,
    ahci_platform_get_resources will fail and propagate the error.

    Signed-off-by: Mikko Perttunen
    Acked-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Tejun Heo

    Mikko Perttunen
     

15 May, 2014

1 commit


26 Mar, 2014

1 commit