All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb_storage: fix ehci driver max transfer size
@ 2012-06-18 18:22 Stefan Herbrechtsmeier
  2012-06-18 18:57 ` Marek Vasut
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Stefan Herbrechtsmeier @ 2012-06-18 18:22 UTC (permalink / raw)
  To: u-boot

The commit 5dd95cf93dfffa1d19a1928990852aac9f55b9d9 'usb_storage:
Fix EHCI "out of buffer pointers" with CD-ROM' introduce a bug in
usb_storage as it wrongly assumes that every transfer can use 4k
per qt_buffer. This is wrong if the start address of the data
is not 4k aligned and leads to 'EHCI timed out on TD' messages
because of 'out of buffer pointers' in ehci_td_buffer function.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
---
 common/usb_storage.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/usb_storage.c b/common/usb_storage.c
index faad237..612a553 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -1416,10 +1416,10 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss,
 	USB_STOR_PRINTF("partype: %d\n", dev_desc->part_type);
 
 	/*
-	 * The U-Boot EHCI driver cannot handle more than 4096 * 5 bytes in a
-	 * transfer without running itself out of qt_buffers.
+	 * The U-Boot EHCI driver cannot handle more than 4096 * 4 bytes in a
+	 * unaligned transfer without running itself out of qt_buffers.
 	 */
-	ss->max_xfer_blk = (4096 * 5) / dev_desc->blksz;
+	ss->max_xfer_blk = (4096 * 4) / dev_desc->blksz;
 
 	init_part(dev_desc);
 
-- 
1.7.9.5

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

end of thread, other threads:[~2012-07-18 15:46 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-18 18:22 [U-Boot] [PATCH] usb_storage: fix ehci driver max transfer size Stefan Herbrechtsmeier
2012-06-18 18:57 ` Marek Vasut
2012-07-03 18:10 ` Marek Vasut
2012-07-04  6:32   ` Stefan Herbrechtsmeier
2012-07-04  6:57     ` Schneider, Kolja
2012-07-04  7:59       ` Stefan Herbrechtsmeier
2012-07-07 21:58         ` Marek Vasut
2012-07-08 11:08           ` Stefan Herbrechtsmeier
2012-07-08 18:58             ` Marek Vasut
2012-07-09 19:52 ` [U-Boot] [PATCH v2] " Stefan Herbrechtsmeier
2012-07-10  2:12   ` Marek Vasut
2012-07-10  6:53     ` Stefan Herbrechtsmeier
2012-07-10  7:22       ` Marek Vasut
2012-07-10 17:59 ` Stefan Herbrechtsmeier
2012-07-10 18:02   ` Marek Vasut
2012-07-14 22:23     ` Ilya Yanok
2012-07-15  8:14       ` Marek Vasut
2012-07-15  8:41         ` Ilya Yanok
2012-07-15  9:51           ` Marek Vasut
2012-07-15 14:48             ` Ilya Yanok
2012-07-15  9:50   ` Marek Vasut
2012-07-18 12:50   ` Marek Vasut
2012-07-18 15:46     ` Stefan Herbrechtsmeier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.