All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
To: Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>
Cc: Andrey Rahmatullin <wrar-Bxt/JK/G85ezQB+pC5nmwQ@public.gmane.org>,
	jrnieder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	USB list <linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [linux-pm] ehci_hcd related S3 lockup on ASUS laptops, again
Date: Mon, 23 Apr 2012 16:11:48 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1204231554210.1612-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <1335205839.28106.108.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>

On Mon, 23 Apr 2012, Steven Rostedt wrote:

> On Mon, 2012-04-23 at 12:29 -0400, Alan Stern wrote:
> > On Sun, 22 Apr 2012, Andrey Rahmatullin wrote:
> > 
> > > > All right.  Maybe you posted this information earlier in the thread, 
> > > > but it's easier to ask again than try to find it.  What output do you 
> > > > get from "lspci -nv -s 1a.0"?
> > > 00:1a.0 0c03: 8086:1c2d (rev 05) (prog-if 20 [EHCI])
> > >         Subsystem: 1043:1147
> > >         Flags: bus master, medium devsel, latency 0, IRQ 16
> > >         Memory at dfe08000 (32-bit, non-prefetchable) [size=1K]
> > >         Capabilities: [50] Power Management version 2
> > >         Capabilities: [58] Debug port: BAR=1 offset=00a0
> > >         Capabilities: [98] PCI Advanced Features
> > >         Kernel driver in use: ehci_hcd
> > 
> > Steve, what about you?  Do you get the same thing?
> > 
> 
> 00:1a.0 0c03: 8086:1c2d (rev 05) (prog-if 20 [EHCI])
> 	Subsystem: 1043:1157
> 	Flags: bus master, medium devsel, latency 0, IRQ 16
> 	Memory at dfc08000 (32-bit, non-prefetchable) [size=1K]
> 	Capabilities: [50] Power Management version 2
> 	Capabilities: [58] Debug port: BAR=1 offset=00a0
> 	Capabilities: [98] PCI Advanced Features
> 	Kernel driver in use: ehci_hcd
> 
> Almost, the Subsystem is 1157 instead of 1147. But the rest looks alike.

I don't have a very clear idea of how specific this needs to be.  There 
have been other bug reports of problems related to suspend that were 
fixed by the same script you were using, but the symptoms weren't the 
same.  For example, see Bugzilla #42728.

Anyway, this patch is reasonably close to being a final version, and it
should work on both machines.  You should be able to suspend and resume
with no problems, without using the script.

Alan Stern




