<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/net/eth.c, branch v2016.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>net: remove scary warning about EEPROM provided MAC address</title>
<updated>2016-01-08T15:15:44+00:00</updated>
<author>
<name>Andre Przywara</name>
<email>andre.przywara@arm.com</email>
</author>
<published>2016-01-04T15:48:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=821fec0ceb3e26f9306f331fa547a980ff111134'/>
<id>821fec0ceb3e26f9306f331fa547a980ff111134</id>
<content type='text'>
In many parts of the computing world having a unique MAC address
sitting in some on-NIC storage is considered the normal case.
Remove the warning to not scare the user unnecessarily.
This applies to Highbank/Midway and ARM's Juno, for instance.
Besides that this fixes the formatting on Midway, for instance,
which currently looks like:
...
Net:   xgmac0
Warning: xgmac0 using MAC address from net device
, xgmac1
Warning: xgmac1 using MAC address from net device
...

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In many parts of the computing world having a unique MAC address
sitting in some on-NIC storage is considered the normal case.
Remove the warning to not scare the user unnecessarily.
This applies to Highbank/Midway and ARM's Juno, for instance.
Besides that this fixes the formatting on Midway, for instance,
which currently looks like:
...
Net:   xgmac0
Warning: xgmac0 using MAC address from net device
, xgmac1
Warning: xgmac1 using MAC address from net device
...

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: eth: Stick to 'ethact' when 'ethrotate' is 'no' in eth_init()</title>
<updated>2016-01-07T17:27:07+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-12-22T06:43:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4cdc2c8cc018ba90050bee7622148032af7341ec'/>
<id>4cdc2c8cc018ba90050bee7622148032af7341ec</id>
<content type='text'>
When 'ethrotate' variable is set to 'no' and 'ethact' variable
is already set to an ethernet device, we should stick to 'ethact'.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When 'ethrotate' variable is set to 'no' and 'ethact' variable
is already set to an ethernet device, we should stick to 'ethact'.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: eth: Test 'ethrotate' before changing current ethernet device</title>
<updated>2016-01-07T17:27:07+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-12-22T06:43:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a671c4f2bea6215140b34726900d4f0aa5892e6a'/>
<id>a671c4f2bea6215140b34726900d4f0aa5892e6a</id>
<content type='text'>
In eth_current_changed(), the call to eth_get_dev() below has a side
effect of rotating ethernet device if uc_priv-&gt;current == NULL. This
is not what we want when 'ethrotate' variable is 'no'.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In eth_current_changed(), the call to eth_get_dev() below has a side
effect of rotating ethernet device if uc_priv-&gt;current == NULL. This
is not what we want when 'ethrotate' variable is 'no'.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: net: Fix DM for targets which use MANUAL_RELOC</title>
<updated>2015-12-18T12:15:58+00:00</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2015-12-08T15:45:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=94067580a5b8b7a7b393e8f38fac385e3f93d780'/>
<id>94067580a5b8b7a7b393e8f38fac385e3f93d780</id>
<content type='text'>
All ethernet operation needs to be updated for architectures which
requires MANUAL_RELOC.

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All ethernet operation needs to be updated for architectures which
requires MANUAL_RELOC.

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: eth: Check return value in various places</title>
<updated>2015-10-29T19:05:52+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-10-08T04:45:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ac1d31380618f3f68bf7f05b73b6ab0cdeab0e9f'/>
<id>ac1d31380618f3f68bf7f05b73b6ab0cdeab0e9f</id>
<content type='text'>
eth_get_dev() can return NULL which means device_probe() fails for
that ethernet device. Add return value check in various places or
U-Boot will crash due to NULL pointer access.

With this commit, 'dm_test_eth_act' test case passes.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
eth_get_dev() can return NULL which means device_probe() fails for
that ethernet device. Add return value check in various places or
U-Boot will crash due to NULL pointer access.

