Sergei Shtylyov wrote: > Hello. > > Greg Kroah-Hartman wrote: > > >> From: Jason Wessel <jason.wessel@xxxxxxxxxxxxx> >> >> In order for the dbgp driver to survive suspend/resume, on every ehci >> resume operation the debug controller must get re-initialized. >> >> Signed-off-by: Jason Wessel <jason.wessel@xxxxxxxxxxxxx> >> Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> >> Cc: dbrownell@xxxxxxxxxxxxxxxxxxxxx >> Cc: Ingo Molnar <mingo@xxxxxxx> >> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> >> Cc: Yinghai Lu <yinghai@xxxxxxxxxx> >> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> >> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> >> > [...] > >> index 6b5e4d1..1b6f1c0 100644 >> --- a/drivers/usb/host/ehci-hub.c >> +++ b/drivers/usb/host/ehci-hub.c >> @@ -235,6 +235,13 @@ static int ehci_bus_resume (struct usb_hcd *hcd) >> return -ESHUTDOWN; >> } >> >> + if (unlikely(ehci->debug)) { >> + if (ehci->debug && !dbgp_reset_prep()) >> >> > > Why check ehci->debug twice? :-/ > > >> + ehci->debug = NULL; >> + else >> + dbgp_external_startup(); >> + } >> + >> Oops, the problem came from when some of the code chunks got moved around. I'll send this patch to Greg KH separately. Thanks, Jason.
>From 94886ce37c684410bc7f98adc7d51778417944f0 Mon Sep 17 00:00:00 2001 From: Jason Wessel <jason.wessel@xxxxxxxxxxxxx> Date: Wed, 23 Sep 2009 17:58:03 -0500 Subject: [PATCH 1/1] ehci-hub: Remove redundant ehci->debug check No need to check ehci->debug twice. Found-by: Sergei Shtylyov sshtylyov@xxxxxxxxxxxxx Signed-off-by: Jason Wessel <jason.wessel@xxxxxxxxxxxxx> --- drivers/usb/host/ehci-hub.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 1b6f1c0..2c6571c 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -236,7 +236,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd) } if (unlikely(ehci->debug)) { - if (ehci->debug && !dbgp_reset_prep()) + if (!dbgp_reset_prep()) ehci->debug = NULL; else dbgp_external_startup(); -- 1.6.3.1.9.g95405b