Skip to content

Commit 79ec6d9

Browse files
committed
Merge tag 'libata-5.10-2020-10-12' of git://git.kernel.dk/linux-block
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
2 parents 6ad4bf6 + 45aefe3 commit 79ec6d9

File tree

8 files changed

+27
-21
lines changed

8 files changed

+27
-21
lines changed

MAINTAINERS

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9882,15 +9882,6 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
98829882
F: drivers/ata/pata_arasan_cf.c
98839883
F: include/linux/pata_arasan_cf_data.h
98849884

9885-
LIBATA PATA DRIVERS
9886-
M: Bartlomiej Zolnierkiewicz <[email protected]>
9887-
M: Jens Axboe <[email protected]>
9888-
9889-
S: Maintained
9890-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
9891-
F: drivers/ata/ata_generic.c
9892-
F: drivers/ata/pata_*.c
9893-
98949885
LIBATA PATA FARADAY FTIDE010 AND GEMINI SATA BRIDGE DRIVERS
98959886
M: Linus Walleij <[email protected]>
98969887

drivers/ata/ahci.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ static const struct pci_device_id ahci_pci_tbl[] = {
360360
{ PCI_VDEVICE(INTEL, 0x1f3f), board_ahci_avn }, /* Avoton RAID */
361361
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
362362
{ PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
363+
{ PCI_VDEVICE(INTEL, 0x43d4), board_ahci }, /* Rocket Lake PCH-H RAID */
364+
{ PCI_VDEVICE(INTEL, 0x43d5), board_ahci }, /* Rocket Lake PCH-H RAID */
365+
{ PCI_VDEVICE(INTEL, 0x43d6), board_ahci }, /* Rocket Lake PCH-H RAID */
366+
{ PCI_VDEVICE(INTEL, 0x43d7), board_ahci }, /* Rocket Lake PCH-H RAID */
363367
{ PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */
364368
{ PCI_VDEVICE(INTEL, 0x8d04), board_ahci }, /* Wellsburg RAID */
365369
{ PCI_VDEVICE(INTEL, 0x8d06), board_ahci }, /* Wellsburg RAID */

drivers/ata/ahci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ enum {
240240
as default lpm_policy */
241241
AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during
242242
suspend/resume */
243+
AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = (1 << 27), /* ignore -EOPNOTSUPP
244+
from phy_power_on() */
243245

244246
/* ap->flags bits */
245247

drivers/ata/ahci_mvebu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static const struct ahci_mvebu_plat_data ahci_mvebu_armada_380_plat_data = {
227227

228228
static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data = {
229229
.plat_config = ahci_mvebu_armada_3700_config,
230-
.flags = AHCI_HFLAG_SUSPEND_PHYS,
230+
.flags = AHCI_HFLAG_SUSPEND_PHYS | AHCI_HFLAG_IGN_NOTSUPP_POWER_ON,
231231
};
232232

233233
static const struct of_device_id ahci_mvebu_of_match[] = {

drivers/ata/ahci_qoriq.c

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Tang Yuantian <[email protected]>
77
*/
88

9+
#include <linux/acpi.h>
910
#include <linux/kernel.h>
1011
#include <linux/module.h>
1112
#include <linux/pm.h>
@@ -80,6 +81,12 @@ static const struct of_device_id ahci_qoriq_of_match[] = {
8081
};
8182
MODULE_DEVICE_TABLE(of, ahci_qoriq_of_match);
8283

84+
static const struct acpi_device_id ahci_qoriq_acpi_match[] = {
85+
{"NXP0004", .driver_data = (kernel_ulong_t)AHCI_LX2160A},
86+
{ }
87+
};
88+
MODULE_DEVICE_TABLE(acpi, ahci_qoriq_acpi_match);
89+
8390
static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
8491
unsigned long deadline)
8592
{
@@ -255,6 +262,7 @@ static int ahci_qoriq_phy_init(struct ahci_host_priv *hpriv)
255262
static int ahci_qoriq_probe(struct platform_device *pdev)
256263
{
257264
struct device_node *np = pdev->dev.of_node;
265+
const struct acpi_device_id *acpi_id;
258266
struct device *dev = &pdev->dev;
259267
struct ahci_host_priv *hpriv;
260268
struct ahci_qoriq_priv *qoriq_priv;
@@ -267,14 +275,18 @@ static int ahci_qoriq_probe(struct platform_device *pdev)
267275
return PTR_ERR(hpriv);
268276

269277
of_id = of_match_node(ahci_qoriq_of_match, np);
270-
if (!of_id)
278+
acpi_id = acpi_match_device(ahci_qoriq_acpi_match, &pdev->dev);
279+
if (!(of_id || acpi_id))
271280
return -ENODEV;
272281

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

277-
qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
286+
if (of_id)
287+
qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
288+
else
289+
qoriq_priv->type = (enum ahci_qoriq_type)acpi_id->driver_data;
278290

279291
if (unlikely(!ecc_initialized)) {
280292
res = platform_get_resource_byname(pdev,
@@ -288,7 +300,8 @@ static int ahci_qoriq_probe(struct platform_device *pdev)
288300
}
289301
}
290302

291-
qoriq_priv->is_dmacoherent = of_dma_is_coherent(np);
303+
if (device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT)
304+
qoriq_priv->is_dmacoherent = true;
292305

293306
rc = ahci_platform_enable_resources(hpriv);
294307
if (rc)
@@ -354,6 +367,7 @@ static struct platform_driver ahci_qoriq_driver = {
354367
.driver = {
355368
.name = DRV_NAME,
356369
.of_match_table = ahci_qoriq_of_match,
370+
.acpi_match_table = ahci_qoriq_acpi_match,
357371
.pm = &ahci_qoriq_pm_ops,
358372
},
359373
};

drivers/ata/libahci_platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
5959
}
6060

6161
rc = phy_power_on(hpriv->phys[i]);
62-
if (rc) {
62+
if (rc && !(rc == -EOPNOTSUPP && (hpriv->flags & AHCI_HFLAG_IGN_NOTSUPP_POWER_ON))) {
6363
phy_exit(hpriv->phys[i]);
6464
goto disable_phys;
6565
}

drivers/ata/pata_cmd64x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
461461
case 1:
462462
ppi[0] = &cmd_info[4];
463463
ppi[1] = &cmd_info[4];
464-
/* FALL THRU */
464+
fallthrough;
465465
/* Early revs have no CNTRL_CH0 */
466466
case 2:
467467
case 0:

drivers/ata/sata_highbank.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,6 @@ static int ahci_highbank_suspend(struct device *dev)
571571
struct ahci_host_priv *hpriv = host->private_data;
572572
void __iomem *mmio = hpriv->mmio;
573573
u32 ctl;
574-
int rc;
575574

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

591-
rc = ata_host_suspend(host, PMSG_SUSPEND);
592-
if (rc)
593-
return rc;
594-
595-
return 0;
590+
return ata_host_suspend(host, PMSG_SUSPEND);
596591
}
597592

598593
static int ahci_highbank_resume(struct device *dev)

0 commit comments

Comments
 (0)