mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] Modified timeout in the ehci-hcd USB host driver.
Date: Fri, 23 Sep 2011 08:57:44 +0200	[thread overview]
Message-ID: <1316761066-29811-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1316761066-29811-1-git-send-email-s.hauer@pengutronix.de>

From: Rosen Kolev <rosen.kolev@amk-drives.bg>

Increased the asynchronous message timeout for bulk endpoints.
---
 drivers/usb/host/ehci-hcd.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 60fc181..e092b8d 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -298,7 +298,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
 	uint32_t c, toggle;
 	uint32_t cmd;
 	int ret = 0;
-	uint64_t start;
+	uint64_t start, timeout_val;
 	static struct QH __qh __attribute__((aligned(32)));
 	static struct qTD __td[3] __attribute__((aligned(32)));
 
@@ -415,13 +415,14 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
 	}
 
 	/* Wait for TDs to be processed. */
+	timeout_val = usb_pipebulk(pipe) ? (SECOND << 2) : (SECOND >> 2);
 	start = get_time_ns();
 	vtd = td;
 	do {
 		/* Invalidate dcache */
 		ehci_invalidate_dcache(ehci->qh_list);
 		token = hc32_to_cpu(vtd->qt_token);
-		if (is_timeout(start, SECOND >> 2)) {
+		if (is_timeout(start, timeout_val)) {
 			/* Disable async schedule. */
 			cmd = ehci_readl(&ehci->hcor->or_usbcmd);
 			cmd &= ~CMD_ASE;
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-09-23  6:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-23  6:57 USB mass storage support Sascha Hauer
2011-09-23  6:57 ` Sascha Hauer [this message]
2011-09-23  6:57 ` [PATCH 2/3] Extended USB device matching Sascha Hauer
2011-09-23  6:57 ` [PATCH 3/3] USB mass storage device driver initial implementation Sascha Hauer
2011-09-23  7:10 ` USB mass storage support Robert Schwebel
2011-09-28  7:15 ` Sascha Hauer
2011-09-29 13:50   ` Antony Pavlov
2011-09-29 15:26     ` Rosen Kolev

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=1316761066-29811-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.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