patch "usb: ehci: change order of register cleanup during shutdown" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
usb: ehci: change order of register cleanup during shutdown
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
bc337b51508beb2d039aff5074a76cfe1c212030Mon Sep 17 00:00:00 2001
From: Marc Ohlf <[email protected]>
Date: Wed, 3 Aug 2016 11:51:54 +0200
Subject: usb: ehci: change order of register cleanup during shutdown
In ehci_turn_off_all_ports() all EHCI port registers are cleared to zero. On some hardware, this can lead to an system hang,
when ehci_port_power() accesses the already cleared registers.
This patch changes the order of cleanup.
First call ehci_port_power() which respects the current bits in port status registers
and afterwards cleanup the hard way by setting everything to zero.
--- drivers/usb/host/ehci-hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ehci-hcd.c +2 -2
@@ -332,11 +332,11 @@ static void ehci_turn_off_all_ports(struct ehci_hcd *ehci)int port =HCS_N_PORTS (ehci->hcs_params);while (port--) { -ehci_writel (ehci,PORT_RWC_BITS , - &ehci->regs->port_status[port]);spin_unlock_irq (&ehci->lock);ehci_port_power (ehci, port, false);spin_lock_irq (&ehci->lock); +ehci_writel (ehci,PORT_RWC_BITS , + &ehci->regs->port_status[port]); } }
Signature · 1 line
2.9.2