From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?J=F6rg_Krause?= Date: Sun, 29 Jun 2014 22:33:26 +0200 Subject: [U-Boot] [PATCH] usb: ci_udc: fix interaction with CONFIG_USB_ETH_CDC In-Reply-To: <53AF2B52.2010007@posteo.de> References: <1403546568-30830-1-git-send-email-swarren@wwwdotorg.org> <53AE1BA9.9000401@posteo.de> <53AF278F.80403@posteo.de> <201406282245.21271.marex@denx.de> <53AF2B52.2010007@posteo.de> Message-ID: <53B07816.1070404@posteo.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. Very, very strange.