Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83a79820 authored by Geoff Levand's avatar Geoff Levand Committed by Greg Kroah-Hartman
Browse files

USB: fix hcd interrupt disabling



Commit de85422b, 'USB: fix interrupt
disabling for HCDs with shared interrupt handlers' changed usb_add_hcd()
to strip IRQF_DISABLED from irqflags prior to calling request_irq()
with the justification that such a removal was necessary for shared
interrupts to work properly.  Unfortunately, the change in that commit
unconditionally removes the IRQF_DISABLED flag, causing problems on
platforms that don't use a shared interrupt but require IRQF_DISABLED.
This change adds a check for IRQF_SHARED prior to removing the
IRQF_DISABLED flag.

Fixes the PS3 system startup hang reported with recent Fedora and
OpenSUSE kernels.

Note that this problem is hidden when CONFIG_LOCKDEP=y (ps3_defconfig),
as local_irq_enable_in_hardirq() is defined as a null statement for
that config.

CC: stable <stable@kernel.org>
Signed-off-by: default avatarGeoff Levand <geoffrey.levand@am.sony.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Stefan Becker <Stefan.Becker@nokia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f8834f1f
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1876,6 +1876,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
		 * with IRQF_SHARED. As usb_hcd_irq() will always disable
		 * with IRQF_SHARED. As usb_hcd_irq() will always disable
		 * interrupts we can remove it here.
		 * interrupts we can remove it here.
		 */
		 */
		if (irqflags & IRQF_SHARED)
			irqflags &= ~IRQF_DISABLED;
			irqflags &= ~IRQF_DISABLED;


		snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
		snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",