USB: EHCI: reorganize ehci_iaa_watchdog()
This patch (as1635) rearranges the control-flow logic in ehci_iaa_watchdog() slightly to agree better with the comments. It also changes a verbose-debug message to a regular debug message. Expiration of the IAA watchdog is an unusual event and can lead to problems; we need to know about it if it happens during debugging. It should not be necessary to set a "verbose" compilation option. No behavioral changes other than the debug message. Lots of apparent changes to the source text, though, because the indentation level was decreased. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4dd405a4b0
commit
60fd4aa742
1 changed files with 24 additions and 27 deletions
|
@ -295,8 +295,7 @@ static void end_free_itds(struct ehci_hcd *ehci)
|
||||||
/* Handle lost (or very late) IAA interrupts */
|
/* Handle lost (or very late) IAA interrupts */
|
||||||
static void ehci_iaa_watchdog(struct ehci_hcd *ehci)
|
static void ehci_iaa_watchdog(struct ehci_hcd *ehci)
|
||||||
{
|
{
|
||||||
if (ehci->rh_state != EHCI_RH_RUNNING)
|
u32 cmd, status;
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lost IAA irqs wedge things badly; seen first with a vt8235.
|
* Lost IAA irqs wedge things badly; seen first with a vt8235.
|
||||||
|
@ -304,8 +303,8 @@ static void ehci_iaa_watchdog(struct ehci_hcd *ehci)
|
||||||
* (a) SMP races against real IAA firing and retriggering, and
|
* (a) SMP races against real IAA firing and retriggering, and
|
||||||
* (b) clean HC shutdown, when IAA watchdog was pending.
|
* (b) clean HC shutdown, when IAA watchdog was pending.
|
||||||
*/
|
*/
|
||||||
if (ehci->async_iaa) {
|
if (!ehci->async_iaa || ehci->rh_state != EHCI_RH_RUNNING)
|
||||||
u32 cmd, status;
|
return;
|
||||||
|
|
||||||
/* If we get here, IAA is *REALLY* late. It's barely
|
/* If we get here, IAA is *REALLY* late. It's barely
|
||||||
* conceivable that the system is so busy that CMD_IAAD
|
* conceivable that the system is so busy that CMD_IAAD
|
||||||
|
@ -328,11 +327,9 @@ static void ehci_iaa_watchdog(struct ehci_hcd *ehci)
|
||||||
ehci_writel(ehci, STS_IAA, &ehci->regs->status);
|
ehci_writel(ehci, STS_IAA, &ehci->regs->status);
|
||||||
}
|
}
|
||||||
|
|
||||||
ehci_vdbg(ehci, "IAA watchdog: status %x cmd %x\n",
|
ehci_dbg(ehci, "IAA watchdog: status %x cmd %x\n", status, cmd);
|
||||||
status, cmd);
|
|
||||||
end_unlink_async(ehci);
|
end_unlink_async(ehci);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Enable the I/O watchdog, if appropriate */
|
/* Enable the I/O watchdog, if appropriate */
|
||||||
|
|
Loading…
Add table
Reference in a new issue