From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] USB-CDC: called handle_interrupts inside usb_eth_send
Date: Thu, 12 Aug 2010 10:44:29 +0200 [thread overview]
Message-ID: <4C63B46D.1080000@denx.de> (raw)
In-Reply-To: <AANLkTimgJw9_RuQRvL0ke+4nFwosNtDb+9WUQzniijyB@mail.gmail.com>
Remy Bohmer wrote:
> Hi Stefano,
>
Hi Remy,
>> + packet_sent=0;
> This line breaks the at91sam9261 code. Can you please fix this?
This means to me that tx_complete() is not called for at91sam9261, as it
supposed to be (or better, as I supposed..).
I see that packet_sent is reset only in the eth_init() function. Does it
mean that usb_eth_send() does not wait for tx completion in the case of
at91sam9261 ?
I supposed (and I manage in this way..) that packet_sent is used as flag
to detect when a single packet is really transmitted, and in this way is
used when I call usb_handle_interrupts(). The callback stored into the
USB request is tx_complete() that is the one responsible to set the
flag. So the simple mechanism is that usb_eth_send clear the flag and
wait until tx_complete sets it. It seems now to me that on at91sam9261
usb_eth_send() waits only for the first packet, and then it does not
wait anymore. How can we be sure that the packet is really transmitted ?
Should I protect the line with some AT91 CONFIG or am I missing something ?
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2010-08-12 8:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 21:40 [U-Boot] [PATCH] USB-CDC: called handle_interrupts inside usb_eth_send Stefano Babic
2010-08-11 22:28 ` Remy Bohmer
2010-08-12 8:44 ` Stefano Babic [this message]
2010-08-12 9:52 ` Remy Bohmer
2010-08-12 12:33 ` Stefano Babic
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=4C63B46D.1080000@denx.de \
--to=sbabic@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