Re: [U-Boot] [PATCH] drivers/net/e1000.c: Cleanup whitespace

2015-03-19 Thread Joe Hershberger
On Thu, Mar 19, 2015 at 12:55 PM, York Sun york...@freescale.com wrote: On 03/19/2015 10:19 AM, York Sun wrote: On 03/19/2015 10:16 AM, Joe Hershberger wrote: On Thu, Mar 19, 2015 at 11:43 AM, York Sun york...@freescale.com mailto:york...@freescale.com wrote: From: Minghuan Lian

Re: [U-Boot] [PATCH 06/13] net: rtl8169: Build warning fixes for 64-bit

2015-03-20 Thread Joe Hershberger
through unsigned long going from pointers to integers and vice versa. Cc: Joe Hershberger joe.hershber...@gmail.com Signed-off-by: Thierry Reding tred...@nvidia.com Fixed checkpatch failures and applied to next, thanks! -Joe ___ U-Boot mailing list U

Re: [U-Boot] [PATCH 1/4] net: Add ethernet FCS length macro in net.h

2015-03-20 Thread Joe Hershberger
--- Acked-by: Joe Hershberger joe.hershber...@ni.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] [PATCH 0/4] x86: Add Intel Topcliff PCH Gigabit Ethernet support

2015-03-20 Thread Joe Hershberger
Hi Simon, On Fri, Mar 20, 2015 at 4:12 AM, Bin Meng bmeng...@gmail.com wrote: This series adds a new ethernet driver for the GMAC found on Intel Topcliff Platform Controller Hub and enable its support on Intel Crown Bay board. The series also did some clean up work below: - Introduce

Re: [U-Boot] [PATCH 2/4] net: Update README.drivers.eth to mention latest APIs

2015-03-20 Thread Joe Hershberger
On Fri, Mar 20, 2015 at 4:12 AM, Bin Meng bmeng...@gmail.com wrote: README.drivers.eth still refers to the deprecated miiphy_register(). Update the doc to mention new APIs mdio_alloc() and mdio_register(). Signed-off-by: Bin Meng bmeng...@gmail.com --- Acked-by: Joe Hershberger joe.hershber

Re: [U-Boot] [PATCH 4/4] x86: crownbay: Enable Intel Topcliff GMAC support

2015-03-20 Thread Joe Hershberger
On Fri, Mar 20, 2015 at 4:12 AM, Bin Meng bmeng...@gmail.com wrote: Intel Crown Bay board has one ethernet port connected from Intel Topcliff PCH. Enable it in the board configuration. Signed-off-by: Bin Meng bmeng...@gmail.com --- Reviewed-by: Joe Hershberger joe.hershber...@ni.com

Re: [U-Boot] [PATCH 3/4] net: Add Intel Topcliff GMAC driver

2015-03-20 Thread Joe Hershberger
...@gmail.com --- Acked-by: Joe Hershberger joe.hershber...@ni.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] [PATCH] net/phy/realtek: Disable interrupt on Realtek Ethernet PHY drivers

2015-03-20 Thread Joe Hershberger
Hi Codrin, On Wed, Mar 4, 2015 at 2:46 AM, Codrin Constantin Ciubotariu codrin.ciubota...@freescale.com wrote: Hi, Anyone has any comments on this? Please share your thoughts. Looks good to me. -Original Message- From: Codrin Ciubotariu [mailto:codrin.ciubota...@freescale.com]

Re: [U-Boot] Setting up MAC address for eth drivers

2015-03-17 Thread Joe Hershberger
Hi Michal, On Fri, Mar 13, 2015 at 7:25 AM, Michal Simek michal.si...@xilinx.com wrote: Hi, I have a question regarding setting mac address for drivers. Drivers setting up write_hwaddr via eth_write_hwaddr via eth_initialize which is called from common/board_r.c. This is because on at

[U-Boot] [PATCH v6 03/27] net: Provide a function to get the current MAC address

2015-03-11 Thread Joe Hershberger
The current implementation exposes the eth_device struct to code that needs to access the MAC address. Add a wrapper function for this to abstract away the pointer for this operation. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes

[U-Boot] [PATCH v6 20/27] dm: eth: Add support for ethprime env var

