mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrew Morton <akpm@osdl.org>, Mattia Dongili <malattia@linux.it>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	USB development list <linux-usb-devel@lists.sourceforge.net>
Subject: Re: [linux-usb-devel] 2.6.18-rc6-mm1 (-mm2): ohci resume problem
Date: Thu, 14 Sep 2006 15:14:48 +0200	[thread overview]
Message-ID: <200609141514.49527.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0609131749230.8180-100000@iolanthe.rowland.org>

[-- Attachment #1: Type: text/plain, Size: 3001 bytes --]

On Wednesday, 13 September 2006 23:55, Alan Stern wrote:
> On Wed, 13 Sep 2006, Rafael J. Wysocki wrote:
> 
> > > Try this patch instead.  It looks for problems occurring a little earlier 
> > > in the call chain.
> > 
> > I've applied both patches at a time (I hope they don't conflict).
> > 
> > The dmesg output is attached.
> 
> The dmesg output shows the root-hub device state is set wrong.
> 
> I have to leave now, so I can't give you another patch to try.  You can 
> experiment as follows...
> 
> Look in drivers/usb/host/ehci-pci.c, at ehci_pci_resume().  The part of 
> interest is everything following the "restart:" statement label.
> 
> Try adding some ehci_dbg() lines in there (copy the form of the line just
> after restart:).  We want to follow the value of
> hcd->self.root_hub->state.  Initially it should be equal to
> USB_STATE_SUSPENDED (= 8), and it shouldn't change.  But somewhere it is
> getting set to USB_STATE_CONFIGURED (= 7).  I don't know where, but almost 
> certainly somewhere in this routine.  If you can find out where that 
> happens, I'd appreciate it.

Done, but it shows hcd->self.root_hub->state is already 7 right after restart.

I've used the following patch to verify this:

---
 drivers/usb/host/ehci-pci.c |    8 ++++++++
 1 file changed, 8 insertions(+)

Index: linux-2.6.18-rc6-mm2/drivers/usb/host/ehci-pci.c
===================================================================
--- linux-2.6.18-rc6-mm2.orig/drivers/usb/host/ehci-pci.c
+++ linux-2.6.18-rc6-mm2/drivers/usb/host/ehci-pci.c
@@ -291,14 +291,19 @@ static int ehci_pci_resume(struct usb_hc
 
 restart:
 	ehci_dbg(ehci, "lost power, restarting\n");
+	ehci_dbg(ehci, "root hub state: %d\n", hcd->self.root_hub->state);
 	usb_root_hub_lost_power(hcd->self.root_hub);
+	ehci_dbg(ehci, "root hub state: %d\n", hcd->self.root_hub->state);
 
 	/* Else reset, to cope with power loss or flush-to-storage
 	 * style "resume" having let BIOS kick in during reboot.
 	 */
 	(void) ehci_halt(ehci);
+	ehci_dbg(ehci, "root hub state: %d\n", hcd->self.root_hub->state);
 	(void) ehci_reset(ehci);
+	ehci_dbg(ehci, "root hub state: %d\n", hcd->self.root_hub->state);
 	(void) ehci_pci_reinit(ehci, pdev);
+	ehci_dbg(ehci, "root hub state: %d\n", hcd->self.root_hub->state);
 
 	/* emptying the schedule aborts any urbs */
 	spin_lock_irq(&ehci->lock);
@@ -306,12 +311,15 @@ restart:
 		ehci->reclaim_ready = 1;
 	ehci_work(ehci, NULL);
 	spin_unlock_irq(&ehci->lock);
+	ehci_dbg(ehci, "root hub state: %d\n", hcd->self.root_hub->state);
 
 	/* restart; khubd will disconnect devices */
 	retval = ehci_run(hcd);
+	ehci_dbg(ehci, "root hub state: %d\n", hcd->self.root_hub->state);
 
 	/* here we "know" root ports should always stay powered */
 	ehci_port_power(ehci, 1);
+	ehci_dbg(ehci, "root hub state: %d\n", hcd->self.root_hub->state);
 
 	return retval;
 }

The output of dmesg is attached.

Greetings,
Rafael


-- 
You never change things by fighting the existing reality.
		R. Buckminster Fuller