Index: usb-3.4/include/linux/usb/hcd.h
===================================================================
--- usb-3.4.orig/include/linux/usb/hcd.h
+++ usb-3.4/include/linux/usb/hcd.h
@@ -126,6 +126,8 @@ struct usb_hcd {
 	unsigned		wireless:1;	/* Wireless USB HCD */
 	unsigned		authorized_default:1;
 	unsigned		has_tt:1;	/* Integrated TT in root hub */
+	unsigned		broken_pci_sleep:1;	/* Don't put the
+			controller in PCI-D3 for system sleep */
 
 	unsigned int		irq;		/* irq allocated */
 	void __iomem		*regs;		/* device memory/io */
Index: usb-3.4/drivers/usb/core/hcd-pci.c
===================================================================
--- usb-3.4.orig/drivers/usb/core/hcd-pci.c
+++ usb-3.4/drivers/usb/core/hcd-pci.c
@@ -493,6 +493,15 @@ static int hcd_pci_suspend_noirq(struct
 
 	pci_save_state(pci_dev);
 
+	/*
+	 * Some systems crash if an EHCI controller is in D3 during
+	 * a sleep transition.  We have to leave such controllers in D0.
+	 */
+	if (hcd->broken_pci_sleep) {
+		dev_dbg(dev, "Staying in PCI D0\n");
+		return retval;
+	}
+
 	/* If the root hub is dead rather than suspended, disallow remote
 	 * wakeup.  usb_hc_died() should ensure that both hosts are marked as
 	 * dying, so we only need to check the primary roothub.
Index: usb-3.4/drivers/usb/host/ehci-pci.c
===================================================================
--- usb-3.4.orig/drivers/usb/host/ehci-pci.c
+++ usb-3.4/drivers/usb/host/ehci-pci.c
@@ -144,6 +144,13 @@ static int ehci_pci_setup(struct usb_hcd
 			hcd->has_tt = 1;
 			tdi_reset(ehci);
 		}
+		if (pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK) {
+			/* EHCI #1 or #2 on 6 Series/C200 Series chipset */
+			if (pdev->device == 0x1c26 || pdev->device == 0x1c2d) {
+				ehci_info(ehci, "broken D3 during system sleep on ASUS\n");
+				hcd->broken_pci_sleep = 1;
+			}
+		}
 		break;
 	case PCI_VENDOR_ID_TDI:
 		if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {

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

  parent reply	other threads:[~2012-04-23 20:11 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <25d7d7b05dd22d5f6e78323c1a1579b1@webmail.wrar.name>
     [not found] ` <25d7d7b05dd22d5f6e78323c1a1579b1-2RFepEojUI0HG38kr8bzl7NAH6kLmebB@public.gmane.org>
2012-04-21 21:15   ` [linux-pm] ehci_hcd related S3 lockup on ASUS laptops, again Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.1204211712430.3981-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-21 21:54       ` Andrey Rahmatullin
     [not found]         ` <20120421215459.GB4772-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-23 16:29           ` Alan Stern
2012-04-23 18:30             ` Steven Rostedt
     [not found]               ` <1335205839.28106.108.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-23 20:11                 ` Alan Stern [this message]
     [not found]                   ` <Pine.LNX.4.44L0.1204231554210.1612-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-24  3:01                     ` [linux-pm] " Steven Rostedt
2012-04-24 10:42                     ` Andrey Rahmatullin
2012-04-21  0:53 Steven Rostedt
     [not found] ` <1334969624.28106.82.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-21 17:22   ` [linux-pm] " Alan Stern
  -- strict thread matches above, loose matches on Subject: below --
2012-04-19 21:48 Andrey Rahmatullin
2012-04-21  0:42 ` Alan Stern
2012-04-21  8:37   ` Andrey Rahmatullin
     [not found]     ` <20120421083751.GA4570-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-21 17:26       ` [linux-pm] " Alan Stern
2012-04-21 18:50       ` Steven Rostedt
     [not found]         ` <1335034218.28106.91.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-21 21:51           ` Andrey Rahmatullin
2012-04-19 18:13 Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1204191411360.1154-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-19 18:30   ` [linux-pm] " Steven Rostedt
2012-04-18 21:23 Andrey Rahmatullin
     [not found] ` <20120418212301.GW11484-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-18 21:30   ` [linux-pm] " Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.1204181729400.1149-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-19 13:43       ` Alan Stern
     [not found]         ` <Pine.LNX.4.44L0.1204190934500.2070-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-19 15:44           ` Andrey Rahmatullin
     [not found]             ` <20120419154453.GZ11484-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-19 16:05               ` Alan Stern
2012-04-19 15:53           ` Andrey Rahmatullin
2012-04-19 16:22           ` Steven Rostedt
     [not found]             ` <1334852575.28106.62.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-19 18:08               ` Steven Rostedt
2012-04-19 16:30           ` Andrey Rahmatullin
     [not found]             ` <20120419163055.GB11484-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-19 18:07               ` Alan Stern
2012-04-17 16:25 Andrey Rahmatullin
2012-04-17 16:58 ` Alan Stern
     [not found]   ` <Pine.LNX.4.44L0.1204171251330.1364-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-17 17:51     ` [linux-pm] " Andrey Rahmatullin
     [not found]       ` <20120417175122.GM11484-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-17 18:26         ` Alan Stern
     [not found]           ` <Pine.LNX.4.44L0.1204171423310.1163-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-17 18:51             ` Andrey Rahmatullin
     [not found]               ` <20120417185149.GO11484-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-17 19:20                 ` Alan Stern
     [not found]                   ` <Pine.LNX.4.44L0.1204171513230.1163-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-17 19:52                     ` Andrey Rahmatullin
     [not found]                       ` <20120417195218.GP11484-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-18 14:51                         ` Alan Stern
     [not found]                           ` <Pine.LNX.4.44L0.1204181048340.1548-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-18 15:08                             ` Steven Rostedt
2012-04-18 15:24                             ` Andrey Rahmatullin
2012-04-18 16:41                               ` Alan Stern
     [not found]                                 ` <Pine.LNX.4.44L0.1204181228380.1149-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-18 17:07                                   ` [linux-pm] " Steven Rostedt
     [not found]                                     ` <1334768847.28106.45.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-18 17:19                                       ` Alan Stern
     [not found]                                         ` <Pine.LNX.4.44L0.1204181317550.1149-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-18 17:24                                           ` Steven Rostedt
     [not found]                                             ` <1334769847.28106.47.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-18 17:46                                               ` Mark Brown
     [not found]                                                 ` <20120418174610.GA10142-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2012-04-18 18:11                                                   ` Steven Rostedt
2012-04-18 20:25                                                   ` Alan Stern
2012-04-18 17:10                                 ` Andrey Rahmatullin
     [not found]                                   ` <20120418171002.GU11484-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-18 17:20                                     ` [linux-pm] " Steven Rostedt
     [not found]                                       ` <1334769632.28106.46.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-18 20:23                                         ` Alan Stern
     [not found]                                           ` <Pine.LNX.4.44L0.1204181616430.1149-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-18 21:02                                             ` Steven Rostedt
     [not found]                                               ` <1334782932.28106.52.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-18 21:27                                                 ` Alan Stern
     [not found]                                                   ` <Pine.LNX.4.44L0.1204181724570.1149-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-18 21:41                                                     ` Steven Rostedt
2012-04-18 21:04                                             ` Rafael J. Wysocki
     [not found]                                               ` <201204182304.29249.rjw-KKrjLPT3xs0@public.gmane.org>
2012-04-18 21:29                                                 ` Alan Stern
     [not found]                                                   ` <Pine.LNX.4.44L0.1204181727580.1149-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-18 21:44                                                     ` Rafael J. Wysocki
2012-04-18 15:39                             ` Steven Rostedt
2012-04-13  1:09 Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1204122103230.10558-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-13 14:10   ` [linux-pm] " Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.1204131008010.1185-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-13 15:29       ` Steven Rostedt
     [not found]         ` <1334330949.23924.360.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-13 15:32           ` Steven Rostedt
     [not found]             ` <1334331148.23924.361.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-13 15:35               ` Steven Rostedt
2012-04-13 15:42           ` Alan Stern
2012-04-13 22:43       ` Andrey Rahmatullin
2012-04-12 20:02 Alan Stern
2012-04-12 20:09 ` Alan Stern
2012-04-12 20:21   ` Andrey Rahmatullin
     [not found]     ` <20120412202132.GH12852-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-12 20:33       ` [linux-pm] " Steven Rostedt
     [not found]         ` <1334262826.23924.351.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-13  1:09           ` Alan Stern
2012-04-12 18:25 Steven Rostedt
2012-04-12 19:11 ` Alan Stern
     [not found]   ` <Pine.LNX.4.44L0.1204121504550.1496-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-12 19:24     ` [linux-pm] " Andrey Rahmatullin
2012-04-12 19:35     ` Steven Rostedt
2012-04-12 15:37 Andrey Rahmatullin
     [not found] ` <20120412153750.GA12852-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-12 16:09   ` [linux-pm] " Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.1204121203530.1496-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-12 16:49       ` Andrey Rahmatullin
2012-04-12  1:22 Steven Rostedt
     [not found] ` <1334193773.23924.316.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-12 14:28   ` [linux-pm] " Alan Stern
2012-04-11 17:25 Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1204111324100.1351-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-11 19:12   ` [linux-pm] " Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.1204111429510.1351-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-11 20:43       ` Steven Rostedt
     [not found]         ` <1334177035.23924.299.camel-f9ZlEuEWxVcI6MkJdU+c8EEOCMrvLtNR@public.gmane.org>
2012-04-11 21:13           ` Alan Stern
     [not found]             ` <Pine.LNX.4.44L0.1204111703180.1351-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-04-11 21:19               ` Steven Rostedt
2012-04-11 20:52     ` Andrey Rahmatullin
     [not found]       ` <20120411205204.GB3677-hAV9HEAGFNe6YibBOCjzsw@public.gmane.org>
2012-04-11 21:15         ` [linux-pm] " Steven Rostedt

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=Pine.LNX.4.44L0.1204231554210.1612-100000@iolanthe.rowland.org \
    --to=stern-nwvwt67g6+6dfdvte/nmlpvzexx5g7lz@public.gmane.org \
    --cc=jrnieder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org \
    --cc=wrar-Bxt/JK/G85ezQB+pC5nmwQ@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.