2015-03-11 Thread Joe Hershberger
The ethprime env var is used to indicate the starting device if none is specified in ethact. Also support aliases specified in the ethprime var. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: -Fix compile

[U-Boot] [PATCH v6 15/27] dm: eth: Pass the packet pointer as a parameter to recv

2015-03-11 Thread Joe Hershberger
net_process_received_packet(). Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v6: -Swallow -EAGAIN error in eth_rx() -Updated function documentation Changes in v5: -New to v5 Changes in v4: None Changes in v3: None Changes in v2: None include/net.h | 6 -- net/eth.c | 15

[U-Boot] [PATCH v6 18/27] test: dm: eth: Add tests for the eth dm implementation

2015-03-11 Thread Joe Hershberger
Add a test for the eth uclass using the sandbox eth driver. Verify basic functionality of the network stack / eth uclass by exercising the ping function. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: None

[U-Boot] [PATCH v6 07/27] net: Change return codes from net/eth.c to use errorno constants

2015-03-11 Thread Joe Hershberger
Many functions returned -1 previously. Change them to return appropriate error codes. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reported-by: Simon Glass s...@chromium.org Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: None Changes in v4: -New to v4

[U-Boot] [PATCH v6 11/27] net: Access mapped physmem in net functions

2015-03-11 Thread Joe Hershberger
Previously the net functions would access memory assuming physmem did not need to be mapped. In sandbox, that's not the case. Now we map the physmem specified by the user in loadaddr to the buffer that represents that space. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed

[U-Boot] [PATCH v6 01/27] test: dm: Reorder the objects to build

2015-03-11 Thread Joe Hershberger
Signed-off-by: Joe Hershberger joe.hershber...@ni.com Acked-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: -Reorder dm test makefile Changes in v2: None test/dm/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[U-Boot] [PATCH v6 05/27] net: Remove unneeded extern in net.h

2015-03-11 Thread Joe Hershberger
Many of the functions in net.h were preceded extern needlessly. Removing them to limit the number of checkpatch.pl complaints. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: -Fix compile error on boards with CONFIG_API enabled

[U-Boot] [PATCH v6 19/27] dm: eth: Add support for aliases

2015-03-11 Thread Joe Hershberger
Allow network devices to be referred to as eth0 instead of eth@12345678 when specified in ethact. Add tests to verify this behavior. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: -Added a comment about

[U-Boot] [PATCH v6 13/27] dm: eth: Add basic driver model support to Ethernet stack

2015-03-11 Thread Joe Hershberger
First just add support for MAC drivers. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: -Add a note to doc/README.drivers.eth about its obsolescence -Expanded the Kconfig help -Moved dm/ header -Use local

[U-Boot] [PATCH v6 0/27] Add Driver Model support to network stack

2015-03-11 Thread Joe Hershberger
()). -Rebase on top of dm/master -Remove unused priv struct for sandbox driver -Removed extra parentheses -Stop maintaining our own index and use DM seq now that it works for our needs -Update error codes -Updated comments Joe Hershberger (27): test: dm: Reorder the objects to build common

[U-Boot] [PATCH v6 06/27] net: Refactor in preparation for driver model

2015-03-11 Thread Joe Hershberger
Move some things around and organize things so that the driver model implementation will fit in more easily. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: -Fixed warning from missing declaration Changes

[U-Boot] [PATCH v6 09/27] net: Remove the bd* parameter from net stack functions

2015-03-11 Thread Joe Hershberger
This value is not used by the network stack and is available in the global data, so stop passing it around. For the one legacy function that still expects it (init op on old Ethernet drivers) pass in the global pointer version directly to avoid changing that interface. Signed-off-by: Joe

[U-Boot] [PATCH v6 22/27] sandbox: eth: Add ability to disable ping reply in sandbox eth driver

2015-03-11 Thread Joe Hershberger
This is needed to test the netretry functionality (make the command fail on a sandbox eth device). Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: -Add function comments -Check array index bounds Changes in v5: -Use a function

[U-Boot] [PATCH v6 12/27] cmd: net: Clean up return codes

2015-03-11 Thread Joe Hershberger
The return codes in common/cmd_net.c had a number of inconsistencies. Update them to all use the enum from command.h Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: -New to v5 Changes in v4: None Changes

