Skip to content

Commit

Permalink
Merge tag 'libata-5.10-2020-10-12' of git://git.kernel.dk/linux-block
Browse files Browse the repository at this point in the history
Pull libata updates from Jens Axboe:
 "Nothing major in here, just fixes or improvements collected over the
  last few months"

* tag 'libata-5.10-2020-10-12' of git://git.kernel.dk/linux-block:
  ata: ahci: mvebu: Make SATA PHY optional for Armada 3720
  MAINTAINERS: remove LIBATA PATA DRIVERS entry
  pata_cmd64x: Use fallthrough pseudo-keyword
  ahci: qoriq: enable acpi support in qoriq ahci driver
  sata, highbank: simplify the return expression of ahci_highbank_suspend
  ahci: Add Intel Rocket Lake PCH-H RAID PCI IDs
  • Loading branch information
Linus Torvalds committed Oct 13, 2020
2 parents 6ad4bf6 + 45aefe3 commit 79ec6d9
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 21 deletions.
9 changes: 0 additions & 9 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -9882,15 +9882,6 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
F: drivers/ata/pata_arasan_cf.c
F: include/linux/pata_arasan_cf_data.h

LIBATA PATA DRIVERS
M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
M: Jens Axboe <axboe@kernel.dk>
L: linux-ide@vger.kernel.org
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
F: drivers/ata/ata_generic.c
F: drivers/ata/pata_*.c

LIBATA PATA FARADAY FTIDE010 AND GEMINI SATA BRIDGE DRIVERS
M: Linus Walleij <linus.walleij@linaro.org>
L: linux-ide@vger.kernel.org
Expand Down
4 changes: 4 additions & 0 deletions drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x1f3f), board_ahci_avn }, /* Avoton RAID */
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x43d4), board_ahci }, /* Rocket Lake PCH-H RAID */
{ PCI_VDEVICE(INTEL, 0x43d5), board_ahci }, /* Rocket Lake PCH-H RAID */
{ PCI_VDEVICE(INTEL, 0x43d6), board_ahci }, /* Rocket Lake PCH-H RAID */
{ PCI_VDEVICE(INTEL, 0x43d7), board_ahci }, /* Rocket Lake PCH-H RAID */
{ PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */
{ PCI_VDEVICE(INTEL, 0x8d04), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x8d06), board_ahci }, /* Wellsburg RAID */
Expand Down
2 changes: 2 additions & 0 deletions drivers/ata/ahci.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ enum {
as default lpm_policy */
AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during
suspend/resume */
AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = (1 << 27), /* ignore -EOPNOTSUPP
from phy_power_on() */

/* ap->flags bits */

Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/ahci_mvebu.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static const struct ahci_mvebu_plat_data ahci_mvebu_armada_380_plat_data = {

static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data = {
.plat_config = ahci_mvebu_armada_3700_config,
.flags = AHCI_HFLAG_SUSPEND_PHYS,
.flags = AHCI_HFLAG_SUSPEND_PHYS | AHCI_HFLAG_IGN_NOTSUPP_POWER_ON,
};

static const struct of_device_id ahci_mvebu_of_match[] = {
Expand Down
20 changes: 17 additions & 3 deletions drivers/ata/ahci_qoriq.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Tang Yuantian <Yuantian.Tang@freescale.com>
*/

#include <linux/acpi.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pm.h>
Expand Down Expand Up @@ -80,6 +81,12 @@ static const struct of_device_id ahci_qoriq_of_match[] = {
};
MODULE_DEVICE_TABLE(of, ahci_qoriq_of_match);

static const struct acpi_device_id ahci_qoriq_acpi_match[] = {
{"NXP0004", .driver_data = (kernel_ulong_t)AHCI_LX2160A},
{ }
};
MODULE_DEVICE_TABLE(acpi, ahci_qoriq_acpi_match);

static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
unsigned long deadline)
{
Expand Down Expand Up @@ -255,6 +262,7 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)
static int ahci_qoriq_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
const struct acpi_device_id *acpi_id;
struct device *dev = &pdev->dev;
struct ahci_host_priv *hpriv;
struct ahci_qoriq_priv *qoriq_priv;
Expand All @@ -267,14 +275,18 @@ static int ahci_qoriq_probe(struct platform_device *pdev)
return PTR_ERR(hpriv);

of_id = of_match_node(ahci_qoriq_of_match, np);
if (!of_id)
acpi_id = acpi_match_device(ahci_qoriq_acpi_match, &pdev->dev);
if (!(of_id || acpi_id))
return -ENODEV;

qoriq_priv = devm_kzalloc(dev, sizeof(*qoriq_priv), GFP_KERNEL);
if (!qoriq_priv)
return -ENOMEM;

qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
if (of_id)
qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
else
qoriq_priv->type = (enum ahci_qoriq_type)acpi_id->driver_data;

if (unlikely(!ecc_initialized)) {
res = platform_get_resource_byname(pdev,
Expand All @@ -288,7 +300,8 @@ static int ahci_qoriq_probe(struct platform_device *pdev)
}
}

qoriq_priv->is_dmacoherent = of_dma_is_coherent(np);
if (device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT)
qoriq_priv->is_dmacoherent = true;

rc = ahci_platform_enable_resources(hpriv);
if (rc)
Expand Down Expand Up @@ -354,6 +367,7 @@ static struct platform_driver ahci_qoriq_driver = {
.driver = {
.name = DRV_NAME,
.of_match_table = ahci_qoriq_of_match,
.acpi_match_table = ahci_qoriq_acpi_match,
.pm = &ahci_qoriq_pm_ops,
},
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/libahci_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
}

rc = phy_power_on(hpriv->phys[i]);
if (rc) {
if (rc && !(rc == -EOPNOTSUPP && (hpriv->flags & AHCI_HFLAG_IGN_NOTSUPP_POWER_ON))) {
phy_exit(hpriv->phys[i]);
goto disable_phys;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/pata_cmd64x.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
case 1:
ppi[0] = &cmd_info[4];
ppi[1] = &cmd_info[4];
/* FALL THRU */
fallthrough;
/* Early revs have no CNTRL_CH0 */
case 2:
case 0:
Expand Down
7 changes: 1 addition & 6 deletions drivers/ata/sata_highbank.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,6 @@ static int ahci_highbank_suspend(struct device *dev)
struct ahci_host_priv *hpriv = host->private_data;
void __iomem *mmio = hpriv->mmio;
u32 ctl;
int rc;

if (hpriv->flags & AHCI_HFLAG_NO_SUSPEND) {
dev_err(dev, "firmware update required for suspend/resume\n");
Expand All @@ -588,11 +587,7 @@ static int ahci_highbank_suspend(struct device *dev)
writel(ctl, mmio + HOST_CTL);
readl(mmio + HOST_CTL); /* flush */

rc = ata_host_suspend(host, PMSG_SUSPEND);
if (rc)
return rc;

return 0;
return ata_host_suspend(host, PMSG_SUSPEND);
}

static int ahci_highbank_resume(struct device *dev)
Expand Down

0 comments on commit 79ec6d9

Please sign in to comment.