public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/5] ehci-hcd: Boost transfer speed
Date: Fri, 27 Jul 2012 16:07:01 +0200	[thread overview]
Message-ID: <201207271607.02112.marex@denx.de> (raw)
In-Reply-To: <1024949320.326453.1342783584348.JavaMail.root@advansee.com>

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 */
> +		qtd_count += 1 + 1;
> +	if (length > 0 || req == NULL) {	/* buffer */
> +		if ((uint32_t)buffer & 4095)		/* page-unaligned */
> +			qtd_count += DIV_ROUND_UP(((uint32_t)buffer & 4095) +
> +					length, (QT_BUFFER_CNT - 1) * 4096);
> +		else					/* page-aligned */
> +			qtd_count += DIV_ROUND_UP(length, QT_BUFFER_CNT * 4096);
> +	}

Ok, now I almost see it.

> +	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(struct QH));
> -	memset(qtd, 0, 3 * sizeof(*qtd));
> +	memset(qtd, 0, qtd_count * sizeof(*qtd));
> 
>  	toggle = usb_gettoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe));
> 
[...]

I'm cool with the rest, I'll think about the calculation a bit though, since I'm 
not certain about it right away and let you know. Will you be submitting the 
series again or shall I just merge 3/5 and 4/5, apply this one and be done with 
it?

Best regards,
Marek Vasut

  parent reply	other threads:[~2012-07-27 14:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 20:17 [U-Boot] [PATCH 2/5] ehci-hcd: Boost transfer speed Benoît Thébaudeau
2012-07-20 11:26 ` [U-Boot] [PATCH v2 " Benoît Thébaudeau
2012-07-20 11:37   ` Stefan Herbrechtsmeier
2012-07-20 13:17     ` Benoît Thébaudeau
2012-07-20 13:44       ` Marek Vasut
2012-07-20 13:56         ` Benoît Thébaudeau
2012-07-20 14:51           ` Stefan Herbrechtsmeier
2012-07-20 15:03             ` Benoît Thébaudeau
2012-07-20 15:15               ` Stefan Herbrechtsmeier
2012-07-20 15:35                 ` Benoît Thébaudeau
2012-07-23 13:35                   ` Stefan Herbrechtsmeier
2012-07-23 17:15                     ` Benoît Thébaudeau
2012-07-24 13:02                       ` Stefan Herbrechtsmeier
2012-07-29  0:48                         ` Benoît Thébaudeau
2012-07-30 22:38                           ` Marek Vasut
2012-07-31  1:06                             ` Benoît Thébaudeau
2012-07-31 19:52                               ` Stefan Herbrechtsmeier
2012-08-01  2:41                                 ` Marek Vasut
2012-08-03 23:02                               ` Benoît Thébaudeau
2012-08-04  7:45                                 ` Marek Vasut
2012-08-08 23:14                                   ` Benoît Thébaudeau
2012-08-08 23:14                                     ` Marek Vasut
2012-07-31 20:01                           ` Stefan Herbrechtsmeier
2012-07-27 14:07   ` Marek Vasut [this message]
2012-07-27 14:16     ` Benoît Thébaudeau
2012-07-27 14:30       ` Marek Vasut
2012-08-09 21:51   ` [U-Boot] [PATCH v3 3/8] " Benoît Thébaudeau
2012-08-09 22:32     ` Marek Vasut
2012-07-27 12:54 ` [U-Boot] [PATCH 2/5] " Marek Vasut
2012-07-27 13:59   ` Benoît Thébaudeau
2012-07-27 14:01     ` Marek Vasut
2012-07-27 14:13       ` Benoît Thébaudeau
2012-07-27 14:31         ` Marek Vasut
2012-07-29  0:58         ` Benoît Thébaudeau
2012-07-29  1:40           ` Marek Vasut
2012-07-29 14:14             ` Benoît Thébaudeau
2012-07-29 18:08               ` Marek Vasut

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=201207271607.02112.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /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