Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-08-08 Thread Marek Vasut
Dear Benoît Thébaudeau, > Dear Marek Vasut, > > On Sat, Aug 4, 2012 at 09:45:33 AM, Marek Vasut wrote: > > > On Tue, Jul 31, 2012 at 03:06:00 AM, Benoît Thébaudeau wrote: > > > > > > Marek, what do you think? > > > > > > > > > > Had a good evening with the EHCI r10 spec, hope I answered most > >

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-08-08 Thread Benoît Thébaudeau
Dear Marek Vasut, On Sat, Aug 4, 2012 at 09:45:33 AM, Marek Vasut wrote: > > On Tue, Jul 31, 2012 at 03:06:00 AM, Benoît Thébaudeau wrote: > > > > > Marek, what do you think? > > > > > > > > Had a good evening with the EHCI r10 spec, hope I answered most > > > > of > > > > your > > > > questions.

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-08-04 Thread Marek Vasut
Dear Benoît Thébaudeau, > Dear Marek Vasut, > > On Tue, Jul 31, 2012 at 03:06:00 AM, Benoît Thébaudeau wrote: > > > > Marek, what do you think? > > > > > > Had a good evening with the EHCI r10 spec, hope I answered most of > > > your > > > questions. > > > > Yes, thanks. > > Sorry again for th

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-08-03 Thread Benoît Thébaudeau
Dear Marek Vasut, On Tue, Jul 31, 2012 at 03:06:00 AM, Benoît Thébaudeau wrote: > > > Marek, what do you think? > > > > Had a good evening with the EHCI r10 spec, hope I answered most of > > your > > questions. > > Yes, thanks. Sorry again for the delay. I still have a few urgent issues to addr

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-31 Thread Marek Vasut
Dear Stefan Herbrechtsmeier, [...] > >>> What do you mean by "partial USB transfers"? As seen from EHCI > >>> users like > >>> the MSC driver (usb_storage.c), USB transfers either succeed or > >>> fail, but > >>> they cannot be "segmented". > >> > >> Segmented -- like multiple transfers being is

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-31 Thread Stefan Herbrechtsmeier
Dear Benoît Am 29.07.2012 02:48, schrieb Benoît Thébaudeau: Sorry for the delay. I'm very busy, and there is much to tell on this topic. No problem. Hopefully I don't make you to much extra trouble. BTW, the 15x speed gain that I gave in my patch description was compared to an older version o

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-31 Thread Stefan Herbrechtsmeier
Am 31.07.2012 03:06, schrieb Benoît Thébaudeau: Dear Marek Vasut, On Tue, Jul 31, 2012 at 12:38:54 AM, Marek Vasut wrote: [...] Can you explain where this gain would come from? In both cases, the data in USB transfers would be organized in the same way, and it would be accessed in memory also

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-30 Thread Benoît Thébaudeau
Dear Marek Vasut, On Tue, Jul 31, 2012 at 12:38:54 AM, Marek Vasut wrote: > [...] > > > > > Can you explain where this gain would come from? In both cases, > > > > the > > > > data in USB > > > > transfers would be organized in the same way, and it would be > > > > accessed in memory > > > > also

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-30 Thread Marek Vasut
Dear Benoît Thébaudeau, [...] > > > Can you explain where this gain would come from? In both cases, the > > > data in USB > > > transfers would be organized in the same way, and it would be > > > accessed in memory > > > also in the same way (regarding bursts). The only difference would > > > be

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-28 Thread Benoît Thébaudeau
Dear Stefan, Sorry for the delay. I'm very busy, and there is much to tell on this topic. On Tue, Jul 24, 2012 at 03:02:00 PM, Stefan Herbrechtsmeier wrote: > Am 23.07.2012 19:15, schrieb Benoît Thébaudeau: > > On Monday 23 July 2012 15:35:25 Stefan Herbrechtsmeier wrote: > >> Am 20.07.2012 17:35

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-27 Thread Marek Vasut
Dear Benoît Thébaudeau, > Dear Marek, > > On Fri, Jul 27, 2012 at 04:07:01 PM, Marek Vasut wrote: > > > + qtd = memalign(USB_DMA_MINALIGN, qtd_count * sizeof(struct qTD)); > > > + if (qtd == NULL) { > > > + printf("unable to allocate TDs\n"); > > > + return -1; > > > + } > > > + >

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-27 Thread Benoît Thébaudeau
Dear Marek, On Fri, Jul 27, 2012 at 04:07:01 PM, Marek Vasut wrote: > > + qtd = memalign(USB_DMA_MINALIGN, qtd_count * sizeof(struct qTD)); > > + if (qtd == NULL) { > > + printf("unable to allocate TDs\n"); > > + return -1; > > + } > > + > > memset(qh, 0, sizeof(struc

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-27 Thread Marek Vasut
Dear Benoît Thébaudeau, [...] > @@ -229,8 +230,23 @@ ehci_submit_async(struct usb_device *dev, unsigned > long pipe, void *buffer, le16_to_cpu(req->value), le16_to_cpu(req->value), > le16_to_cpu(req->index)); > > + if (req != NULL)/* SETUP + ACK */

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-24 Thread Stefan Herbrechtsmeier
Am 23.07.2012 19:15, schrieb Benoît Thébaudeau: On Monday 23 July 2012 15:35:25 Stefan Herbrechtsmeier wrote: Am 20.07.2012 17:35, schrieb Benoît Thébaudeau: On Friday 20 July 2012 17:15:13 Stefan Herbrechtsmeier wrote: Am 20.07.2012 17:03, schrieb Benoît Thébaudeau: On Friday 20 July 2012 16

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-23 Thread Benoît Thébaudeau
On Monday 23 July 2012 15:35:25 Stefan Herbrechtsmeier wrote: > Am 20.07.2012 17:35, schrieb Benoît Thébaudeau: > > On Friday 20 July 2012 17:15:13 Stefan Herbrechtsmeier wrote: > >> Am 20.07.2012 17:03, schrieb Benoît Thébaudeau: > >>> On Friday 20 July 2012 16:51:33 Stefan Herbrechtsmeier wrote:

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-23 Thread Stefan Herbrechtsmeier
Am 20.07.2012 17:35, schrieb Benoît Thébaudeau: On Friday 20 July 2012 17:15:13 Stefan Herbrechtsmeier wrote: Am 20.07.2012 17:03, schrieb Benoît Thébaudeau: On Friday 20 July 2012 16:51:33 Stefan Herbrechtsmeier wrote: Am 20.07.2012 15:56, schrieb Benoît Thébaudeau: Dear Marek Vasut, On Fri

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-20 Thread Benoît Thébaudeau
On Friday 20 July 2012 17:15:13 Stefan Herbrechtsmeier wrote: > Am 20.07.2012 17:03, schrieb Benoît Thébaudeau: > > On Friday 20 July 2012 16:51:33 Stefan Herbrechtsmeier wrote: > >> Am 20.07.2012 15:56, schrieb Benoît Thébaudeau: > >>> Dear Marek Vasut, > >>> > >>> On Friday 20 July 2012 15:44:01

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-20 Thread Stefan Herbrechtsmeier
Am 20.07.2012 17:03, schrieb Benoît Thébaudeau: On Friday 20 July 2012 16:51:33 Stefan Herbrechtsmeier wrote: Am 20.07.2012 15:56, schrieb Benoît Thébaudeau: Dear Marek Vasut, On Friday 20 July 2012 15:44:01 Marek Vasut wrote: On Friday 20 July 2012 13:37:37 Stefan Herbrechtsmeier wrote: Am

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-20 Thread Benoît Thébaudeau
On Friday 20 July 2012 16:51:33 Stefan Herbrechtsmeier wrote: > Am 20.07.2012 15:56, schrieb Benoît Thébaudeau: > > Dear Marek Vasut, > > > > On Friday 20 July 2012 15:44:01 Marek Vasut wrote: > >>> On Friday 20 July 2012 13:37:37 Stefan Herbrechtsmeier wrote: > Am 20.07.2012 13:26, schrieb Be

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-20 Thread Stefan Herbrechtsmeier
Am 20.07.2012 15:56, schrieb Benoît Thébaudeau: Dear Marek Vasut, On Friday 20 July 2012 15:44:01 Marek Vasut wrote: On Friday 20 July 2012 13:37:37 Stefan Herbrechtsmeier wrote: Am 20.07.2012 13:26, schrieb Benoît Thébaudeau: + int xfr_bytes = min(left_length, +

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-20 Thread Benoît Thébaudeau
Dear Marek Vasut, On Friday 20 July 2012 15:44:01 Marek Vasut wrote: > > On Friday 20 July 2012 13:37:37 Stefan Herbrechtsmeier wrote: > > > Am 20.07.2012 13:26, schrieb Benoît Thébaudeau: > > > > + int xfr_bytes = min(left_length, > > > > +

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-20 Thread Marek Vasut
Dear Benoît Thébaudeau, > On Friday 20 July 2012 13:37:37 Stefan Herbrechtsmeier wrote: > > Am 20.07.2012 13:26, schrieb Benoît Thébaudeau: > > > + int xfr_bytes = min(left_length, > > > + (QT_BUFFER_CNT * 4096 - > > > +

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-20 Thread Benoît Thébaudeau
On Friday 20 July 2012 13:37:37 Stefan Herbrechtsmeier wrote: > Am 20.07.2012 13:26, schrieb Benoît Thébaudeau: > > + int xfr_bytes = min(left_length, > > + (QT_BUFFER_CNT * 4096 - > > +((uint32_t)buf_pt

Re: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed

2012-07-20 Thread Stefan Herbrechtsmeier
Am 20.07.2012 13:26, schrieb Benoît Thébaudeau: This patch takes advantage of the hardware EHCI qTD queuing mechanism to avoid software overhead and to make transfers as fast as possible. The only drawback is a call to memalign. However, this is fast compared to the transfer timings, and the hea