Patch "serial: 8250_dw: fall back to poll if there's no interrupt" has been added to the 6.1-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

    serial: 8250_dw: fall back to poll if there's no interrupt

to the 6.1-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:
     serial-8250_dw-fall-back-to-poll-if-there-s-no-inter.patch
and it can be found in the queue-6.1 subdirectory.

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



commit f8c6cebdcc6c3ac9f7230b5aa00e3a263436f649
Author: Jisheng Zhang <jszhang@xxxxxxxxxx>
Date:   Sun Aug 6 17:20:56 2023 +0800

    serial: 8250_dw: fall back to poll if there's no interrupt
    
    [ Upstream commit 22130dae0533c474e4e0db930a88caa9b397d083 ]
    
    When there's no irq(this can be due to various reasons, for example,
    no irq from HW support, or we just want to use poll solution, and so
    on), falling back to poll is still better than no support at all.
    
    Signed-off-by: Jisheng Zhang <jszhang@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230806092056.2467-3-jszhang@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Stable-dep-of: 87d80bfbd577 ("serial: 8250_dw: Don't use struct dw8250_data outside of 8250_dw")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 88035100b86c6..a1f2259cc9a98 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -523,7 +523,10 @@ static int dw8250_probe(struct platform_device *pdev)
 	if (!regs)
 		return dev_err_probe(dev, -EINVAL, "no registers defined\n");
 
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
+	/* no interrupt -> fall back to polling */
+	if (irq == -ENXIO)
+		irq = 0;
 	if (irq < 0)
 		return 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