public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 2/8] ehci: Fail for multi-transaction interrupt transfers
@ 2012-08-09 21:50 Benoît Thébaudeau
  2012-08-09 22:28 ` Marek Vasut
  0 siblings, 1 reply; 2+ messages in thread
From: Benoît Thébaudeau @ 2012-08-09 21:50 UTC (permalink / raw)
  To: u-boot

Interrupt transfers requiring several transactions are not supported by
submit_int_msg() because bInterval is ignored. This patch returns a failure code
and prints an error message in this case.

Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
---
Changes for v2: N/A.
Changes for v3:
 - New patch.

 .../drivers/usb/host/ehci-hcd.c                    |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git u-boot-usb-8d5fb14.orig/drivers/usb/host/ehci-hcd.c u-boot-usb-8d5fb14/drivers/usb/host/ehci-hcd.c
index 1977c28..a4c84a3 100644
--- u-boot-usb-8d5fb14.orig/drivers/usb/host/ehci-hcd.c
+++ u-boot-usb-8d5fb14/drivers/usb/host/ehci-hcd.c
@@ -836,8 +836,17 @@ int
 submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
 	       int length, int interval)
 {
-
 	debug("dev=%p, pipe=%lu, buffer=%p, length=%d, interval=%d",
 	      dev, pipe, buffer, length, interval);
+
+	/*
+	 * Interrupt transfers requiring several transactions are not supported
+	 * because bInterval is ignored.
+	 */
+	if (length > usb_maxpacket(dev, pipe)) {
+		printf("%s: Interrupt transfers requiring several transactions "
+			"are not\nsupported.\n", __func__);
+		return -1;
+	}
 	return ehci_submit_async(dev, pipe, buffer, length, NULL);
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-09 22:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-09 21:50 [U-Boot] [PATCH v3 2/8] ehci: Fail for multi-transaction interrupt transfers Benoît Thébaudeau
2012-08-09 22:28 ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox