Patch "usb: cdnsp: Fix incorrect calling of cdnsp_died function" has been added to the 5.15-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

    usb: cdnsp: Fix incorrect calling of cdnsp_died function

to the 5.15-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:
     usb-cdnsp-fix-incorrect-calling-of-cdnsp_died-function.patch
and it can be found in the queue-5.15 subdirectory.

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


>From 16f00d969afe60e233c1a91af7ac840df60d3536 Mon Sep 17 00:00:00 2001
From: Pawel Laszczak <pawell@xxxxxxxxxxx>
Date: Fri, 10 Dec 2021 12:29:45 +0100
Subject: usb: cdnsp: Fix incorrect calling of cdnsp_died function

From: Pawel Laszczak <pawell@xxxxxxxxxxx>

commit 16f00d969afe60e233c1a91af7ac840df60d3536 upstream.

Patch restrict calling of cdnsp_died function during removing modules
or software disconnect.
This function was called because after transition controller to HALT
state the driver starts handling the deferred interrupt.
In this case such interrupt can be simple ignored.

Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
cc: <stable@xxxxxxxxxxxxxxx>
Reviewed-by: Peter Chen <peter.chen@xxxxxxxxxx>
Signed-off-by: Pawel Laszczak <pawell@xxxxxxxxxxx>
Link: https://lore.kernel.org/r/20211210112945.660-1-pawell@xxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/usb/cdns3/cdnsp-ring.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/drivers/usb/cdns3/cdnsp-ring.c
+++ b/drivers/usb/cdns3/cdnsp-ring.c
@@ -1525,7 +1525,14 @@ irqreturn_t cdnsp_thread_irq_handler(int
 	spin_lock_irqsave(&pdev->lock, flags);
 
 	if (pdev->cdnsp_state & (CDNSP_STATE_HALTED | CDNSP_STATE_DYING)) {
-		cdnsp_died(pdev);
+		/*
+		 * While removing or stopping driver there may still be deferred
+		 * not handled interrupt which should not be treated as error.
+		 * Driver should simply ignore it.
+		 */
+		if (pdev->gadget_driver)
+			cdnsp_died(pdev);
+
 		spin_unlock_irqrestore(&pdev->lock, flags);
 		return IRQ_HANDLED;
 	}


Patches currently in stable-queue which might be from pawell@xxxxxxxxxxx are

queue-5.15/usb-cdnsp-fix-lack-of-spin_lock_irqsave-spin_lock_restore.patch
queue-5.15/usb-cdnsp-fix-issue-in-cdnsp_log_ep-trace-event.patch
queue-5.15/usb-cdnsp-fix-incorrect-calling-of-cdnsp_died-function.patch
queue-5.15/usb-cdnsp-fix-incorrect-status-for-control-request.patch



[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