With this commit, 'dm_test_eth_act' test case passes.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: eth: Clear MAC address in eth_pre_remove()</title>
<updated>2015-10-29T19:05:51+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-10-08T04:45:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a16edabe7f744b2d7a97bba4d4bc95b6894fd592'/>
<id>a16edabe7f744b2d7a97bba4d4bc95b6894fd592</id>
<content type='text'>
platdata-&gt;enetaddr was assigned to a value in dev_probe() last time.
If we don't clear it, for dev_probe() at the second time, dm eth
will end up treating it as a MAC address from ROM no matter where it
came from originally (maybe env, ROM, or even random). Fix this by
clearing platdata-&gt;enetaddr when removing an Ethernet device.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
platdata-&gt;enetaddr was assigned to a value in dev_probe() last time.
If we don't clear it, for dev_probe() at the second time, dm eth
will end up treating it as a MAC address from ROM no matter where it
came from originally (maybe env, ROM, or even random). Fix this by
clearing platdata-&gt;enetaddr when removing an Ethernet device.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: change the env name to use const</title>
<updated>2015-10-28T20:01:10+00:00</updated>
<author>
<name>Josh Wu</name>
<email>josh.wu@atmel.com</email>
</author>
<published>2015-09-01T10:22:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=219cc94a3f3440ea9c5a29d6b114b371a6aec430'/>
<id>219cc94a3f3440ea9c5a29d6b114b371a6aec430</id>
<content type='text'>
As we don't modify the 'name' parameter, so change it to const.

Signed-off-by: Josh Wu &lt;josh.wu@atmel.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As we don't modify the 'name' parameter, so change it to const.

Signed-off-by: Josh Wu &lt;josh.wu@atmel.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/eth: fix a bug in on_ethaddr()</title>
<updated>2015-10-28T20:00:15+00:00</updated>
<author>
<name>Gong Qianyu</name>
<email>Qianyu.Gong@freescale.com</email>
</author>
<published>2015-08-31T03:34:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7aba0f2c2ce80406661ea2dc79ea1892cc93a26f'/>
<id>7aba0f2c2ce80406661ea2dc79ea1892cc93a26f</id>
<content type='text'>
The loop should check all ethenet devices, not only the first device,
to set each specified ethaddr, or it'll cause failure when we use other
devices.

Signed-off-by: Gong Qianyu &lt;Qianyu.Gong@freescale.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The loop should check all ethenet devices, not only the first device,
to set each specified ethaddr, or it'll cause failure when we use other
devices.

Signed-off-by: Gong Qianyu &lt;Qianyu.Gong@freescale.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: expose eth_is_active() function to test network device state</title>
<updated>2015-09-30T02:54:45+00:00</updated>
<author>
<name>Bernhard Nortmann</name>
<email>bernhard.nortmann@web.de</email>
</author>
<published>2015-09-14T13:29:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=eaa8a195cc2372349276bf7d581a9e1e2cc83511'/>
<id>eaa8a195cc2372349276bf7d581a9e1e2cc83511</id>
<content type='text'>
The previous eth_device struct returned by eth_get_dev() allowed
code to directly query the state member field. However, with
CONFIG_DM_ETH this data gets encapsulated (i.e. private), and
eth_get_dev() returns a udevice struct 'abstraction' instead.

This breaks legacy code relying on the former behaviour - e.g.
netconsole.
(see http://lists.denx.de/pipermail/u-boot/2015-June/216528.html)

The patch introduces a method to retrieve the ethernet device
state in a 'clean' and uniform way, supporting both legacy code
and driver model. The new function eth_is_active() accepts a
device struct pointer and tests it for ETH_STATE_ACTIVE.

Signed-off-by: Bernhard Nortmann &lt;bernhard.nortmann@web.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous eth_device struct returned by eth_get_dev() allowed
code to directly query the state member field. However, with
CONFIG_DM_ETH this data gets encapsulated (i.e. private), and
eth_get_dev() returns a udevice struct 'abstraction' instead.

This breaks legacy code relying on the former behaviour - e.g.
netconsole.
(see http://lists.denx.de/pipermail/u-boot/2015-June/216528.html)

The patch introduces a method to retrieve the ethernet device
state in a 'clean' and uniform way, supporting both legacy code
and driver model. The new function eth_is_active() accepts a
device struct pointer and tests it for ETH_STATE_ACTIVE.

Signed-off-by: Bernhard Nortmann &lt;bernhard.nortmann@web.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: eth: Correctly detect alias in eth_get_dev_by_name()</title>
<updated>2015-09-09T13:48:03+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-08-28T05:25:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e408c42189861b5ca18993e8fbb6975e67d4d442'/>
<id>e408c42189861b5ca18993e8fbb6975e67d4d442</id>
<content type='text'>
When given a device name string, we should test to see if it is
really an alias like "eth#".

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When given a device name string, we should test to see if it is
really an alias like "eth#".

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
