27 Mar, 2016

1 commit


27 Feb, 2016

1 commit

  • There is currently one config option (CONFIG_NET_RETRY_COUNT) that
    is available to tune the retries of the network stack.
    Unfortunately, it is global to all protocols, and the value is
    interpreted differently in all of them.

    Add a new environment variable that directly sets the retry period for
    BOOTP timeouts. If this new value is not set, the period is still derived
    from the default number of retries, or from CONFIG_NET_RETRY_COUNT if
    defined. When both the new variable is set and CONFIG_NET_RETRY_COUNT
    is defined, the variable has precedence.

    Signed-off-by: Alexandre Messier

    Alexandre Messier
     

06 Feb, 2016

1 commit

  • This fixes the following error when building microblaze-generic:

    net/eth-uclass.c: In function 'eth_post_probe':
    net/eth-uclass.c:466:18: error: 'gd' undeclared (first use in this function)
    ops->start += gd->reloc_off;

    Fixes: db9391e1 ("net: Move driver-model code into its own file")

    Signed-off-by: Simon Glass
    Acked-by: Joe Hershberger

    Simon Glass
     

29 Jan, 2016

8 commits


08 Jan, 2016

4 commits

  • 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

    Andre Przywara
     
  • Introduced in 45b4773 (net/arp: account for ARP delay, avoid duplicate packets on timeout)

    Check the arp timeout and adjust the timeout start time before the call
    to eth_recv() so that the sandbox driver has the opportunity to adjust
    the sandbox timer after the new start time has been recorded.

    Also, change the adjustment amount by 11 seconds instead of exactly the
    10 seconds that the ping timout is expecting since the timeout check is
    looking for the time elapsed to be greater than but not equal to the
    specified delay.

    Signed-off-by: Joe Hershberger
    Reviewed-by: Stefan Brüns
    Acked-by: Simon Glass

    Joe Hershberger
     
  • 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
    Acked-by: Joe Hershberger
    Acked-by: Simon Glass
    Tested-by: Simon Glass

    Bin Meng
     
  • In eth_current_changed(), the call to eth_get_dev() below has a side
    effect of rotating ethernet device if uc_priv->current == NULL. This
    is not what we want when 'ethrotate' variable is 'no'.

    Signed-off-by: Bin Meng
    Acked-by: Joe Hershberger
    Acked-by: Simon Glass
    Tested-by: Simon Glass

    Bin Meng
     

18 Dec, 2015

1 commit


20 Nov, 2015

1 commit


30 Oct, 2015

5 commits


29 Oct, 2015

11 commits

  • As we don't modify the 'name' parameter, so change it to const.

    Signed-off-by: Josh Wu
    Reviewed-by: Simon Glass
    Acked-by: Joe Hershberger

    Josh Wu
     
  • 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
    Acked-by: Joe Hershberger

    Gong Qianyu
     
  • Timeout handler should be stopped after reception of DHCPACK. If "autoload"
    is not set, the handler is immediately replaced by the TFTP handler,
    otherwise it may trigger before the next boot stage begins.

    Signed-off-by: Stefan Brüns
    Acked-by: Joe Hershberger

    Stefan Brüns
     
  • eth_rx() in the main reception loop may trigger sending a packet which
    is already timed out (or will immediately) upon reception of an ARP reply.
    As long as the ARP reply is pending, the timeout handler of a packet
    should be postponed.
    Happens on TFTP with bad network (e.g. WLAN).

    Signed-off-by: Stefan Brüns
    Acked-by: Joe Hershberger

    Stefan Brüns
     
  • net_start_again() will be called from net_loop() if state is NETLOOP_FAIL.

    Signed-off-by: Stefan Brüns
    Acked-by: Joe Hershberger

    Stefan Brüns
     
  • Pad has no len byte, so the normal parsing code fails.

    Signed-off-by: Stefan Brüns
    Acked-by: Joe Hershberger

    Stefan Brüns
     
  • RFC1542, 3.2:
    "The 'secs' field of a BOOTREQUEST message SHOULD represent the
    elapsed time, in seconds, since the client sent its first BOOTREQUEST
    message. Note that this implies that the 'secs' field of the first
    BOOTREQUEST message SHOULD be set to zero."

    Signed-off-by: Stefan Brüns
    Acked-by: Joe Hershberger

    Stefan Brüns
     
  • Rename check_packet to check_reply_packet to make its function more
    obvious.
    The check for DHCP_* values is completely off, as it should
    compare against DHCP option 53 (Message Type). Only valid value for
    any Bootp/DHCP reply is BOOTREPLY.

    Signed-off-by: Stefan Brüns
    Acked-by: Joe Hershberger

    Stefan Brüns
     
  • This fixes the error when STATUS_LED_BOOT is not defined.

    Signed-off-by: Thomas Chou
    Acked-by: Joe Hershberger

    Thomas Chou
     
  • If CONFIG_CMD_DHCP is enabled, the vci (vendor-class-identifier) string
    isn't inserted into the bootp-packet during SPL stage because the

    CONFIG_BOOTP_VCI_STRING
    instead
    CONFIG_SPL_NET_VCI_STRING

    We fix this with testing for CONFIG_SPL_BUILD and testing for existing
    CONFIG_SPL_NET_VCI_STRING.

    Signed-off-by: Hannes Schmelzer
    Acked-by: Joe Hershberger
    Reviewed-by: Tom Rini

    Hannes Petermaier
     
  • TFTP source and destination port variable names are
    'tftpsrcp' and 'tftpdstp' in the code, but 'tftpsrcport'
    and 'tftpdstport' in the README file. Fix the README.

    Add environment variable 'tftptimeoutcountmax'. As per the
    comments about the global variable tftp_timeout_count_max,
    make sure tftptimeoutcountmax is nonnegative.

    Introduce configuration option CONFIG_NET_TFTP_VARS,
    which controls whether environment variables tftpblocksize,
    tftptimeout, and tftptimoueoutcountmax are read by the TFTP
    client code. CONFIG_NET_TFTP_VARS defaults to y but can be
    set to n by targets with to tight size contraints.

    Make bf527-ezkit set CONFIG_NET_TFTP_VARS to n to keep the
    target size below limit.

    Albert ARIBAUD \(3ADEV\)
     