[U-Boot] [PATCH v6 04/27] net: Rename helper function to be more clear

2015-03-11 Thread Joe Hershberger
Make it clear that the helper is checking the addr, not setting it. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None net/eth.c | 13

[U-Boot] [PATCH v6 08/27] net: Use int instead of u8 for boolean flag

2015-03-11 Thread Joe Hershberger
On some archs masking the parameter is inefficient, so don't use u8. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reported-by: Simon Glass s...@chromium.org Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: None Changes in v4: -New to v4 Changes in v3

[U-Boot] [PATCH v6 26/27] sandbox: eth: Add support for using the 'lo' interface

2015-03-11 Thread Joe Hershberger
to be opened for all IP traffic and be able to receive at the same time. UDP is far more useful to test with, so it was selected over ICMP. Ping won't work, but things like TFTP should work. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes

[U-Boot] [PATCH v6 27/27] net: Improve error handling

2015-03-11 Thread Joe Hershberger
them yet. halt() is not expected to error. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: -New to v5 Changes in v4: None Changes in v3: None Changes in v2: None include/net.h | 3 ++- net/eth.c | 56

[U-Boot] [PATCH] MAKEALL: Don't try to print size when ./u-boot is deleted

2015-03-11 Thread Joe Hershberger
In the case of BUILD_NBUILDS 1, MAKEALL would try to print the size immediately after the u-boot binary is deleted by the call to: make -s clean Move the size print to before the clean Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- MAKEALL | 14 +++--- 1 file changed, 7

Re: [U-Boot] [PATCH v5 27/27] net: Improve error handling

2015-03-10 Thread Joe Hershberger
On Wed, Mar 4, 2015 at 12:35 PM, Simon Glass s...@chromium.org wrote: Hi Joe, On 3 March 2015 at 19:41, Joe Hershberger joe.hershber...@ni.com wrote: Take a pass at plumbing errors through to the users of the network stack Currently only the start() function errors will be returned from

Re: [U-Boot] [PATCH v5 15/27] dm: eth: Pass the packet pointer as a parameter to recv

2015-03-10 Thread Joe Hershberger
On Wed, Mar 4, 2015 at 12:35 PM, Simon Glass s...@chromium.org wrote: Hi Joe, On 3 March 2015 at 19:41, Joe Hershberger joe.hershber...@ni.com wrote: Stop forcing drivers to call net_process_received_packet() - formerly called NetReceive(). Now the uclass will handle calling the driver

Re: [U-Boot] [PATCH v5 15/27] dm: eth: Pass the packet pointer as a parameter to recv

2015-03-10 Thread Joe Hershberger
On Tue, Mar 10, 2015 at 6:31 PM, Simon Glass s...@chromium.org wrote: Hi Joe, On 10 March 2015 at 16:28, Joe Hershberger joe.hershber...@gmail.com wrote: On Wed, Mar 4, 2015 at 12:35 PM, Simon Glass s...@chromium.org wrote: Hi Joe, On 3 March 2015 at 19:41, Joe Hershberger

[U-Boot] [PATCH v6 25/27] sandbox: Enable DHCP and IP defrag

2015-03-11 Thread Joe Hershberger
This is now testable via the eth-raw interface Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: None Changes in v4: -New to v4 Changes in v3: None Changes in v2: None include/configs/sandbox.h | 8

[U-Boot] [PATCH v6 21/27] test: dm: eth: Add testing for ethrotate env var

2015-03-11 Thread Joe Hershberger
Make sure that the ethrotate behavior occurs as expected. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: -Added a test for skipping un-probe-able devices Changes in v4: -Added testing for ethrotate

[U-Boot] [PATCH v6 24/27] sandbox: eth: Add a bridge to a real network for sandbox

2015-03-11 Thread Joe Hershberger
: sudo /sbin/setcap CAP_NET_RAW+ep /path/to/u-boot Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: -Addressed nits Changes in v5: -Added fallback for setting promiscuous mode -Added help to Kconfig -Added more details

[U-Boot] [PATCH v6 14/27] net: Clean up network stack names used in DM drivers

2015-03-11 Thread Joe Hershberger
Take the opportunity to enforce better names on newly written or retrofitted Ethernet drivers. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: -New to v5 Changes in v4: None Changes in v3: None Changes

