From: "Jörg Krause" <jkrause@posteo.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: ci_udc: fix interaction with CONFIG_USB_ETH_CDC
Date: Tue, 01 Jul 2014 00:44:09 +0200 [thread overview]
Message-ID: <53B1E839.6040206@posteo.de> (raw)
In-Reply-To: <53B1C0B5.9030501@wwwdotorg.org>
On 06/30/2014 09:55 PM, Stephen Warren wrote:
> On 06/30/2014 10:02 AM, Stephen Warren wrote:
>> On 06/27/2014 07:34 PM, J?rg Krause wrote:
>>> On 06/28/2014 01:37 AM, Stephen Warren wrote:
>>>> On 06/27/2014 05:16 PM, J?rg Krause wrote:
>>>>> On 06/27/2014 11:55 PM, Stephen Warren wrote:
>>>>>> On 06/27/2014 03:37 PM, J?rg Krause wrote:
>>>>>>> I added the last series of patches beginning from 2014-06-10 for
>>>>>>> testing
>>>>>>> purposes. The patches from 2014-05-29 were already applied.
>>>>>>>
>>>>>>> First series of patches:
>>>>>>>
>>>>>>> Applying: usb: ci_udc: call udc_disconnect() from ci_pullup()
>>>>>>> Applying: usb: ci_udc: fix freeing of ep0 req
>>>>>>> Applying: usb: ci_udc: fix probe error cleanup
>>>>>>> Applying: usb: ci_udc: clean up all allocations in unregister
>>>>>>>
>>>>>>> Calling tftp the first time after a reset runs fine,
>>>>>> I thought the issue you reported was that the *first* time you run the
>>>>>> "tftp" command, it has issues such as timeouts? Did I misunderstand, or
>>>>>> did that issue somehow go away?
>>>>> That's right! This was the state before applying a series of patches
>>>>> after allow multiple buffer allocs per ep. Now, the first run of tftp
>>>>> runs without any errors.
>>>> Just to make sure I understand, here's what you saw:
>>>>
>>>> 1) tftp works fine to start with. No timeouts even on repeated
>>>> invocation.
>>> I went back in time and now I can be more precise. Everything worked
>>> fine until commit usb: ci_udc: allow multiple buffer allocs per ep which
>>> introduces timeouts in almost all tftp file downloads. Even the first
>>> run of tfpt can end in a timeout.
> I've pushed out some branches for you to test at:
> git://github.com/swarren/u-boot.git
>
> I looked back to see where the problematic commit 2813006fecda "usb:
> ci_udc: allow multiple buffer allocs per ep" was first applied. I then
> started with that same commit, and split up the problematic commit into
> tiny pieces, and applied each piece in turn. The result is in branch
> ci-udc-debug-base. If you could please test every commit in that branch:
>
>> fabf0df9523a usb: ci_udc: remainder of "allow multiple buffer allocs"
>> 373098f12a1d usb: ci_udc: dynamically alloc USB request objects
>> 43fff2b11860 usb: ci_udc: dynamically alloc bounce buffer
>> f21b9989bf83 usb: ci_udc: bounce only actual (rounded) packet len not buffer len for small pkts
>> 09ba064f9a99 usb: ci_udc: debounce only actual packet len not buffer len
>> 7e90ae0e4973 usb: ci_udc: use ci_req-> not ep-> a bit more
>> 9663ff89c764 usb: ci_udc: pass ci_req not ep to bounce/debounce
>> b9fdf9dd3f96 usb: ci_udc: move buffer fields from ep to req
>> 82f35a839e31 usb: ci_udc: introduce struct ci_req
>> c9396bc55069 usb: ci_udc: create "req" variable in bounce/unbounce
>> 173d294b94cf Merge branch 'serial' of git://www.denx.de/git/u-boot-microblaze
> ... and tell me which commit causes the problem, that would be useful.
> Since the problem is intermittent, please make sure you test each commit
> many times (at least 10-20, preferably nearer 100). You can stop early
> if you see the problem, but if you don't, please test many times to make
> sure there is no problem.
Commit 373098f12a1d usb: ci_udc: dynamically alloc USB request objects
cannot be build.
The error is introduced with the latest commit fabf0df9523a usb: ci_udc:
remainder of "allow multiple buffer allocs". I attached the output
message for this commit.
>
> You mentioned that your board support is not upstream. In order to test,
> you should probably do: For each commit I mention above, check it out,
> apply the minimal set of patches needed to support your board, and test.
Done. Just added board support.
>
> Please don't apply any other patches while testing this series. Please
> only test TFTP download, and not ubifs writes, etc.
This is my test script:
"test_usb=" \
"setenv i 64; " \
"while test ${i} -gt 0; do " \
"echo ${i}; " \
"tftp ${rootfs_file}; " \
"setexpr i ${i} - 1; " \
"done; " \
"setenv i; " \
"\0"
>
> I've also pushed out branch ci-udc-debug-tegra-dfu-working which has a
> whole load of other commits I needed to test the split up patches. These
> were needed to add board support for the board I'm currently using, and
> to fix/enhance the core DFU code. Most of these commits are already
> applied in u-boot.git/master, it's just that I cherry-picked them on top
> of the old base commit so I would have something to test with.
>
> BTW, I'm going on vacation from Jul 3rd-July 20th. I might answer some
> limited email during this time, but I certainly won't have access to any
> test HW.
-------------- next part --------------
=> reset
resetting ...
HTLLCLLC
U-Boot 2014.04-gfabf0df-dirty (Jul 01 2014 - 00:36:11)
CPU: Freescale i.MX28 rev1.2 at 454 MHz
BOOT: NAND, 3V3
DRAM: 64 MiB
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: usb_ether [PRIME]
Warning: Your board does not use generic board. Please read
doc/README.generic-board and take action. Boards not
upgraded by the late 2014 may break or be removed.
Hit any key to stop autoboot: 0
=> run test_usb
64
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
USB network up!
Using usb_ether device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'rootfs.ubifs'.
Load address: 0x40008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#######################################################
5.8 MiB/s
done
Bytes transferred = 13205504 (c98000 hex)
63
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
USB network up!
Using usb_ether device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'rootfs.ubifs'.
Load address: 0x40008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
######T ###########################################################
#################################################################
#################timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
Retry count exceeded; starting again
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
USB network up!
Using usb_ether device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'rootfs.ubifs'.
Load address: 0x40008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#######################################################
5.7 MiB/s
done
Bytes transferred = 13205504 (c98000 hex)
62
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
ERROR: The remote end did not respond in time.
at drivers/usb/gadget/ether.c:2388/usb_eth_init()
61
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
USB network up!
Using usb_ether device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'rootfs.ubifs'.
Load address: 0x40008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#######################################################
5.7 MiB/s
done
Bytes transferred = 13205504 (c98000 hex)
60
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
USB network up!
Using usb_ether device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'rootfs.ubifs'.
Load address: 0x40008000
Loading: ############timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
Retry count exceeded; starting again
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
USB network up!
Using usb_ether device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'rootfs.ubifs'.
Load address: 0x40008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#######################################################
5.7 MiB/s
done
Bytes transferred = 13205504 (c98000 hex)
5f
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
ERROR: The remote end did not respond in time.
at drivers/usb/gadget/ether.c:2388/usb_eth_init()
5e
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
USB network up!
Using usb_ether device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'rootfs.ubifs'.
Load address: 0x40008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
############################################################T #####
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#######################################################
1.7 MiB/s
done
Bytes transferred = 13205504 (c98000 hex)
5d
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
USB network up!
Using usb_ether device
TFTP from server 10.0.0.1; our IP address is 10.0.0.2
Filename 'rootfs.ubifs'.
Load address: 0x40008000
Loading: ################################################timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
T timeout sending packets to usb ethernet
timeout sending packets to usb ethernet
Retry count exceeded; starting again
using ci_udc, OUT ep- IN ep- STATUS ep-
MAC 00:19:b8:00:00:02
HOST MAC 00:19:b8:00:00:01
high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
USB network up!
Abort
=>
next prev parent reply other threads:[~2014-06-30 22:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 18:02 [U-Boot] [PATCH] usb: ci_udc: fix interaction with CONFIG_USB_ETH_CDC Stephen Warren
2014-06-23 19:03 ` Eric Nelson
2014-06-25 13:51 ` Marek Vasut
2014-06-25 16:06 ` Stephen Warren
2014-06-27 21:37 ` Jörg Krause
2014-06-27 21:52 ` Jörg Krause
2014-06-27 21:56 ` Stephen Warren
2014-06-27 23:27 ` Jörg Krause
2014-06-27 21:55 ` Stephen Warren
2014-06-27 23:16 ` Jörg Krause
2014-06-27 23:37 ` Stephen Warren
2014-06-28 0:09 ` Jörg Krause
2014-06-28 1:34 ` Jörg Krause
2014-06-28 20:37 ` Jörg Krause
2014-06-28 20:45 ` Marek Vasut
2014-06-28 20:53 ` Jörg Krause
2014-06-29 20:33 ` Jörg Krause
2014-06-30 9:37 ` Marek Vasut
2014-06-30 13:34 ` Jörg Krause
2014-06-30 16:02 ` Stephen Warren
2014-06-30 19:55 ` Stephen Warren
2014-06-30 22:44 ` Jörg Krause [this message]
2014-06-30 22:51 ` Stephen Warren
2014-06-30 23:17 ` Jörg Krause
2014-06-30 23:56 ` Marek Vasut
2014-06-30 20:55 ` Jörg Krause
2014-06-30 21:15 ` Marek Vasut
2014-06-30 21:43 ` Jörg Krause
2014-06-30 21:50 ` Marek Vasut
2014-06-25 20:20 ` 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=53B1E839.6040206@posteo.de \
--to=jkrause@posteo.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 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.