public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ondrej Zary <linux@rainbow-software.org>
To: linux-pm@lists.linux-foundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ehci: Disable wake on overcurrent (WKOC_E)
Date: Tue, 27 Apr 2010 16:22:53 +0200	[thread overview]
Message-ID: <201004271622.55904.linux@rainbow-software.org> (raw)
In-Reply-To: <201004271523.48647.linux@rainbow-software.org>

Disable wake on overcurrent in EHCI.
This fixes immediate resume from standby on boards where port power is lost
in standby which triggers overcurrent detection. At least Asus P4P800 boards
are affected when any of the USBPWxx (e.g. USBPW12) jumpers is set to 5V.
Tested on Asus P4P800-VM.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

--- linux-source-2.6.33-orig/drivers/usb/host/ehci-hub.c	2010-02-24 19:52:17.000000000 +0100
+++ linux-source-2.6.33/drivers/usb/host/ehci-hub.c	2010-04-27 16:04:37.000000000 +0200
@@ -180,10 +180,10 @@ static int ehci_bus_suspend (struct usb_
 			 * set), the port change detection will finally fix it.
 			 */
 			if (t1 & PORT_CONNECT) {
-				t2 |= PORT_WKOC_E | PORT_WKDISC_E;
+				t2 |= PORT_WKDISC_E;
 				t2 &= ~PORT_WKCONN_E;
 			} else {
-				t2 |= PORT_WKOC_E | PORT_WKCONN_E;
+				t2 |= PORT_WKCONN_E;
 				t2 &= ~PORT_WKDISC_E;
 			}
 		} else
@@ -912,7 +912,7 @@ static int ehci_hub_control (
 			 * mode if we have hostpc feature
 			 */
 			temp &= ~PORT_WKCONN_E;
-			temp |= PORT_WKDISC_E | PORT_WKOC_E;
+			temp |= PORT_WKDISC_E;
 			ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);
 			if (hostpc_reg) {
 				spin_unlock_irqrestore(&ehci->lock, flags);


-- 
Ondrej Zary

  reply	other threads:[~2010-04-27 14:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 13:23 ehci_hcd causes immediate wakeup from suspend to RAM or disk on Asus P4P800-VM Ondrej Zary
2010-04-27 14:22 ` Ondrej Zary [this message]
2010-04-27 16:25   ` [PATCH v2] [RFC] ehci: Disable wake on overcurrent (WKOC_E) and disconnect (WKDISC_E) Ondrej Zary
2010-04-27 19:21     ` Alan Stern
2010-04-27 20:46       ` Ondrej Zary
2010-04-27 21:33         ` Greg KH
2010-04-28 15:41         ` Alan Stern
2010-04-28 17:30           ` Ondrej Zary
2010-04-29 16:16             ` Alan Stern
2010-04-29 17:45               ` [linux-pm] " Alan Stern
2010-04-29 21:14                 ` Ondrej Zary
2010-05-04  5:37                 ` Du, Alek
2010-05-05  3:12                 ` Du, Alek
2010-05-05 15:55                   ` Alan Stern
2010-05-06  0:11                     ` Du, Alek
2010-05-06  8:23                     ` Du, Alek
2010-05-06 14:46                       ` Alan Stern
2010-05-06 15:20                         ` Du, Alek
2010-05-06 16:06                           ` Alan Stern
2010-05-07  1:32                             ` Du, Alek
2010-05-07 15:20                               ` Alan Stern
2010-05-08  2:00                                 ` Du, Alek
     [not found]                                 ` <6C44CD31806DCD4BB88546DAB7AFC9A201EB5A39FA@shsmsx502.ccr.corp.intel.com>
2010-05-10  2:25                                   ` Du, Alek
2010-05-10 21:05                                     ` Alan Stern
2010-05-11  3:31                                       ` Du, Alek
2010-05-11 14:01                                         ` Alan Stern
2010-05-11 15:58                                         ` Alan Stern
2010-05-11 16:10                                           ` Du, Alek

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=201004271622.55904.linux@rainbow-software.org \
    --to=linux@rainbow-software.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-usb@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox