<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/net/eth.c, branch v2016.01-rc4</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/net/eth.c?h=v2016.01-rc4</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/net/eth.c?h=v2016.01-rc4'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2015-12-18T12:15:58Z</updated>
<entry>
<title>dm: net: Fix DM for targets which use MANUAL_RELOC</title>
<updated>2015-12-18T12:15:58Z</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2015-12-08T15:45:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=94067580a5b8b7a7b393e8f38fac385e3f93d780'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>net: eth: Check return value in various places</title>
<updated>2015-10-29T19:05:52Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-10-08T04:45:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ac1d31380618f3f68bf7f05b73b6ab0cdeab0e9f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>net: eth: Clear MAC address in eth_pre_remove()</title>
<updated>2015-10-29T19:05:51Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-10-08T04:45:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a16edabe7f744b2d7a97bba4d4bc95b6894fd592'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>net: change the env name to use const</title>
<updated>2015-10-28T20:01:10Z</updated>
<author>
<name>Josh Wu</name>
<email>josh.wu@atmel.com</email>
</author>
<published>2015-09-01T10:22:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=219cc94a3f3440ea9c5a29d6b114b371a6aec430'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>net/eth: fix a bug in on_ethaddr()</title>
<updated>2015-10-28T20:00:15Z</updated>
<author>
<name>Gong Qianyu</name>
<email>Qianyu.Gong@freescale.com</email>
</author>
<published>2015-08-31T03:34:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7aba0f2c2ce80406661ea2dc79ea1892cc93a26f'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>net: expose eth_is_active() function to test network device state</title>
<updated>2015-09-30T02:54:45Z</updated>
<author>
<name>Bernhard Nortmann</name>
<email>bernhard.nortmann@web.de</email>
</author>
<published>2015-09-14T13:29:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=eaa8a195cc2372349276bf7d581a9e1e2cc83511'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>dm: eth: Correctly detect alias in eth_get_dev_by_name()</title>
<updated>2015-09-09T13:48:03Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-08-28T05:25:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e408c42189861b5ca18993e8fbb6975e67d4d442'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>dm: eth: Do not print misleading "Net Initialization Skipped"</title>
<updated>2015-09-09T13:48:03Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2015-08-28T05:25:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d8f79afa030a19e12b8effcae0e8247e271da60e'/>
<id>urn:sha1:d8f79afa030a19e12b8effcae0e8247e271da60e</id>
<content type='text'>
With driver model, board_eth_init() or cpu_eth_init() is not a must.
Thus we don't need print a misleading "Net Initialization Skipped".

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
</entry>
<entry>
<title>net: Allow drivers to return -ENOSYS with the write_hwaddr() method</title>
<updated>2015-07-21T23:39:41Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-07-06T22:47:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b86f795a378fdeb873cdc464367660fb3b49c443'/>
<id>urn:sha1:b86f795a378fdeb873cdc464367660fb3b49c443</id>
<content type='text'>
Some drivers may want to implement this method for some of their devices but
not for others. So it is not possible to just leave the operation out of
the table. Drivers could get around this by masquerading as two separate
drivers but that seems unpleasant.

Allow the driver to return an error when it does not want to process the
write_hwaddr() method.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>dm: eth: Avoid blocking on packet reception</title>
<updated>2015-07-21T23:39:40Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-07-06T22:47:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a1ca92eaaf0cac2a11c16b93f0cd0cd6f6256f02'/>
<id>urn:sha1:a1ca92eaaf0cac2a11c16b93f0cd0cd6f6256f02</id>
<content type='text'>
Some devices can take a long time to work out whether they have a new packet
or now. For example the ASIX USB Ethernet dongle can take 5 seconds to do
this, since it waits until it gets a new packet on the wire before allowing
the USB bulk read packet to be submitted.

At present with driver mode the Ethernet receive code reads 32 packets. This
can take a very long time if we must wait for all 32 packets. The old code
(before driver model) worked by reading a single set of packets from the USB
device, then processing all the packets with in. It would be nice to use
the same behaviour with driver model.

Add a flag to the receive method which indicates that the driver should try
to find a packet if available, by consulting the hardware. When the flag is
not set, it should just return any packet data it has already received. If
there is none, it should return -EAGAIN so that the loop will terminate.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