30 Sep, 2015

2 commits

  • This patch introduces CONFIG_NETCONSOLE as an option to the
    Kconfig system.

    Joe Hershberger pointed out that it may not be entirely free of
    problems, as many boards predating the driver model define this
    symbol directly via include files. In case they're not properly
    migrated, their NetConsole might 'vanish' if they start to use
    CONFIG_NET or CONFIG_NETDEVICES.

    Signed-off-by: Bernhard Nortmann
    Acked-by: Joe Hershberger

    Bernhard Nortmann
     
  • 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
    Reviewed-by: Simon Glass
    Acked-by: Joe Hershberger

    Bernhard Nortmann
     

09 Sep, 2015

3 commits

  • When given a device name string, we should test to see if it is
    really an alias like "eth#".

    Signed-off-by: Bin Meng
    Acked-by: Joe Hershberger

    Bin Meng
     
  • 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
    Acked-by: Joe Hershberger

    Bin Meng
     
  • Commit 620776d "tftp: adjust settings to be suitable for 100Mbit ethernet"
    causes the following error message when trying to load a file using 'tftp'
    command via a tftp server.

    TFTP error: 'Unsupported option(s) requested' (8)

    This is due to with commit 620776d changes, the tftp option 'timeout'
    value is now set to zero which is an invalid value as per RFC2349 [1].
    Valid values range between "1" and "255" seconds, inclusive. With some
    tftp servers that strictly implement the RFC requirement, it reports
    such an error message.

    Revert commit 620776d for RFC compliance.

    [1] https://www.ietf.org/rfc/rfc2349.txt

    Signed-off-by: Bin Meng
    Acked-by: Joe Hershberger

    Bin Meng
     

07 Sep, 2015

1 commit


22 Aug, 2015

1 commit

  • Current behavior is that if CTRL+C is pressed command returns 0 that was
    successful which is not correct behavior.
    The easiest test case is "tftpboot 80000 uImage && echo yes"
    and press CTRL+C. Then the second command is called which is incorrect.

    Error log:
    zynq-uboot> tftpb 80000 uImage && echo yes
    Gem.e000b000:7 is connected to Gem.e000b000. Reconnecting to
    Gem.e000b000
    Gem.e000b000 Waiting for PHY auto negotiation to complete....... done
    Using Gem.e000b000 device
    TFTP from server 192.168.0.102; our IP address is 192.168.0.101
    Filename 'uImage'.
    Load address: 0x80000
    Loading: ################
    Abort
    yes
    zynq-uboot>

    This patch adds -EINTR return value when CTRL+C is pressed.

    Signed-off-by: Michal Simek
    Reviewed-by: Tom Rini
    Acked-by: Joe Hershberger

    Michal Simek