mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 5/5] usb: dwc3: host: pass BROKEN_PE flag for known broken revisions
Date: Fri, 18 Mar 2016 14:33:57 +0200	[thread overview]
Message-ID: <1458304437-1210-6-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>

Now that we have a broken pe quirk flag, dwc3
can tell XHCI core about it.

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/dwc3/host.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index c679f63..db9347b 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -51,6 +51,18 @@ int dwc3_host_init(struct dwc3 *dwc)
 
 	pdata.usb3_lpm_capable = dwc->usb3_lpm_capable;
 
+	/**
+	 * WORKAROUND: dwc3 revisions <=3.00a have a limitation
+	 * where Port Disable command doesn't work.
+	 *
+	 * The suggested workaround is that we avoid Port Disable
+	 * completely.
+	 *
+	 * This following flag tells XHCI to do just that.
+	 */
+	if (dwc->revision <= DWC3_REVISION_300A)
+		pdata.quirk_port_broken_pe = true;
+
 	ret = platform_device_add_data(xhci, &pdata, sizeof(pdata));
 	if (ret) {
 		dev_err(dwc->dev, "couldn't add platform data to xHCI device\n");
-- 
2.5.0

  parent reply	other threads:[~2016-03-18 12:34 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 ` [PATCH 1/5] usb: xhci: add quirk flag for broken PED bits Roger Quadros
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 ` Roger Quadros [this message]
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-6-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®