[U-Boot] [PATCH v6 16/27] sandbox: eth: Add network support to sandbox

2015-03-11 Thread Joe Hershberger
Add basic network support to sandbox which includes a network driver. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: -Added help to the sandbox eth mock driver Kconfig entry Changes in v4: -Cleaned up

[U-Boot] [PATCH v6 02/27] common: Make sure arch-specific map_sysmem() is defined

2015-03-11 Thread Joe Hershberger
In the case where the arch defines a custom map_sysmem(), make sure that including just mapmem.h is sufficient to have these functions as they are when the arch does not override it. Also split the non-arch specific functions out of common.h Signed-off-by: Joe Hershberger joe.hershber...@ni.com

[U-Boot] [PATCH v6 17/27] sandbox: eth: Add ARP and PING response to sandbox driver

2015-03-11 Thread Joe Hershberger
The sandbox driver will now generate response traffic to exercise the ping command even when no network exists. This allows the basic data pathways of the DM to be tested. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None

[U-Boot] [PATCH v6 23/27] test: dm: net: Add a test of the netretry behavior

2015-03-11 Thread Joe Hershberger
The effect of the netretry env var was recently changed. This test checks that behavior. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None Changes in v5: -Added comments about test cases -Switched to function to control

[U-Boot] [PATCH v6 10/27] net: Make netretry actually do something

2015-03-11 Thread Joe Hershberger
is now changed to retry any failed command (rotating through the eth adapters if ethrotate != no). It also defaulted to retry forever. It is now changed to default to not retry Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v6: None

Re: [U-Boot] [PATCH] mii: add read-modify-write option to mii command

2015-03-24 Thread Joe Hershberger
Hi Tim, On Fri, Feb 27, 2015 at 8:25 AM, Tim James tim.ja...@macltd.com wrote: When accessing PHY registers it is often desirable to only update selected bits, so it is necessary to first read the current value before writing back an modified value with the relevant bits updated. To

Re: [U-Boot] [PATCH v2] net: Update hardware MAC address if it changes in env

2015-03-30 Thread Joe Hershberger
Hi Michal, On Tue, Mar 24, 2015 at 2:41 AM, Joe Hershberger joe.hershber...@ni.com wrote: When the ethaddr changes in the env, the hardware should also be updated so that MAC filtering will work properly without resetting U-Boot. Also remove the manual calls to set the hwaddr

[U-Boot] [PATCH] dm: eth: Provide a way for drivers to manage packet buffers

2015-03-30 Thread Joe Hershberger
Some drivers need a chance to manage their receive buffers after the packet has been handled by the network stack. Add an operation that will allow the driver to be called in that case. Reported-by: Simon Glass s...@chromium.org Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- This patch

Re: [U-Boot] [PATCH] net: Fix incorrect DHCP/BOOTP packet layout on 64-bit systems

2015-03-31 Thread Joe Hershberger
Hi Sergey, On Tue, Mar 31, 2015 at 12:17 PM, Sergey Temerkhanov s.temerkha...@gmail.com wrote: This commit fixes incorrect DHCP/BOOTP packet layout caused by 'ulong' type size difference on 64 and 32-bit architectures. It also converts protocol header structures to use explicitly sized

[U-Boot] [PATCH v7 0/27] Add Driver Model support to network stack

