From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: ci_udc: fix interaction with CONFIG_USB_ETH_CDC
Date: Mon, 30 Jun 2014 11:37:45 +0200 [thread overview]
Message-ID: <201406301137.45904.marex@denx.de> (raw)
In-Reply-To: <53B07816.1070404@posteo.de>
On Sunday, June 29, 2014 at 10:33:26 PM, J?rg Krause wrote:
> On 06/28/2014 10:53 PM, J?rg Krause wrote:
> > [snip]
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > http://lists.denx.de/mailman/listinfo/u-boot
>
> I did some tests this weekend on u-boot-usb/master branch.
>
> If I run "env default -a" and then "saveenv" after a reset, I get the
> same error as running three time "tftp file" in a row.
> Log:
>
> U-Boot 2014.07-rc3-g18e0313-dirty (Jun 29 2014 - 21:56:02)
>
> 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]
> Hit any key to stop autoboot: 0
> => env default -a
> ## Resetting to default environment
> => saveenv
> Saving Environment to NAND...
> Erasing NAND...
> Erasing at 0x360000 -- 100% complete.
> Writing to NAND... OK
> => tftp rootfs.ubifs
> 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()
>
> "env default -a" removes stdin, stdout, stderr, and ver from the output
> of "printenv".
>
> Looking at drivers/usb/gadget/ether.c:usb_eth_init I found the
> environment variable "cdc_connect_timeout". I played a little bit with
> the settings.
>
> 1) Using "setenv cdc_connect_timeout 1" from the command line: tftp runs
> more then three time in a row. Actually I can run tftp more than ten
> times in row and it produces no error. I tested the values 1, 3, and 15
> for cdc_connect_timeout.
>
> 2) Setting #define CONFIG_EXTRA_ENV_SETTINGS "cdc_connect_timeout=1\0" \
> in my config header file. This does not help and produces the error on
> the fourth run of tfpd. Tested with values 1 and 3 for timeout.
I just tested the CDC ethernet on M28EVK with u-boot-usb/master and loading
64MiB file from a TFTP server running on a local machine. It seems that for some
reason, in the udc_gadget_handle_interrupts() or somewhere there, it starts not
getting interrupts. Can you try with this change:
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index a6433e8..1af6d12 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -727,14 +727,8 @@ void udc_irq(void)
int usb_gadget_handle_interrupts(void)
{
- u32 value;
- struct ci_udc *udc = (struct ci_udc *)controller.ctrl->hcor;
-
- value = readl(&udc->usbsts);
- if (value)
- udc_irq();
-
- return value;
+ udc_irq();
+ return 0;
}
void udc_disconnect(void)
Best regards,
Marek Vasut
next prev parent reply other threads:[~2014-06-30 9:37 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 [this message]
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
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=201406301137.45904.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