u-boot-brain/test/dm
Joe Hershberger ac3f26cc15 net: Don't overwrite waiting packets with asynchronous replies
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: Joe Hershberger <joe.hershberger@ni.com>

Reported-by: Tran Tien Dat <peter.trantiendat@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2018-10-10 12:29:01 -05:00
..
adc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
axi.c test: Add AXI test 2018-08-11 08:11:02 +02:00
blk.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
board.c test: Add tests for board uclass 2018-09-29 11:49:35 -06:00
bus.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
clk.c clk: add clk_valid() 2018-08-03 19:53:10 -04:00
cmd_dm.c dm: fix alignment of help message of "dm" command 2018-09-18 13:23:33 -06:00
core.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cpu.c test: Add tests for CPU uclass 2018-09-18 08:12:21 -06:00
eth.c net: Don't overwrite waiting packets with asynchronous replies 2018-10-10 12:29:01 -05:00
firmware.c dm: test: Add "/firmware" node scan test 2018-09-29 11:49:35 -06:00
gpio.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
i2c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig test: Move the unit tests to their own menu 2015-05-21 09:16:17 -04:00
led.c sandbox: led: use new function to configure default state 2018-08-10 10:27:32 -04:00
mailbox.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile test: tee: test TEE uclass 2018-10-07 11:07:05 -04:00
misc.c test: Add tests for misc uclass 2018-08-11 16:00:38 +02:00
mmc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ofnode.c test: ofnode: test ofnode_by_prop_value() 2018-09-18 08:12:21 -06:00
osd.c video_osd: Add osd sandbox driver and tests 2018-09-28 18:26:52 +02:00
pci.c test: dm: pci: Add cases for finding PCI capability APIs 2018-08-08 12:49:31 +01:00
phy.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pmic.c sandbox: tests: Add tests for mc34708 PMIC device 2018-05-18 08:27:26 +02:00
power-domain.c dm: power-domain: query power domain after get device 2018-08-06 11:52:19 +02:00
pwm.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ram.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
regmap.c test: regmap: add read/modify/write test 2018-05-08 09:07:40 -04:00
regulator.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
remoteproc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
reset.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rtc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
serial.c sandbox: Add serial test 2018-09-10 20:48:12 -04:00
sf.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
smem.c test: smem: add basic smem test 2018-07-19 17:03:28 -04:00
spi.c dm: spi: Update sandbox SPI emulation driver to use ofnode 2018-07-09 09:11:00 -06:00
spmi.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
syscon.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sysreset.c test: Add tests for sysreset_get_status 2018-09-18 00:01:18 -06:00
tee.c test: tee: test TEE uclass 2018-10-07 11:07:05 -04:00
test-driver.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
test-fdt.c test: Add tests for dev_{enable, disable}_by_path 2018-09-29 11:49:35 -06:00
test-main.c dm: test: Fix typo in test-main comment 2018-08-24 13:20:19 -04:00
test-uclass.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
timer.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
usb.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
video.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00