1. 22 7月, 2014 1 次提交
  2. 13 5月, 2014 1 次提交
  3. 07 2月, 2014 1 次提交
    • A
      net: execute "miiphy_init" if CONFIG_PHYLIB defined · 27ee59af
      Alexey Brodkin 提交于
      In "common/Makefile" "miiphyutil.o" gets built if any of the following
      items enabled:
       * CONFIG_PHYLIB
       * CONFIG_MII
       * CONFIG_CMD_MII
      
      So 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 <rob.herring@calxeda.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Wolfgang Denk <wd@denx.de>
      Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      27ee59af
  4. 24 7月, 2013 1 次提交
  5. 28 9月, 2012 1 次提交
  6. 25 9月, 2012 2 次提交
    • J
      net: Improve the speed of netconsole · f8be7d65
      Joe Hershberger 提交于
      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: NJoe Hershberger <joe.hershberger@ni.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Acked-by: NStefano Babic <sbabic@denx.de>
      f8be7d65
    • M
      api: net: fix length check in eth_receive() · 46c07bcf
      Michael Walle 提交于
      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: NMichael Walle <michael@walle.cc>
      Cc: Joe Hershberger <joe.hershberger@gmail.com>
      Cc: Rafal Jaworowski <raj@semihalf.com>
      Cc: Piotr Kruszynski <ppk@semihalf.com>
      46c07bcf
  7. 12 7月, 2012 2 次提交
  8. 07 7月, 2012 1 次提交
  9. 16 5月, 2012 3 次提交
  10. 04 4月, 2012 1 次提交
    • E
      net/eth.c: fix eth_write_hwaddr() to use dev->enetaddr as fall back · 69376644
      Eric Miao 提交于
      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 eth<n>addr 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 7616e785.
      Signed-off-by: NEric Miao <eric.miao@linaro.org>
      Acked-by: NSimon Glass <sjg@chromium.org>
      Acked-by: NDirk Behme <dirk.behme@de.bosch.com>
      CC: Stefan Roese <sr@denx.de>
      CC: Eric Miao <eric.miao@linaro.org>
      CC: Wolfgang Denk <wd@denx.de>
      CC: Philip Balister <philip@balister.org>
      CC: Zach Sadecki <zach@itwatchdogs.com>
      69376644
  11. 19 3月, 2012 4 次提交
  12. 07 3月, 2012 2 次提交
  13. 03 3月, 2012 1 次提交
  14. 21 12月, 2011 1 次提交
    • M
      net: introduce per device index · fea7dcae
      Michael Walle 提交于
      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: NMichael Walle <michael@walle.cc>
      Cc: Prafulla Wadaskar <prafulla@marvell.com>
      Cc: Mike Frysinger <vapier@gentoo.com>
      Cc: Wolfgang Denk <wd@denx.de>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      fea7dcae
  15. 06 10月, 2011 2 次提交
  16. 02 10月, 2011 1 次提交
  17. 22 9月, 2011 1 次提交
  18. 10 9月, 2011 1 次提交
  19. 05 9月, 2011 2 次提交
  20. 09 8月, 2011 1 次提交
  21. 03 8月, 2011 1 次提交
  22. 21 4月, 2011 1 次提交
    • A
      Create PHY Lib for U-Boot · 5f184715
      Andy Fleming 提交于
      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 support
      
      The 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
      reset
      
      A PHY driver provides:
      (optionally): probe
      config - initial setup, starting of auto-negotiation
      startup - waiting for AN, and reading link state
      shutdown - any cleanup needed
      
      The 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-boot
      Signed-off-by: NAndy Fleming <afleming@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Acked-by: NDetlev Zundel <dzu@denx.de>
      5f184715
  23. 20 2月, 2011 2 次提交
  24. 15 11月, 2010 1 次提交
    • B
      Net: clarify board/cpu_eth_init calls · 8ad25bf8
      Ben Warren 提交于
      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: NBen Warren <biggerbadderben@gmail.com>
      8ad25bf8
  25. 12 10月, 2010 1 次提交
  26. 10 8月, 2010 1 次提交
    • B
      Fix compile warnings for const correctness · d7fb9bcf
      Ben Warren 提交于
      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: NBen Warren <biggerbadderben@gmail.com>
      d7fb9bcf
  27. 12 7月, 2010 1 次提交
  28. 21 6月, 2010 1 次提交
  29. 20 6月, 2010 1 次提交