2015-03-22 Thread Joe Hershberger
probed before used by a command (i.e. before eth_init()). -Rebase on top of dm/master -Remove unused priv struct for sandbox driver -Removed extra parentheses -Stop maintaining our own index and use DM seq now that it works for our needs -Update error codes -Updated comments Joe Hershberger (27

[U-Boot] [PATCH v7 02/27] common: Make sure arch-specific map_sysmem() is defined

2015-03-22 Thread Joe Hershberger
In the case where the arch defines a custom map_sysmem(), make sure that including just mapmem.h is sufficient to have these functions as they are when the arch does not override it. Also split the non-arch specific functions out of common.h Signed-off-by: Joe Hershberger joe.hershber...@ni.com

[U-Boot] [PATCH v7 03/27] net: Provide a function to get the current MAC address

2015-03-22 Thread Joe Hershberger
The current implementation exposes the eth_device struct to code that needs to access the MAC address. Add a wrapper function for this to abstract away the pointer for this operation. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes

[U-Boot] [PATCH v7 10/27] net: Make netretry actually do something

2015-03-22 Thread Joe Hershberger
is now changed to retry any failed command (rotating through the eth adapters if ethrotate != no). It also defaulted to retry forever. It is now changed to default to not retry Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None

[U-Boot] [PATCH v7 13/27] dm: eth: Add basic driver model support to Ethernet stack

2015-03-22 Thread Joe Hershberger
First just add support for MAC drivers. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: -Add a note to doc/README.drivers.eth about its obsolescence -Expanded the Kconfig help -Moved dm

[U-Boot] [PATCH v7 06/27] net: Refactor in preparation for driver model

2015-03-22 Thread Joe Hershberger
Move some things around and organize things so that the driver model implementation will fit in more easily. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: -Fixed warning from missing

[U-Boot] [PATCH v7 19/27] dm: eth: Add support for aliases

2015-03-22 Thread Joe Hershberger
Allow network devices to be referred to as eth0 instead of eth@12345678 when specified in ethact. Add tests to verify this behavior. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5

[U-Boot] [PATCH v7 04/27] net: Rename helper function to be more clear

2015-03-22 Thread Joe Hershberger
Make it clear that the helper is checking the addr, not setting it. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None net

[U-Boot] [PATCH v7 07/27] net: Change return codes from net/eth.c to use errorno constants

2015-03-22 Thread Joe Hershberger
Many functions returned -1 previously. Change them to return appropriate error codes. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reported-by: Simon Glass s...@chromium.org Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: None

[U-Boot] [PATCH v7 27/27] net: Improve error handling

2015-03-22 Thread Joe Hershberger
them yet. halt() is not expected to error. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: -New to v5 Changes in v4: None Changes in v3: None Changes in v2: None include/net.h | 3

[U-Boot] [PATCH v7 01/27] test: dm: Reorder the objects to build

2015-03-22 Thread Joe Hershberger
Signed-off-by: Joe Hershberger joe.hershber...@ni.com Acked-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: -Reorder dm test makefile Changes in v2: None test/dm/Makefile | 4 ++-- 1 file changed, 2

[U-Boot] [PATCH v7 23/27] test: dm: net: Add a test of the netretry behavior

2015-03-22 Thread Joe Hershberger
The effect of the netretry env var was recently changed. This test checks that behavior. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: -Added comments about test cases -Switched

[U-Boot] [PATCH v7 20/27] dm: eth: Add support for ethprime env var

2015-03-22 Thread Joe Hershberger
The ethprime env var is used to indicate the starting device if none is specified in ethact. Also support aliases specified in the ethprime var. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes

[U-Boot] [PATCH v7 22/27] sandbox: eth: Add ability to disable ping reply in sandbox eth driver

2015-03-22 Thread Joe Hershberger
This is needed to test the netretry functionality (make the command fail on a sandbox eth device). Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: -Add function comments -Check array index bounds Changes

[U-Boot] [PATCH v7 21/27] test: dm: eth: Add testing for ethrotate env var

2015-03-22 Thread Joe Hershberger
Make sure that the ethrotate behavior occurs as expected. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: -Added a test for skipping un-probe-able devices Changes in v4: -Added testing

[U-Boot] [PATCH v7 08/27] net: Use int instead of u8 for boolean flag

2015-03-22 Thread Joe Hershberger
On some archs masking the parameter is inefficient, so don't use u8. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reported-by: Simon Glass s...@chromium.org Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: -New

[U-Boot] [PATCH v7 09/27] net: Remove the bd* parameter from net stack functions

2015-03-22 Thread Joe Hershberger
This value is not used by the network stack and is available in the global data, so stop passing it around. For the one legacy function that still expects it (init op on old Ethernet drivers) pass in the global pointer version directly to avoid changing that interface. Signed-off-by: Joe

[U-Boot] [PATCH v7 15/27] dm: eth: Pass the packet pointer as a parameter to recv

2015-03-22 Thread Joe Hershberger
net_process_received_packet(). Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v7: None Changes in v6: -Swallow -EAGAIN error in eth_rx() -Updated function documentation Changes in v5: -New to v5 Changes in v4: None Changes in v3: None Changes in v2: None include/net.h | 6 -- net

[U-Boot] [PATCH v7 11/27] net: Access mapped physmem in net functions

2015-03-22 Thread Joe Hershberger
Previously the net functions would access memory assuming physmem did not need to be mapped. In sandbox, that's not the case. Now we map the physmem specified by the user in loadaddr to the buffer that represents that space. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed

[U-Boot] [PATCH v7 24/27] sandbox: eth: Add a bridge to a real network for sandbox

2015-03-22 Thread Joe Hershberger
: sudo /sbin/setcap CAP_NET_RAW+ep /path/to/u-boot Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: -Addressed nits Changes in v5: -Added fallback for setting promiscuous mode -Added help to Kconfig -Added more

[U-Boot] [PATCH v7 18/27] test: dm: eth: Add tests for the eth dm implementation

2015-03-22 Thread Joe Hershberger
Add a test for the eth uclass using the sandbox eth driver. Verify basic functionality of the network stack / eth uclass by exercising the ping function. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None

[U-Boot] [PATCH v7 26/27] sandbox: eth: Add support for using the 'lo' interface

2015-03-22 Thread Joe Hershberger
to be opened for all IP traffic and be able to receive at the same time. UDP is far more useful to test with, so it was selected over ICMP. Ping won't work, but things like TFTP should work. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes

[U-Boot] [PATCH v7 12/27] cmd: net: Clean up return codes

2015-03-22 Thread Joe Hershberger
The return codes in common/cmd_net.c had a number of inconsistencies. Update them to all use the enum from command.h Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: -New to v5 Changes

[U-Boot] [PATCH v7 05/27] net: Remove unneeded extern in net.h

2015-03-22 Thread Joe Hershberger
Many of the functions in net.h were preceded extern needlessly. Removing them to limit the number of checkpatch.pl complaints. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: -Fix compile error on boards

[U-Boot] [PATCH v7 17/27] sandbox: eth: Add ARP and PING response to sandbox driver

2015-03-22 Thread Joe Hershberger
The sandbox driver will now generate response traffic to exercise the ping command even when no network exists. This allows the basic data pathways of the DM to be tested. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None

[U-Boot] [PATCH v7 16/27] sandbox: eth: Add network support to sandbox

2015-03-22 Thread Joe Hershberger
Add basic network support to sandbox which includes a network driver. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v7: None Changes in v6: None Changes in v5: -Added help to the sandbox eth mock driver Kconfig entry Changes

Re: [U-Boot] [PATCH] dm: eth: Provide a way for drivers to manage packet buffers

2015-04-01 Thread Joe Hershberger
Hi Simon, On Tue, Mar 31, 2015 at 10:32 PM, Simon Glass s...@chromium.org wrote: Hi Joe, On 30 March 2015 at 14:44, Joe Hershberger joe.hershber...@ni.com wrote: Some drivers need a chance to manage their receive buffers after the packet has been handled by the network stack. Add

Re: [U-Boot] [RFC PATCH v4 0/23] Add Driver Model support to network stack

2015-03-03 Thread Joe Hershberger
On Sun, Mar 1, 2015 at 10:13 AM, Simon Glass s...@chromium.org wrote: [snip] - I think the recv() method should change before long. The NetReceive() call should be made from the uclass since it is common to all drivers. Then the recv() method can return a packet if it finds one, but not

Re: [U-Boot] [RFC PATCH v4 0/23] Add Driver Model support to network stack

2015-03-03 Thread Joe Hershberger
Hi Simon, On Tue, Mar 3, 2015 at 5:14 PM, Simon Glass s...@chromium.org wrote: Hi Joe, On 3 March 2015 at 15:29, Joe Hershberger joe.hershber...@gmail.com wrote: On Sun, Mar 1, 2015 at 10:13 AM, Simon Glass s...@chromium.org wrote: [snip] - I think the recv() method should change

[U-Boot] [PATCH v5 06/27] net: Refactor in preparation for driver model

2015-03-03 Thread Joe Hershberger
Move some things around and organize things so that the driver model implementation will fit in more easily. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: -Fixed warning from missing declaration Changes in v4: -Fix compile

[U-Boot] [PATCH v5 0/27] Add Driver Model support to network stack

2015-03-03 Thread Joe Hershberger
by a command (i.e. before eth_init()). -Rebase on top of dm/master -Remove unused priv struct for sandbox driver -Removed extra parentheses -Stop maintaining our own index and use DM seq now that it works for our needs -Update error codes -Updated comments Joe Hershberger (27): test: dm

[U-Boot] [PATCH v5 19/27] dm: eth: Add support for aliases

2015-03-03 Thread Joe Hershberger
Allow network devices to be referred to as eth0 instead of eth@12345678 when specified in ethact. Add tests to verify this behavior. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: -Added a comment about devname -Only check

[U-Boot] [PATCH v5 18/27] test: dm: eth: Add tests for the eth dm implementation

2015-03-03 Thread Joe Hershberger
Add a test for the eth uclass using the sandbox eth driver. Verify basic functionality of the network stack / eth uclass by exercising the ping function. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: None Changes in v4: None

[U-Boot] [PATCH v5 16/27] sandbox: eth: Add network support to sandbox

2015-03-03 Thread Joe Hershberger
Add basic network support to sandbox which includes a network driver. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: -Added help to the sandbox eth mock driver Kconfig entry Changes in v4: -Cleaned up sandbox EXTRA_ENV define

[U-Boot] [PATCH v5 11/27] net: Access mapped physmem in net functions

2015-03-03 Thread Joe Hershberger
Previously the net functions would access memory assuming physmem did not need to be mapped. In sandbox, that's not the case. Now we map the physmem specified by the user in loadaddr to the buffer that represents that space. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes

[U-Boot] [PATCH v5 21/27] test: dm: eth: Add testing for ethrotate env var

2015-03-03 Thread Joe Hershberger
Make sure that the ethrotate behavior occurs as expected. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: -Added a test for skipping un-probe-able devices Changes in v4: -Added testing for ethrotate Changes in v3: None

[U-Boot] [PATCH v5 22/27] sandbox: eth: Add ability to disable ping reply in sandbox eth driver

2015-03-03 Thread Joe Hershberger
This is needed to test the netretry functionality (make the command fail on a sandbox eth device). Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v5: -Use a function call to change mock driver behavior Changes in v4: -Add ability to disable ping reply in sandbox eth

[U-Boot] [PATCH v5 02/27] common: Make sure arch-specific map_sysmem() is defined

2015-03-03 Thread Joe Hershberger
In the case where the arch defines a custom map_sysmem(), make sure that including just common.h is sufficient to have these functions as they are when the arch does not override it. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v5: -Moved to a separate header mapmem.h

[U-Boot] [PATCH v5 14/27] net: Clean up network stack names used in DM drivers

2015-03-03 Thread Joe Hershberger
Take the opportunity to enforce better names on newly written or retrofitted Ethernet drivers. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v5: -New to v5 Changes in v4: None Changes in v3: None Changes in v2: None include/net.h | 9 - net/net.c | 30

[U-Boot] [PATCH v5 01/27] test: dm: Reorder the objects to build

2015-03-03 Thread Joe Hershberger
Signed-off-by: Joe Hershberger joe.hershber...@ni.com Acked-by: Simon Glass s...@chromium.org --- Changes in v5: None Changes in v4: None Changes in v3: -Reorder dm test makefile Changes in v2: None test/dm/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test

[U-Boot] [PATCH v5 08/27] net: Use int instead of u8 for boolean flag

2015-03-03 Thread Joe Hershberger
On some archs masking the parameter is inefficient, so don't use u8. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reported-by: Simon Glass s...@chromium.org Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: None Changes in v4: -New to v4 Changes in v3: None Changes in v2

[U-Boot] [PATCH v5 20/27] dm: eth: Add support for ethprime env var

2015-03-03 Thread Joe Hershberger
The ethprime env var is used to indicate the starting device if none is specified in ethact. Also support aliases specified in the ethprime var. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: -Fix compile error on !DM_ETH

[U-Boot] [PATCH v5 17/27] sandbox: eth: Add ARP and PING response to sandbox driver

2015-03-03 Thread Joe Hershberger
The sandbox driver will now generate response traffic to exercise the ping command even when no network exists. This allows the basic data pathways of the DM to be tested. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5

[U-Boot] [PATCH v5 05/27] net: Remove unneeded extern in net.h

2015-03-03 Thread Joe Hershberger
Many of the functions in net.h were preceded extern needlessly. Removing them to limit the number of checkpatch.pl complaints. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: None Changes in v4: None Changes in v3: None Changes

[U-Boot] [PATCH v5 04/27] net: Rename helper function to be more clear

2015-03-03 Thread Joe Hershberger
Make it clear that the helper is checking the addr, not setting it. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None net/eth.c | 13 - 1 file changed

[U-Boot] [PATCH v5 23/27] test: dm: net: Add a test of the netretry behavior

2015-03-03 Thread Joe Hershberger
The effect of the netretry env var was recently changed. This test checks that behavior. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v5: -Added comments about test cases -Switched to function to control state of mock driver Changes in v4: -Updated expected behavior

[U-Boot] [PATCH v5 12/27] cmd: net: Clean up return codes

2015-03-03 Thread Joe Hershberger
The return codes in common/cmd_net.c had a number of inconsistencies. Update them to all use the enum from command.h Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v5: -New to v5 Changes in v4: None Changes in v3: None Changes in v2: None common/cmd_net.c | 45

[U-Boot] [PATCH v5 13/27] dm: eth: Add basic driver model support to Ethernet stack

2015-03-03 Thread Joe Hershberger
First just add support for MAC drivers. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v5: -Add a note to doc/README.drivers.eth about its obsolescence -Expanded the Kconfig help -Moved dm/ header -Use local var for priv in eth_get_dev() Changes in v4: --Don't prevent

[U-Boot] [PATCH v5 27/27] net: Improve error handling

2015-03-03 Thread Joe Hershberger
them yet. halt() is not expected to error. Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v5: -New to v5 Changes in v4: None Changes in v3: None Changes in v2: None include/net.h | 3 ++- net/eth.c | 56 net

[U-Boot] [PATCH v5 24/27] sandbox: eth: Add a bridge to a real network for sandbox

2015-03-03 Thread Joe Hershberger
: sudo /sbin/setcap CAP_NET_RAW+ep u-boot Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v5: -Added fallback for setting promiscuous mode -Added help to Kconfig -Added more details and examples in the README -Check for NULL when reading fdt for host interface -Check

[U-Boot] [PATCH v5 10/27] net: Make netretry actually do something

2015-03-03 Thread Joe Hershberger
is now changed to retry any failed command (rotating through the eth adapters if ethrotate != no). It also defaulted to retry forever. It is now changed to default to not retry Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: None

[U-Boot] [PATCH v5 25/27] sandbox: Enable DHCP and IP defrag

2015-03-03 Thread Joe Hershberger
This is now testable via the eth-raw interface Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: None Changes in v4: -New to v4 Changes in v3: None Changes in v2: None include/configs/sandbox.h | 8 1 file changed, 8

[U-Boot] [PATCH v5 15/27] dm: eth: Pass the packet pointer as a parameter to recv

2015-03-03 Thread Joe Hershberger
net_process_received_packet(). Signed-off-by: Joe Hershberger joe.hershber...@ni.com --- Changes in v5: -New to v5 Changes in v4: None Changes in v3: None Changes in v2: None include/net.h | 2 +- net/eth.c | 13 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/net.h

[U-Boot] [PATCH v5 07/27] net: Change return codes from net/eth.c to use errorno constants

2015-03-03 Thread Joe Hershberger
Many functions returned -1 previously. Change them to return appropriate error codes. Signed-off-by: Joe Hershberger joe.hershber...@ni.com Reported-by: Simon Glass s...@chromium.org Reviewed-by: Simon Glass s...@chromium.org --- Changes in v5: None Changes in v4: -New to v4 Changes in v3

[U-Boot] [PATCH v5 09/27] net: Remove the bd* parameter from net stack functions

2015-03-03 Thread Joe Hershberger
This value is not used by the network stack and is available in the global data, so stop passing it around. For the one legacy function that still expects it (init op on old Ethernet drivers) pass in the global pointer version directly to avoid changing that interface. Signed-off-by: Joe

<    6   7   8   9   10   11   12   13   14   15   >