- Oct 25, 2014
-
-
Jeroen Hofstee authored
Signed-off-by:
Jeroen Hofstee <jeroen@myspectrum.nl>
-
- Jul 22, 2014
-
-
Pavel Machek authored
Improve error messages in case of invalid/unset ethernet addresses. Signed-off-by:
Pavel Machek <pavel@denx.de>
-
- May 12, 2014
-
-
Masahiro Yamada authored
Some functions in include/net.h are ported from include/linux/etherdevice.h of Linux Kernel. For ex. is_zero_ether_addr() is_multicast_ether_addr() is_broadcast_ether_addr() is_valid_ether_addr(); So, we should use the same function name as that of Linux Kernel, eth_rand_addr(), for consistency. Besides, eth_rand_addr() has been implemented as an inline function. So it should not be surrounded by #ifdef CONFIG_RANDOM_MACADDR. Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- Feb 07, 2014
-
-
Alexey Brodkin authored
In "common/Makefile" "miiphyutil.o" gets built if any of the following items enabled: * CONFIG_PHYLIB * CONFIG_MII * CONFIG_CMD_MII So it's possible to not define CONFIG_MII or CONFIG_CMD_MII and still use functions like "miiphy_get_dev_by_name". In its turn "miiphy_get_dev_by_name" traverses "mii_devs" list which is not initialized because "miiphy_init" never got called. Cc: Rob Herring <rob.herring@calxeda.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de> Acked-by:
Joe Hershberger <joe.hershberger@ni.com> Signed-off-by:
Alexey Brodkin <abrodkin@synopsys.com>
-
- Jul 24, 2013
-
-
Wolfgang Denk authored
Signed-off-by:
Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by:
Tom Rini <trini@ti.com>
-
- Sep 27, 2012
-
-
Benoît Thébaudeau authored
If dev->enetaddr was supposed to be set with dev->write_hwaddr() but the MAC address was not valid, return an error. Signed-off-by:
Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Acked-by:
Mike Frysinger <vapier@gentoo.org>
-
- Sep 24, 2012
-
-
Joe Hershberger authored
Previously u-boot would initialize the network interface for every network operation and then shut it down again. This makes sense for most operations where the network in not known to be needed soon after the operation is complete. In the case of netconsole, it will use the network for every interaction with the shell or every printf. This means that the network is being reinitialized very often. On many devices, this intialization is very slow. This patch checks for consecutive netconsole actions and leaves the ethernet hardware initialized between them. It will still behave the same old way for all other network operations and any time another network operation happens between netconsole operations. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Cc: Stefano Babic <sbabic@denx.de> Acked-by:
Stefano Babic <sbabic@denx.de>
-
Michael Walle authored
If the requested length is too small to hold the received packet, eth_receive() will return -1 and will leave the packet in the receive buffers. Instead of returning an error in this case, we return the first portion of the received packet and remove it from the receive buffers. This fixes FreeBSD's ubldr. Without this patch it will just stop receiving packets if the NIC receives more than PKTBUFSRX too large packets. Signed-off-by:
Michael Walle <michael@walle.cc> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Rafal Jaworowski <raj@semihalf.com> Cc: Piotr Kruszynski <ppk@semihalf.com>
-
- Jul 11, 2012
-
-
Joe Hershberger authored
This function is currently only used in one case. Inline for now. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Rob Herring authored
If the net driver has setup a valid ethernet address and an ethernet address is not set in the environment already, then set the environment variables from the net driver setting. This enables pxe booting on boards which don't set ethaddr env variable. Signed-off-by:
Rob Herring <rob.herring@calxeda.com>
-
- Jul 07, 2012
-
-
Michael Walle authored
Add new function eth_random_enetaddr() to generate a locally administered ethernet address. Signed-off-by:
Michael Walle <michael@walle.cc> Acked-by:
Joe Hershberger <joe.hershberger@gmail.com>
-
- May 15, 2012
-
-
Mike Frysinger authored
All arches init this the same way, so move the logic into the core net code to avoid duplicating it everywhere else. Signed-off-by:
Mike Frysinger <vapier@gentoo.org> Reviewed-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
- Apr 04, 2012
-
-
Eric Miao authored
Ignore the return value of eth_getenv_enetaddr_by_index(), and if it fails, fall back to use dev->enetaddr, which could be filled up by the ethernet device driver: With the current code, introduced with below commit, eth_write_hwaddr() will fail immediately if there is no eth<n>addr in the environment variables. However, e.g. for an overo based product that uses the SMSC911x ethernet chip (with the MAC address set via EEPROM connected to the SMSC911x chip), the MAC address is still OK. On mx28 boards that are depending on the OCOTP bits to set the MAC address (like the Denx m28 board), the OCOTP bits should be used instead of failing on the environment variables. Actually, this was the original behavior, and was later changed by commit 7616e785. Signed-off-by:
Eric Miao <eric.miao@linaro.org> Acked-by:
Simon Glass <sjg@chromium.org> Acked-by:
Dirk Behme <dirk.behme@de.bosch.com> CC: Stefan Roese <sr@denx.de> CC: Eric Miao <eric.miao@linaro.org> CC: Wolfgang Denk <wd@denx.de> CC: Philip Balister <philip@balister.org> CC: Zach Sadecki <zach@itwatchdogs.com>
-
- Mar 18, 2012
-
-
Simon Glass authored
These calls should not be made directly any more, since bootstage will call the show_boot_...() functions as needed. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This changes over the network-related progress numbers to use enums from bootstage.h. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Rather than the caller negating our progress numbers to indicate an error has occurred, which seems hacky, add a function to indicate this. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Mike Frysinger <vapier@gentoo.org>
-
Mike Frysinger authored
A few subsystems are using the same define "NAMESIZE". This has been working so far because they define it to the same number. However, I want to change the size of eth_device's NAMESIZE, so rather than tweak the define names, simply drop references to it. Almost no one does, and the handful that do can easily be changed to a sizeof(). Signed-off-by:
Mike Frysinger <vapier@gentoo.org>
-
- Mar 06, 2012
-
-
Marek Vasut authored
This function was defined as an extern in net/eth.c, drop that and use standard means of calling it. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Stefan Roese <sr@denx.de>
-
Marek Vasut authored
This function was defined as an extern in net/eth.c, drop that and use standard means of calling it. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
-
- Mar 03, 2012
-
-
Vincent Palatin authored
Fix the crash when running several times usb_init() with a USB ethernet device plugged. Signed-off-by:
Vincent Palatin <vpalatin@chromium.org> Tested-by:
Wolfgang Grandegger <wg@denx.de>
-
- Dec 20, 2011
-
-
Michael Walle authored
Instead of counting the device index everytime a functions needs it, store it in the eth_device struct. eth_register() keeps track of the indices and updates the device's index number. This simplifies some functions in net/eth.c. Additionally, a network driver can now query its index, eg. to get the correct environment ethaddr name. Signed-off-by:
Michael Walle <michael@walle.cc> Cc: Prafulla Wadaskar <prafulla@marvell.com> Cc: Mike Frysinger <vapier@gentoo.com> Cc: Wolfgang Denk <wd@denx.de> Acked-by:
Mike Frysinger <vapier@gentoo.org>
-
- Oct 05, 2011
-
-
Mike Frysinger authored
This is long over due. All but two net drivers have been converted, but those have now been dropped. The only thing left to do is actually delete all references to NET_MULTI and code that is compiled when that is not defined. So here we scrub the core code. Signed-off-by:
Mike Frysinger <vapier@gentoo.org>
-
Mike Frysinger authored
This driver was never converted to NET_MULTI, and no board uses it. So punt it and be done. Signed-off-by:
Mike Frysinger <vapier@gentoo.org>
-
- Oct 01, 2011
-
-
Philip Balister authored
Signed-off-by:
Philip Balister <philip@opensdr.com>
-
- Sep 21, 2011
-
-
Mike Frysinger authored
The new sanity check introduces a printf warning for some systems: eth.c:233: warning: format '%zu' expects type 'size_t', but argument 3 has type 'int' Rather than tweak the format string, use the new assert() helper instead. Signed-off-by:
Mike Frysinger <vapier@gentoo.org>
-
- Sep 09, 2011
-
-
Helmut Raiger authored
eth_get_dev_by_name() is not safe to use for devname being NULL as it uses strcmp. This patch makes it fail with a BUG(). Signed-off-by:
Helmut Raiger <helmut.raiger@hale.at> Acked-by:
Mike Frysinger <vapier@gentoo.org>
-
- Sep 05, 2011
-
-
Simon Glass authored
This fixes "Warning: failed to set MAC address" on platforms which rely on an 'ethaddr' environment variable to set the MAC address. This bug was introduced by this commit: 7616e785 Add Ethernet hardware MAC address framework to usbnet Signed-off-by:
Simon Glass <sjg@chromium.org> Tested-by:
Kumar Gala <galak@kernel.crashing.org> Tested-by:
Michal Simek <monstr@monstr.eu> Tested-by:
Heiko Schocher <hs@denx.de>
-
- Sep 04, 2011
-
-
Michal Simek authored
If name is longer than allocated space NAMESIZE mac address is rewritten which show error message like: Error message: Warning: Xlltemac.87000000 MAC addresses don't match: Address in SROM is 30:00:00:00:00:00 Address in environment is 00:0a:35:00:6a:04 NAMESIZE contains Driver name + zero terminated character. Signed-off-by:
Michal Simek <monstr@monstr.eu>
-
- Aug 08, 2011
-
-
Simon Glass authored
Built-in Ethernet adapters support setting the mac address by means of a ethaddr environment variable for each interface (ethaddr, eth1addr, eth2addr). This adds similar support to the USB network side, using the names usbethaddr, usbeth1addr, etc. They are kept separate since we don't want a USB device taking the MAC address of a built-in device or vice versa. Signed-off-by:
Simon Glass <sjg@chromium.org> Tested-by:
Eric Bénard <eric@eukrea.com>
-
- Aug 03, 2011
-
-
Andreas Bießmann authored
All available at91rm9200 boards have migrated to ar920t/at91 and therefore to CONFIG_NET_MULTI. The obsolete at91rm9200_miiphy_initialize() was removed in "ARM: remove obsolete at91rm9200". Signed-off-by:
Andreas Bießmann <andreas.devel@googlemail.com>
-
- Apr 20, 2011
-
-
Andy Fleming authored
Extends the mii_dev structure to participate in a full-blown MDIO and PHY driver scheme. The mii_dev structure and miiphy calls are modified in such a way to allow the original mii command and miiphy infrastructure to work as before, but also to support a new set of APIs which allow (among other things) sharing of PHY driver code and 10G support The mii command will continue to support normal PHY management functions (Clause 22 of 802.3), but will not be changed to support 10G (Clause 45). The basic design is similar to PHY Lib from Linux, but simplified for U-Boot's network and driver infrastructure. We now have MDIO drivers and PHY drivers An MDIO driver provides: read write reset A PHY driver provides: (optionally): probe config - initial setup, starting of auto-negotiation startup - waiting for AN, and reading link state shutdown - any cleanup needed The ethernet drivers interact with the PHY Lib using these functions: phy_connect() phy_config() phy_startup() phy_shutdown() Each PHY driver can be configured separately, or all at once using config_phylib_all_drivers.h (added in the patch which adds the drivers) We also provide generic drivers for Clause 22 (10/100/1000), and Clause 45 (10G) PHYs. We also implement phy_reset(), and call it in phy_connect(). Because phy_reset() is essentially the same as miiphy_reset, but: a) must support 10G PHYs, and b) should use the phylib primitives, we implement miiphy_reset, using phy_reset(), but only when CONFIG_PHYLIB is set. Otherwise, we just use the old version. In this way, we save on compile size, even if we don't manage to save code size. Pulled ethtool.h and mdio.h from: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 782d640afd15af7a1faf01cfe566ca4ac511319d With many, many deletions so as to enable compilation under u-boot Signed-off-by:
Andy Fleming <afleming@freescale.com> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org> Acked-by:
Detlev Zundel <dzu@denx.de>
-
- Feb 19, 2011
-
-
Remy Bohmer authored
Signed-off-by:
Remy Bohmer <linux@bohmer.net>
-
Simon Glass authored
This adds support for using USB Ethernet dongles in host mode. This is just the framework - drivers will come later. A new config option called CONFIG_USB_HOST_ETHER can be defined in board config files to switch this on. The was originally written by NVIDIA and was cleaned up for release by the Chromium authors. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Nov 14, 2010
-
-
Ben Warren authored
This has always been confusing, and the idea of these functions returning the number of interfaces initialized was half-baked and ultimately pointless. Instead, act more like regular functions and return < 0 on failure, >= 0 on success. This change shouldn't break anything. Signed-off-by:
Ben Warren <biggerbadderben@gmail.com>
-
- Oct 12, 2010
-
-
Ben Warren authored
All are within an #ifdef CONFIG_NET_MULTI block already Signed-off-by:
Ben Warren <biggerbadderben@gmail.com>
-
- Aug 09, 2010
-
-
Ben Warren authored
Commit 6e37b1a3a25004d3df5867de49fff6b3fc9c4f04 modifies several net calls to take a (const char *) parameter instead of (char *), but in some cases the modified functions call other functions taking (char *). The end result is warnings about discarding the const qualifier. This patch fixes these other function signatures. Signed-off-by:
Ben Warren <biggerbadderben@gmail.com>
-
- Jul 12, 2010
-
-
Mike Frysinger authored
Some commands operate on eth device names (like 'mii'), but those cannot be passed on the command line as one argument. So detect devices like these and warn about them so someone will fix it. Signed-off-by:
Mike Frysinger <vapier@gentoo.org> Signed-off-by:
Ben Warren <biggerbadderben@gmail.com>
-
- Jun 21, 2010
-
-
Wolfgang Denk authored
Move it inside the #ifdef CONFIG_NET_MULTI to avoid eth.c:64: warning: 'eth_mac_skip' defined but not used messages from a number of old, non-CONFIG_NET_MULTI boards. Signed-off-by:
Wolfgang Denk <wd@denx.de> Signed-off-by:
Ben Warren <biggerbadderben@gmail.com>
-