- 13 6月, 2020 4 次提交
-
-
由 Baruch Siach 提交于
The random_port() routine is not used anywhere else. Make it local to dns.c to reduce code clutter, and shrink generated code a little. Signed-off-by: NBaruch Siach <baruch@tkos.co.il>
-
由 Ravik Hasija 提交于
RFC2348, RFC2349: - Option string is case in-sensitive. - Client must generate ERR pkt in case option value mismatch in server OACK - Fix debug print for options Signed-off-by: NRavik Hasija <rahasij@linux.microsoft.com> Reviewed-By: NRamon Fried <rfried.dev@gmail.com>
-
由 Ravik Hasija 提交于
During packet sequence number wraparound the show_block_marker() API was not called, as a result the progress marker doesn't stay within column boundary. Use position in file instead of sequence number to align the marker. Signed-off-by: NRavik Hasija <rahasij@linux.microsoft.com> Reviewed-By: NRamon Fried <rfried.dev@gmail.com>
-
由 Krebs, Olaf 提交于
If 'CONFIG_CMD_TFTPBOOT' or 'CONFIG_CMD_BOOTP' are disabled, the usage must be disabled, too! Signed-off-by: NOlaf Krebs <olaf.krebs@emh-metering.com> CC: Joe Hershberger <joe.hershberger@ni.com>
-
- 19 5月, 2020 8 次提交
-
-
由 Simon Glass 提交于
Move this uncommon header out of the common header. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Move this uncommon header out of the common header. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Move this header out of the common header. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Move this uncommon header out of the common header. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Move this fairly uncommon header out of the common header. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Move this uncommon header out of the common header. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 10 5月, 2020 2 次提交
-
-
由 Ye Li 提交于
For dual ethernet controllers, the HW design may connect ETH phys to one MDIO ports. So two different ethernet drivers have to share MDIO bus. Since two ethernet drivers are independent, we can't ensure their probe order. To resolve this problem, introduce an eth phy generic driver and uclass. After eth-uclass binds, we search the mdio node and binds the phy node with the eth-phy-generic driver. When one eth driver get its phy device, the parent of phy device will probe prior than phy device. So this ensure the eth driver ownes the MDIO bus will be probed before using its MDIO. Signed-off-by: NYe Li <ye.li@nxp.com> Signed-off-by: NPeng Fan <peng.fan@nxp.com>
-
由 Peng Fan 提交于
Add return value check Signed-off-by: NPeng Fan <peng.fan@nxp.com>
-
- 28 4月, 2020 2 次提交
-
-
由 Patrick Delaunay 提交于
Remove the unneeded define TFTP_MTU_BLOCKSIZE. Since the KConfig migration done by commit b618b370 ("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig"), CONFIG_TFTP_BLOCKSIZE is always defined and can be used directly to avoid confusion (fallback to 1468 in code is never used). Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
-
由 Patrick Delaunay 提交于
Add help message for the CONFIG_TFTP_BLOCKSIZE default value, as explain in tftp.c before migration in commit b618b370 ("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig") Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
-
- 06 4月, 2020 1 次提交
-
-
由 Michal Simek 提交于
When local-mac-address DT property is specified it is reported the same way as address read from eeprom/ROM. Show properly if mac address is coming from DT or ROM. Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
-
- 10 3月, 2020 1 次提交
-
-
由 Heinrich Schuchardt 提交于
When printing unsigned numbers use %u. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 13 2月, 2020 1 次提交
-
-
由 Rasmus Villemoes 提交于
Signed-off-by: NRasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 06 2月, 2020 1 次提交
-
-
由 Simon Glass 提交于
At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 25 1月, 2020 3 次提交
-
-
由 Simon Glass 提交于
These three globals relate to image handling. Move them to the image header file. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
These global variables are quite short and generic. In fact the same name is more often used locally for struct members and function arguments. Add a image_ prefix to make them easier to distinguish. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This function belongs more in flash.h than common.h so move it. Also remove the space before the bracket in some calls. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 18 1月, 2020 3 次提交
-
-
由 Simon Glass 提交于
These three globals relate to image handling. Move them to the image header file. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
These global variables are quite short and generic. In fact the same name is more often used locally for struct members and function arguments. Add a image_ prefix to make them easier to distinguish. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This function belongs more in flash.h than common.h so move it. Also remove the space before the bracket in some calls. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 15 12月, 2019 1 次提交
-
-
由 Simon Glass 提交于
These functions are used by code outside the network support, so move them to lib/ to be more accessible. Without this, the functions are only accessible in SPL/TPL only if CONFIG_SPL/TPL_NET are defined. Many boards do not enable those option but still want to do checksums in this format. Fix up a few code-style nits while we are here. Signed-off-by: NSimon Glass <sjg@chromium.org> Acked-by: NJoe Hershberger <joe.hershberger@ni.com> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
- 09 12月, 2019 8 次提交
-
-
由 Alex Marginean 提交于
The function connects an ethernet device to a PHY using DT information. This API is only available for eth devices with an associated device tree node. Signed-off-by: NAlex Marginean <alexandru.marginean@nxp.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Alex Marginean 提交于
Renamed dm_mdio_phy_connect arguments dev to mdiodev and addr to phyaddr for a bit more clarity and consistency with the following patches. Also use NULL instead of 0 on error return path. Signed-off-by: NAlex Marginean <alexandru.marginean@nxp.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Andre Przywara 提交于
Commit b618b370 ("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig") accidentally set the default *option* TFTP block size to 512 bytes, even though the comment in the code says that this is a terrible choice. Most boards didn't define the symbol before, so they got the default block size of 1468 bytes before, but now use 512 bytes, which is also the fallback. This leads to both abysmal performance and a lot of hashes printed on the screen (one character for every 5K), which is both annoying and slow over serial links. Set the default block size in Kconfig back to the value it had before. This improves TFTP performance from 2.8 MB/s to 6.9 MB/s on a Pine64. Fixes: b618b370 ("net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig") Signed-off-by: NAndre Przywara <andre.przywara@arm.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Michael Walle 提交于
device_probe() may fail in which case the seq_id will be -1. Don't display these devices during startup. While this is only a cosmetic change, the return value of eth_initialize() will also change to the actual number of available devices. The return value is only used in spl_net to decide whether there are any devices to boot from. So returning only available devices is also more correct in that case. Signed-off-by: NMichael Walle <michael@walle.cc> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Bin Meng 提交于
During testing of qemu-riscv32 with a 2GiB memory configuration, tftp always fails with a error message: Load address: 0x84000000 Loading: # TFTP error: trying to overwrite reserved memory... It turns out the result of 'tftp_load_addr + tftp_load_size' just overflows (0x100000000) and the test logic in store_block() fails. Fix this by adjusting the end address to ULONG_MAX when overflow is detected. Fixes: a156c47e ("tftp: prevent overwriting reserved memory") Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Heinrich Schuchardt 提交于
sandbox_defconfig does not compile using GCC 9.2.1: net/net.c: In function ‘net_process_received_packet’: net/net.c:1288:23: error: taking address of packed member of ‘struct ip_udp_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 1288 | sumptr = (ushort *)&(ip->udp_src); | ^~~~~~~~~~~~~~ Avoid the error by using a u8 pointer instead of an u16 pointer and in-lining ntohs(). Simplify the checksumming of the last message byte. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Tom Rini 提交于
While we have networking use cases within SPL we do not support loading files via NFS at this point in time. Disable calling nfs_start() so that the NFS related code can be garbage collected at link time. Signed-off-by: NTom Rini <trini@konsulko.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Joe Hershberger 提交于
Part of the env cleanup moved this out of the environment code and into the net code. However, this helper is sometimes needed even when the net stack isn't included. Move the helper to lib/net_utils.c like it's similarly-purposed string_to_ip(). Also rename the moved function to similar naming. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com> Reported-by: NOndrej Jirman <megous@megous.com>
-
- 03 12月, 2019 3 次提交
-
-
由 Simon Glass 提交于
This function belongs in time.h so move it over and add a comment. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NTom Rini <trini@konsulko.com>
-
由 Simon Glass 提交于
Create a new rand.h header file and move functions into it, to reduce the size of common.h Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NTom Rini <trini@konsulko.com>
-
由 Simon Glass 提交于
This feature is not enabled by any board. Drop it. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 05 9月, 2019 2 次提交
-
-
由 Heinrich Schuchardt 提交于
With GCC 9.2.1 net/nfs.c leads to multiple errors of type address-of-packed-member. net/nfs.c: In function ‘rpc_req’: net/nfs.c:199:18: error: taking address of packed member of ‘struct rpc_t’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 199 | p = (uint32_t *)&(rpc_pkt.u.call.data); | ^~~~~~~~~~~~~~~~~~~~~~ net/nfs.c: In function ‘nfs_readlink_reply’: net/nfs.c:631:46: error: taking address of packed member of ‘struct rpc_t’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 631 | nfs3_get_attributes_offset(rpc_pkt.u.reply.data); | ~~~~~~~~~~~~~~~^~~~~ LD drivers/block/built-in.o net/nfs.c: In function ‘nfs_read_reply’: net/nfs.c:692:46: error: taking address of packed member of ‘struct rpc_t’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 692 | nfs3_get_attributes_offset(rpc_pkt.u.reply.data); | ~~~~~~~~~~~~~~~^~~~~ struct rpc_t is only used as local variable. It is naturally packed. So there is no need for the attribute packed. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Heinrich Schuchardt 提交于
rpc_pkt.u.call.data is an array of uint32_t. There is no need to convert it to uint32_t *. memcpy() expects void * as it 1st and 2nd argument. There is no point in converting pointers to char * before passing them to memcpy(). In ntohl(data[1]) != 0 calling ntohl() is superfluous. If the value is zero, does not depend on the byte order. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-