07 Feb, 2014
1 commit
-
In "common/Makefile" "miiphyutil.o" gets built if any of the following
items enabled:
* CONFIG_PHYLIB
* CONFIG_MII
* CONFIG_CMD_MIISo 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
Cc: Simon Glass
Cc: Wolfgang Denk
Acked-by: Joe Hershberger
Signed-off-by: Alexey Brodkin
24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
28 Sep, 2012
1 commit
-
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
Cc: Joe Hershberger
Acked-by: Mike Frysinger
25 Sep, 2012
2 commits
-
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
Cc: Stefano Babic
Acked-by: Stefano Babic -
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
Cc: Joe Hershberger
Cc: Rafal Jaworowski
Cc: Piotr Kruszynski
12 Jul, 2012
2 commits
-
This function is currently only used in one case. Inline for now.
Signed-off-by: Joe Hershberger
-
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
07 Jul, 2012
1 commit
-
Add new function eth_random_enetaddr() to generate a locally administered
ethernet address.Signed-off-by: Michael Walle
Acked-by: Joe Hershberger
16 May, 2012
3 commits
-
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
Reviewed-by: Joe Hershberger -
Signed-off-by: Joe Hershberger
Acked-by: Simon Glass -
Signed-off-by: Joe Hershberger
Acked-by: Simon Glass
04 Apr, 2012
1 commit
-
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 ethaddr 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 7616e7850804c7c69e0a22c179dfcba9e8f3f587.Signed-off-by: Eric Miao
Acked-by: Simon Glass
Acked-by: Dirk Behme
CC: Stefan Roese
CC: Eric Miao
CC: Wolfgang Denk
CC: Philip Balister
CC: Zach Sadecki
19 Mar, 2012
4 commits
-
These calls should not be made directly any more, since bootstage
will call the show_boot_...() functions as needed.Signed-off-by: Simon Glass
-
This changes over the network-related progress numbers to use enums
from bootstage.h.Signed-off-by: Simon Glass
-
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
Acked-by: Mike Frysinger -
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
07 Mar, 2012
2 commits
-
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
Cc: Stefan Roese -
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
Cc: Reinhard Arlt
03 Mar, 2012
1 commit
-
Fix the crash when running several times usb_init() with a USB ethernet
device plugged.Signed-off-by: Vincent Palatin
Tested-by: Wolfgang Grandegger
21 Dec, 2011
1 commit
-
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
Cc: Prafulla Wadaskar
Cc: Mike Frysinger
Cc: Wolfgang Denk
Acked-by: Mike Frysinger
06 Oct, 2011
2 commits
-
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
-
This driver was never converted to NET_MULTI, and no board uses it.
So punt it and be done.Signed-off-by: Mike Frysinger
02 Oct, 2011
1 commit
-
Signed-off-by: Philip Balister
22 Sep, 2011
1 commit
-
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
10 Sep, 2011
1 commit
-
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
Acked-by: Mike Frysinger
05 Sep, 2011
2 commits
-
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
Tested-by: Kumar Gala
Tested-by: Michal Simek
Tested-by: Heiko Schocher -
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:04NAMESIZE contains Driver name + zero terminated character.
Signed-off-by: Michal Simek
09 Aug, 2011
1 commit
-
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
Tested-by: Eric Bénard
03 Aug, 2011
1 commit
-
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
21 Apr, 2011
1 commit
-
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 supportThe 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
resetA PHY driver provides:
(optionally): probe
config - initial setup, starting of auto-negotiation
startup - waiting for AN, and reading link state
shutdown - any cleanup neededThe 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-bootSigned-off-by: Andy Fleming
Signed-off-by: Kumar Gala
Acked-by: Detlev Zundel
20 Feb, 2011
2 commits
-
Signed-off-by: Remy Bohmer
-
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
15 Nov, 2010
1 commit
-
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
12 Oct, 2010
1 commit
-
All are within an #ifdef CONFIG_NET_MULTI block already
Signed-off-by: Ben Warren
10 Aug, 2010
1 commit
-
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
12 Jul, 2010
1 commit
-
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
Signed-off-by: Ben Warren
20 Jun, 2010
1 commit
-
Move it inside the #ifdef CONFIG_NET_MULTI to avoid
eth.c:64: warning: 'eth_mac_skip' defined but not used
messages from anumber of old, non-CONFIG_NET_MULTI boards.
Signed-off-by: Wolfgang Denk
Cc: Ben Warren
04 May, 2010
2 commits
-
Add a new function to the eth_device struct for programming a network
controller's hardware address.After all network devices have been initialized and the proper MAC address
for each has been determined, make a device driver call to program the
address into the device. Only device instances with valid unicast addresses
will be programmed.Signed-off-by: Ben Warren
Acked-by: Detlev Zundel
Tested-by: Prafulla Wadaskar
Tested-by: Heiko Schocher
Tested-by: Thomas Chou -
Signed-off-by: Detlev Zundel
Signed-off-by: Ben Warren
14 Dec, 2009
1 commit
-
Signed-off-by: Mike Frysinger
Signed-off-by: Ben Warren