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 2/5] ehci-hcd: Boost transfer speed
Date: Fri, 27 Jul 2012 16:01:11 +0200	[thread overview]
Message-ID: <201207271601.11940.marex@denx.de> (raw)
In-Reply-To: <806388763.701359.1343397576841.JavaMail.root@advansee.com>

Dear Beno?t Th?baudeau,

[...]

> > Ok, maybe you can please elaborate on this crazy calculation in here?
> > Or somehow
> > clarify it? Also, won't the macros in include/common.h help in a way?
> > (like
> > ROUND() etc).
> 
> I have already posted a v2 for this specific patch (only 2/5) that does
> exactly that. Please review only the latest versions of patches.
> 
> > I don't really graps what you're trying to calculate here, so maybe
> > even a
> > comment would help.
> 
> I'll do that.
> 
> > > +		else					/* page-aligned */
> > > +			qtd_count += (length + QT_BUFFER_CNT * 4096 - 1) /
> > > +					(QT_BUFFER_CNT * 4096);
> > 
> > Same here, also please avoid using those 4096 and such constants ...
> > maybe
> > #define them in ehci.h ?
> 
> Yes. It was already everywhere, so I went on the same way.

I'm not exactly proud of the state of the usb stack, you know :(

> Do you think
> using PAGE_SIZE from <linux/compat.h> would be fine since these 4096 are
> nothing more than page sizes?

Isn't that intel-specific?

> > > +	}
> > > +	qtd = memalign(USB_DMA_MINALIGN, qtd_count * sizeof(struct qTD));
> > 
> > So your code can alloc more than 5 qTDs ? How does it chain them
> > then? Into more
> > QHs ?
> 
> It's done in exactly the same way as for the original 3 qTDs, only with
> more qTDs, but still with 5 qt_buffers per qTD.

I'm starting to see what you're trying to do. That's really cool :)

[...]
> > > +			token = (toggle << 31) |
> > > +			    (xfr_bytes << 16) |
> > > +			    ((req == NULL ? 1 : 0) << 15) |
> > > +			    (0 << 12) |
> > > +			    (3 << 10) |
> > > +			    ((usb_pipein(pipe) ? 1 : 0) << 8) | (0x80 << 0);
> > 
> > If you could fix all this magic afterwards (not in these patches),
> > that'd be
> > great.
> 
> Do you only mean #defining all those values?

Yes, but let's do this in a subsequent patch. It can wait for later.

[...]

> Best regards,
> Beno?t Th?baudeau

  reply	other threads:[~2012-07-27 14:01 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
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 [this message]
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=201207271601.11940.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