drivers/ata/sata_mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Board files in arch/arm/plat-orion, arch/arm/mach-dove,
arch/arm/mach-mv78xx0 and arch/arm/mach-orion5x still register the
"sata_mv" device with two resources (IORESOURCE_MEM plus IORESOURCE_IRQ).
Those devices are rejected with -EINVAL, so SATA no longer probes on
legacy Marvell Orion/Kirkwood-style boards.
Accept both 1 resource (DT, IRQ fetched via platform_get_irq()) and 2
resources (legacy, IRQ supplied as a second resource) so both probing
paths work.
Fixes: b3b2bec9646e ("ata: sata_mv: Fixes expected number of resources now IRQs are gone")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/ata/sata_mv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 0de4f9b8e811..d260f04e6384 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4027,7 +4027,7 @@ static int mv_platform_probe(struct platform_device *pdev)
/*
* Simple resource validation ..
*/
- if (unlikely(pdev->num_resources != 1)) {
+ if (unlikely(pdev->num_resources != 1 && pdev->num_resources != 2)) {
dev_err(&pdev->dev, "invalid number of resources\n");
return -EINVAL;
}
--
2.55.0
On 7/13/26 07:31, Rosen Penev wrote:
> Board files in arch/arm/plat-orion, arch/arm/mach-dove,
> arch/arm/mach-mv78xx0 and arch/arm/mach-orion5x still register the
> "sata_mv" device with two resources (IORESOURCE_MEM plus IORESOURCE_IRQ).
> Those devices are rejected with -EINVAL, so SATA no longer probes on
> legacy Marvell Orion/Kirkwood-style boards.
>
> Accept both 1 resource (DT, IRQ fetched via platform_get_irq()) and 2
> resources (legacy, IRQ supplied as a second resource) so both probing
> paths work.
>
> Fixes: b3b2bec9646e ("ata: sata_mv: Fixes expected number of resources now IRQs are gone")
> Assisted-by: opencode:big-pickle
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Applied to for-7.2-fixes. Thanks!
--
Damien Le Moal
Western Digital Research
© 2016 - 2026 Red Hat, Inc.