[-- Attachment #2: dmesg-debug-3.log.gz --]
[-- Type: application/x-gzip, Size: 15082 bytes --]

  reply	other threads:[~2006-09-14 13:15 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-08  8:13 2.6.18-rc6-mm1 Andrew Morton
2006-09-08 11:49 ` 2.6.18-rc6-mm1 Andy Whitcroft
2006-09-08 12:07 ` 2.6.18-rc6-mm1 Frederik Deweerdt
2006-09-08 12:16 ` [patch -mm] s390: fix save_stack_trace Heiko Carstens
2006-09-09 13:36   ` Andi Kleen
2006-09-08 12:23 ` 2.6.18-rc6-mm1 - x86_64-mm-lockdep-dont-force-framepointer.patch Heiko Carstens
2006-09-09 13:39   ` Andi Kleen
2006-09-11  8:45     ` Martin Schwidefsky
2006-09-08 14:26 ` 2.6.18-rc6-mm1 Rafael J. Wysocki
2006-09-08 20:44   ` [linux-usb-devel] 2.6.18-rc6-mm1 Alan Stern
2006-09-08 22:57     ` Rafael J. Wysocki
2006-09-11 22:08       ` Rafael J. Wysocki
2006-09-12 14:28         ` Alan Stern
2006-09-12 17:22           ` Mattia Dongili
2006-09-12 18:04             ` Mattia Dongili
2006-09-12 20:10               ` Alan Stern
2006-09-13 17:00                 ` Rafael J. Wysocki
2006-09-13 12:07       ` [linux-usb-devel] 2.6.18-rc6-mm1 (-mm2): ohci resume problem Rafael J. Wysocki
2006-09-13 12:42         ` Rafael J. Wysocki
2006-09-13 18:38           ` Alan Stern
2006-09-13 20:00             ` Rafael J. Wysocki
2006-09-13 21:01               ` Alan Stern
2006-09-13 21:32                 ` Rafael J. Wysocki
2006-09-13 21:55                   ` Alan Stern
2006-09-14 13:14                     ` Rafael J. Wysocki [this message]
2006-09-14 14:08                       ` Rafael J. Wysocki
2006-09-14 15:04                         ` Alan Stern
2006-09-14 16:17                           ` Alan Stern
2006-09-14 17:08                             ` Rafael J. Wysocki
2006-09-14 17:13                               ` Rafael J. Wysocki
2006-09-14 17:24                                 ` Alan Stern
2006-09-14 17:22                               ` Alan Stern
2006-09-14 17:35                                 ` Rafael J. Wysocki
2006-09-14 18:28                                   ` Alan Stern
     [not found]                                     ` <200609142137.52066.rjw@sisk.pl>
2006-09-14 20:21                                       ` Rafael J. Wysocki
2006-09-14 20:55                                       ` Alan Stern
2006-09-14 21:47                                         ` Rafael J. Wysocki
2006-09-14 22:19                                           ` Alan Stern
2006-09-14 16:48                           ` Rafael J. Wysocki
2006-09-13 20:38             ` Mattia Dongili
2006-09-13 20:54               ` Alan Stern
2006-09-14 20:19                 ` Mattia Dongili
2006-09-14 20:25                   ` Alan Stern
2006-09-14 20:35                     ` Mattia Dongili
2006-09-16 11:58                     ` Mattia Dongili
2006-09-16 14:31                       ` Alan Stern
2006-09-08 17:43 ` 2.6.18-rc6-mm1 Stefan Richter
2006-09-08 18:04   ` 2.6.18-rc6-mm1 Andrew Morton
2006-09-08 18:36     ` 2.6.18-rc6-mm1 Stefan Richter
2006-09-08 19:23 ` 2.6.18-rc6-mm1 Michal Piotrowski
2006-09-08 19:43   ` 2.6.18-rc6-mm1 Andrew Morton
2006-09-08 20:01     ` 2.6.18-rc6-mm1 Michal Piotrowski
2006-09-08 19:30 ` 2.6.18-rc6-mm1 thunder7
2006-09-08 19:44   ` 2.6.18-rc6-mm1 Andrew Morton
2006-09-09  9:04     ` 2.6.18-rc6-mm1 thunder7
2006-09-09 15:31       ` 2.6.18-rc6-mm1 Andrew Morton
2006-09-09 22:02         ` 2.6.18-rc6-mm1 Jean Delvare
2006-09-10  6:30           ` 2.6.18-rc6-mm1 thunder7
2006-09-09  8:35 ` lockdep warning in check_flags() Frederik Deweerdt
2006-09-11  5:43   ` Ingo Molnar
2006-09-12 14:13     ` Frederik Deweerdt
2006-09-12 16:54       ` Ingo Molnar
2006-09-12 20:21         ` Frederik Deweerdt
     [not found] ` <4503DC64.9070007@free.fr>
2006-09-10  8:32   ` 2.6.18-rc6-mm1: GPF loop on early boot Andi Kleen
2006-09-10 10:29     ` Arjan van de Ven
2006-09-10 11:57     ` Ingo Molnar
2006-09-10 11:34       ` Andi Kleen
2006-09-10 13:26         ` Ingo Molnar
2006-09-10 13:55           ` Andi Kleen
2006-09-10 14:02             ` Ingo Molnar
2006-09-10 16:33           ` Andrew Morton
2006-09-10 23:03             ` Jeremy Fitzhardinge
2006-09-11  5:10               ` Ingo Molnar
2006-09-11  7:31                 ` Jeremy Fitzhardinge
2006-09-11  7:29                   ` Ingo Molnar
2006-09-11  7:41                     ` Jeremy Fitzhardinge
2006-09-11  7:36                       ` Ingo Molnar
2006-09-11  7:59                         ` Jeremy Fitzhardinge
2006-09-11  8:01                           ` Ingo Molnar
2006-09-11  8:13                             ` Jeremy Fitzhardinge
2006-09-11  7:38                       ` Ingo Molnar
2006-09-11  7:56                         ` Jeremy Fitzhardinge
2006-09-11  7:55                           ` Ingo Molnar
2006-09-11  5:21               ` Laurent Riffard
2006-09-11  5:18                 ` Ingo Molnar
2006-09-11  5:25               ` [patch] i386-PDA, lockdep: fix %gs restore Ingo Molnar
2006-09-11  5:41                 ` Andi Kleen
2006-09-11  5:48                   ` Ingo Molnar
2006-09-11  5:46                 ` Ingo Molnar
2006-09-11 16:35                   ` Laurent Riffard
2006-09-11  7:42                 ` Jeremy Fitzhardinge
2006-09-11 19:33                 ` Jeremy Fitzhardinge
2006-09-11 21:25                   ` Jeremy Fitzhardinge
2006-09-11 20:20                 ` Andi Kleen
2006-09-11 21:37                   ` Jeremy Fitzhardinge
2006-09-11 20:48                     ` Andi Kleen
2006-09-10 12:36       ` 2.6.18-rc6-mm1: GPF loop on early boot Laurent Riffard
2006-09-10 13:07         ` Ingo Molnar
2006-09-10 13:11       ` Ingo Molnar
2006-09-11 21:19 ` 2.6.18-rc6-mm1 Mark Haverkamp
2006-09-11 22:16   ` 2.6.18-rc6-mm1 Andrew Morton
     [not found] <fa.IgLMAmyDbz1yS9bpHhwK3NW+uks@ifi.uio.no>
     [not found] ` <fa.qTCpjei55lhk7BvMUo3JQy7hYT8@ifi.uio.no>
     [not found]   ` <fa.L0QDp0UiCRLE2HbZGTyQ/fbNwDU@ifi.uio.no>
2006-09-14 14:28     ` [linux-usb-devel] 2.6.18-rc6-mm1 (-mm2): ohci resume problem Robert Hancock
2006-09-14 15:23       ` Rafael J. Wysocki
     [not found] <fa.CoF5TlzZuzrQVRlWotoenffiTfo@ifi.uio.no>
     [not found] ` <fa.d7LE5j2KeqaUO4bsZpo8y9R4gYc@ifi.uio.no>
2006-09-15  0:51   ` Robert Hancock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609141514.49527.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=malattia@linux.it \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®