- 08 8月, 2020 1 次提交
-
-
由 Simon Glass 提交于
The test flags used by driver model are currently not available to other tests. Rather than creating two sets of flags, make these flags generic by changing the DM_ prefix to UT_ and moving them to the test.h header. This will allow adding other test flags without confusion. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 04 8月, 2020 1 次提交
-
-
由 Simon Glass 提交于
These header file should not be included in other header files. Remove them and add to each individual file. Add test/test.h to test/ui.h since that is a reasonable place. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 12 6月, 2020 1 次提交
-
-
由 Michael Walle 提交于
If there are aliases for an uclass, set the base for the "dynamically" allocated numbers next to the highest alias. Please note, that this might lead to holes in the sequences, depending on the device tree. For example if there is only an alias "ethernet1", the next device seq number would be 2. In particular this fixes a problem with boards which are using ethernet aliases but also might have network add-in cards like the E1000. If the board is started with the add-in card and depending on the order of the drivers, the E1000 might occupy the first ethernet device and mess up all the hardware addresses, because the devices are now shifted by one. Also adapt the test cases to the new handling and add test cases checking the holes in the seq numbers. Signed-off-by: NMichael Walle <michael@walle.cc> Reviewed-by: NAlex Marginean <alexandru.marginean@nxp.com> Tested-by: NAlex Marginean <alexandru.marginean@nxp.com> Acked-by: NVladimir Oltean <olteanv@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Tested-by: Michal Simek <michal.simek@xilinx.com> [on zcu102-revA]
-
- 20 5月, 2020 1 次提交
-
-
由 Simon Glass 提交于
Quite a few tests still use ut_assertok(memcmp(...)) and variants. Modify them to use the macro designed for this purpose. Suggested-by: NWolfgang Wallner <wolfgang.wallner@br-automation.com> Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NWolfgang Wallner <wolfgang.wallner@br-automation.com>
-
- 19 5月, 2020 1 次提交
-
-
由 Simon Glass 提交于
Move this header out of the common header. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 12 8月, 2019 1 次提交
-
-
由 Simon Glass 提交于
Move env_set() over to the new header file. Acked-by: NJoe Hershberger <joe.hershberger@ni.com> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 25 1月, 2019 1 次提交
-
-
由 Thomas RIENOESSL 提交于
When dealing with two ethernet ports and having "netretry" set to "once", it could occur that the connection (e.g. an ARP request) failed, hence the status of the netloop was "NETLOOP_FAIL". Due to the setting of "netretry", the network logic would then switch to the other network interface, assigning "ret" with the return value of "net_start_again()". If this call succeeded we would return 0 (i.e. success) to the caller when in reality the network action failed. Signed-off-by: NThomas RIENOESSL <thomas.rienoessl@bachmann.info> Reviewed-by: NChristian Gmeiner <christian.gmeiner@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 11 10月, 2018 3 次提交
-
-
由 Joe Hershberger 提交于
Peter originally sent a fix, but it breaks a number of other things. This addresses the original reported issue in a different way. That report was: > U-Boot has 1 common buffer to send Ethernet frames, pointed to by > net_tx_packet. When sending to an IP address without knowing the MAC > address, U-Boot makes an ARP request (using the arp_tx_packet buffer) > to find out the MAC address of the IP addressr. When a matching ARP > reply is received, U-Boot continues sending the frame stored in the > net_tx_packet buffer. > > However, in the mean time, if U-Boot needs to send out any network > packets (e.g. replying ping packets or ARP requests for its own IP > address etc.), it will use the net_tx_packet buffer to prepare the > new packet. Thus this buffer is no longer the original packet meant > to be transmitted after the ARP reply. The original packet will be > lost. This instead uses the ARP tx buffer to send async replies in the case where we are actively waiting for an ARP reply. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reported-by: NTran Tien Dat <peter.trantiendat@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Tested-by: NBin Meng <bmeng.cn@gmail.com>
-
由 Joe Hershberger 提交于
The target will respond to pings while doing other network handling. Make sure that the response happens and is correct. This currently corrupts the ongoing operation of the device if it happens to be awaiting an ARP reply of its own to whatever serverip it is attempting to communicate with. In the test, add an expectation that the user operation (ping, in this case) will fail. A later patch will address this problem. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
由 Joe Hershberger 提交于
This tests that ARP requests made to this target's IP address are responded-to by the target when it is doing other networking operations. This currently corrupts the ongoing operation of the device if it happens to be awaiting an ARP reply of its own to whatever serverip it is attempting to communicate with. In the test, add an expectation that the user operation (ping, in this case) will fail. A later patch will address this problem. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
- 07 5月, 2018 1 次提交
-
-
由 Tom Rini 提交于
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 28 4月, 2018 1 次提交
-
-
由 Tom Rini 提交于
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 06 10月, 2017 1 次提交
-
-
由 Tom Rini 提交于
Coverity scan has identified potential buffer overruns in these tests. Correct this by zeroing our buffer and using strncpy not strcpy. Reported-by: Coverity (CID: 155462, 155463) Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: NTom Rini <trini@konsulko.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 16 8月, 2017 2 次提交
-
-
由 Simon Glass 提交于
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: NWolfgang Denk <wd@denx.de> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: NWolfgang Denk <wd@denx.de> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 05 4月, 2017 1 次提交
-
-
由 Stefan Roese 提交于
This patch adds the flags parameter to device_remove() and changes all calls to this function to provide the default value of DM_REMOVE_NORMAL for "normal" device removal. This is in preparation for the driver specific pre-OS (e.g. DMA cancelling) remove support. Signed-off-by: NStefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: NSimon Glass <sjg@chromium.org>
-
- 30 10月, 2015 1 次提交
-
-
由 Bin Meng 提交于
U-Boot crashes when doing a 'ping' with the following test scenario: - All ethernet devices are not probed - "ethaddr" for all ethernet devices are not set - "ethact" is set to a valid ethernet device name Add a new test case 'dm_test_eth_act' to hit such scenario. Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 09 9月, 2015 1 次提交
-
-
由 Bin Meng 提交于
Add one more ethernet device node in the sandbox test device tree, with name 'sbe5'. This is to support a new test case for testing network device rotation. Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 21 5月, 2015 3 次提交
-
-
由 Joe Hershberger 提交于
Make sure that the env gets cleaned up after a test fails so that other tests aren't affected. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Separate the ability to define tests and assert status of test functions from the dm tests so they can be used more consistently throughout all tests. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Use a regular expression to apply the default formatting flags for all ethaddr env vars. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 06 5月, 2015 1 次提交
-
-
由 Joe Hershberger 提交于
Indicate to the emulated sandbox Ethernet driver when we expect a timeout and tell it to leap forward. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
- 19 4月, 2015 8 次提交
-
-
由 Joe Hershberger 提交于
Finish eliminating CamelCase from net.c and other failures Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
This patch is simply clean-up to make the IPv4 type that is used match what Linux uses. It also attempts to move all variables that are IP addresses use good naming instead of CamelCase. No functional change. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Acked-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Take a pass at plumbing errors through to the users of the network stack Currently only the start() function errors will be returned from NetLoop(). recv() tends not to have errors, so that is likely not worth adding. send() certainly can return errors, but this patch does not attempt to plumb them yet. halt() is not expected to error. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
The effect of the "netretry" env var was recently changed. This test checks that behavior. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Make sure that the ethrotate behavior occurs as expected. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
The ethprime env var is used to indicate the starting device if none is specified in ethact. Also support aliases specified in the ethprime var. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Allow network devices to be referred to as "eth0" instead of "eth@12345678" when specified in ethact. Add tests to verify this behavior. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Joe Hershberger 提交于
Add a test for the eth uclass using the sandbox eth driver. Verify basic functionality of the network stack / eth uclass by exercising the ping function. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-