Skip to contentSkip to conversation

ata: sata_mv: Fixes expected number of resources now IRQs are gone

PATCH In review Andrew Lunn 2 participants 2 messages Jul 31, 2022 – Aug 2, 2022 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: sata_mv: Fixes expected number of resources now IRQs are gone

The commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") stopped IRQ resources being available as platform resources. This broke the sanity check for the expected number of resources in the Marvell SATA driver which expected two resources, the IO memory and the interrupt.

Change the sanity check to only expect the IO memory.

Cc Lad Prabhakar <[email protected]>
Fixes a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")

---

v5.19-rc8 is broken. I guess there will not be a -rc9, so please could you queue this up for 5.19.1.

drivers/ata/sata_mv.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/sata_mv.c +1 -1
index de5bd02cad44..e3cff01201b8 100644
@@ -4057,7 +4057,7 @@ static int mv_platform_probe(struct platform_device *pdev)
 	/*
 	 * Simple resource validation ..
 	 */
-	if (unlikely(pdev->num_resources != 2)) {
+	if (unlikely(pdev->num_resources != 1)) {
 		dev_err(&pdev->dev, "invalid number of resources\n");
 		return -EINVAL;
 	}
Signature · 1 line
2.36.1
#1 lore raw
Quoted 8 lines · Andrew Lunn

The commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") stopped IRQ resources being available as platform resources. This broke the sanity check for the expected number of resources in the Marvell SATA driver which expected two resources, the IO memory and the interrupt.

Change the sanity check to only expect the IO memory.

Quoted 7 lines
Cc Lad Prabhakar <[email protected]>
Fixes a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")

---

v5.19-rc8 is broken. I guess there will not be a -rc9, so please could you queue this up for 5.19.1.

I will queue this for 5.10-rc1 and this will be picked up automatically for stable 5.19.x thanks to the Fixes tag.

Quoted 17 lines

drivers/ata/sata_mv.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/sata_mv.c +1 -1
index de5bd02cad44..e3cff01201b8 100644
@@ -4057,7 +4057,7 @@ static int mv_platform_probe(struct platform_device *pdev)
 	/*
 	 * Simple resource validation ..
 	 */
-	if (unlikely(pdev->num_resources != 2)) {
+	if (unlikely(pdev->num_resources != 1)) {
 		dev_err(&pdev->dev, "invalid number of resources\n");
 		return -EINVAL;
 	}
Signature · 2 lines
Damien Le Moal
Western Digital Research