From: Roger Quadros <rogerq@ti.com>
To: <balbi@kernel.org>, <mathias.nyman@linux.intel.com>
Cc: <nsekhar@ti.com>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Roger Quadros <rogerq@ti.com>
Subject: [PATCH 1/5] usb: xhci: add quirk flag for broken PED bits
Date: Fri, 18 Mar 2016 14:33:53 +0200 [thread overview]
Message-ID: <1458304437-1210-2-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1458304437-1210-1-git-send-email-rogerq@ti.com>
From: Felipe Balbi <balbi@kernel.org>
Some devices from Texas Instruments suffer from
a silicon bug where Port Enabled/Disabled bit
should not be used to silence an erroneous device.
The bug is so that if port is disabled with PED
bit, an IRQ for device removal (or attachment)
will never fire.
Just for the sake of completeness, the actual
problem lies with SNPS USB IP and this affects
all known versions up to 3.00a. A separate
patch will be added to dwc3 to enabled this
quirk flag if version is <= 3.00a.
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
drivers/usb/host/xhci-hub.c | 6 ++++++
drivers/usb/host/xhci.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index d61fcc4..1649a21 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -455,6 +455,12 @@ static void xhci_disable_port(struct usb_hcd *hcd, struct xhci_hcd *xhci,
return;
}
+ if (xhci->quirks & XHCI_BROKEN_PORT_PE) {
+ xhci_dbg(xhci, "Broken Port Enabled/Disabled, ignoring "
+ "port disable request.\n");
+ return;
+ }
+
/* Write 1 to disable the port */
writel(port_status | PORT_PE, addr);
port_status = readl(addr);
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index e293e09..371a64f 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1641,6 +1641,8 @@ struct xhci_hcd {
#define XHCI_PME_STUCK_QUIRK (1 << 20)
#define XHCI_MTK_HOST (1 << 21)
#define XHCI_SSIC_PORT_UNUSED (1 << 22)
+/* For controller with a broken Port Disable implementation */
+#define XHCI_BROKEN_PORT_PE (1 << 23)
unsigned int num_active_eps;
unsigned int limit_active_eps;
/* There are two roothubs to keep track of bus suspend info for */
--
2.5.0
next prev parent reply other threads:[~2016-03-18 12:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 12:33 [PATCH 0/5] usb: dwc3: xhci: Add quirk for defective Port Enable/disable Roger Quadros
2016-03-18 12:33 ` Roger Quadros [this message]
2016-03-18 12:33 ` [PATCH 2/5] usb: dwc3: core: define macros for newest revisions Roger Quadros
2016-03-18 12:33 ` [PATCH 3/5] usb: host: xhci: add broken pe quirk flag to pdata Roger Quadros
2016-03-18 12:33 ` [PATCH 4/5] usb: host: xhci-plat: enable BROKEN_PE quirk if platform requested Roger Quadros
2016-03-18 12:33 ` [PATCH 5/5] usb: dwc3: host: pass BROKEN_PE flag for known broken revisions Roger Quadros
2016-03-18 13:07 ` [PATCH 0/5] usb: dwc3: xhci: Add quirk for defective Port Enable/disable Felipe Balbi
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=1458304437-1210-2-git-send-email-rogerq@ti.com \
--to=rogerq@ti.com \
--cc=balbi@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=nsekhar@ti.com \
/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®