Patch "ata: libahci_platform: fix IRQ check" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ata: libahci_platform: fix IRQ check

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ata-libahci_platform-fix-irq-check.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f8ce95ad432089ad8b8c9767c5e932a3c78fba74
Author: Sergey Shtylyov <s.shtylyov@xxxxxxxxxxxx>
Date:   Mon Mar 15 23:15:06 2021 +0300

    ata: libahci_platform: fix IRQ check
    
    [ Upstream commit b30d0040f06159de97ad9c0b1536f47250719d7d ]
    
    Iff platform_get_irq() returns 0, ahci_platform_init_host() would return 0
    early (as if the call was successful). Override IRQ0 with -EINVAL instead
    as the 'libata' regards 0 as "no IRQ" (thus polling) anyway...
    
    Fixes: c034640a32f8 ("ata: libahci: properly propagate return value of platform_get_irq()")
    Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/4448c8cc-331f-2915-0e17-38ea34e251c8@xxxxxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index de638dafce21..b2f552088291 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -582,11 +582,13 @@ int ahci_platform_init_host(struct platform_device *pdev,
 	int i, irq, n_ports, rc;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
+	if (irq < 0) {
 		if (irq != -EPROBE_DEFER)
 			dev_err(dev, "no irq\n");
 		return irq;
 	}
+	if (!irq)
+		return -EINVAL;
 
 	hpriv->irq = irq;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux