Re: [PATCH 07/10] ehci-dbgp,ehci: Allow early or late use of the dbgp device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 31 Jul 2009, Jason Wessel wrote:

> Alan Stern wrote:
> > What happens across a system suspend?
> >
> >   
> 
> I assume you mean as a test case:
> 
> echo -n mem > /sys/power/state
> 
> The dbgp device goes away entirely, when used with
> earlyprintk=dbgp,keep.  But there is a way to fix it reasonably
> easily.  Perhaps you might ack this resume patch, if you agree?
> 
> Jason.
> 
> ---
> From: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
> Subject: [PATCH] ehci-dbgp,ehci: Allow dbpg to work with suspend/resume
> 
> 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: Greg KH <gregkh@xxxxxxx>
> 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>
> 
> ---
>  drivers/usb/host/ehci-hub.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> --- a/drivers/usb/host/ehci-hub.c
> +++ b/drivers/usb/host/ehci-hub.c
> @@ -204,6 +204,13 @@ static int ehci_bus_resume (struct usb_h
>  		return -ESHUTDOWN;
>  	}
>  
> +	if (unlikely(ehci->debug)) {
> +		if (ehci->debug && !dbgp_reset_prep())
> +			ehci->debug = NULL;
> +		else
> +			dbgp_external_startup();
> +	}
> +
>  	/* Ideally and we've got a real resume here, and no port's power
>  	 * was lost.  (For PCI, that means Vaux was maintained.)  But we
>  	 * could instead be restoring a swsusp snapshot -- so that BIOS was

It looks fine to me.  Would you perhaps want to make dbgp_reset_prep()
automatically call dbgp_external_startup() on success so that ehci-hcd
doesn't have to?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux