summaryrefslogtreecommitdiff
path: root/drivers/usb/eth
Commit message (Collapse)AuthorAgeLines
* net: smsc95xx: Add driver-model supportSimon Glass2015-08-06-0/+142
| | | | | | | Add support for driver model, so that CONFIG_DM_ETH can be defined and used with this driver. Signed-off-by: Simon Glass <sjg@chromium.org>
* net: smsc95xx: Prepare for conversion to driver modelSimon Glass2015-08-06-122/+150
| | | | | | | | At present struct eth_device is passed around all over the place. This does not exist with driver model. Add explicit arguments instead, so that with driver model we can pass the correct things. Signed-off-by: Simon Glass <sjg@chromium.org>
* net: smsc95xx: Correct the error numbersSimon Glass2015-08-06-22/+26
| | | | | | | Instead of returning -1 on error, we should use a proper error number. Fix the code to conform to this. Signed-off-by: Simon Glass <sjg@chromium.org>
* net: smsc95xx: Rename AX_RX_URB_SIZE to RX_URB_SIZESimon Glass2015-08-06-5/+5
| | | | | | | The AX_ prefix comes from the Asix driver. Since this is not that, we should avoid this confusing prefix. Signed-off-by: Simon Glass <sjg@chromium.org>
* net: smsc95xx: Sort the include filesSimon Glass2015-08-06-2/+3
| | | | | | Tidy up the include file order before adding more. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: usb: Add an errno.h header to usb_ether.cSimon Glass2015-08-06-0/+1
| | | | | | This is required on some platforms, so add it. Signed-off-by: Simon Glass <sjg@chromium.org>
* net: asix: fix operation without eepromMarcel Ziswiler2015-08-05-6/+34
| | | | | | | | | | This patch fixes operation of our on-board AX88772B chip without EEPROM but with a ethaddr coming from the regular U-Boot environment. This is a forward port of some remaining parts initially implemented by Antmicro. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Marek Vasut <marex@denx.de>
* dm: usb: eth: Add driver-model support to the asix driverSimon Glass2015-07-21-21/+216
| | | | | | | | This USB Ethernet driver is quite widely use. Allow it to work with CONFIG_DM_ETH enabled. Most of the code remains common but there is a new packet receive flow which is handled specially. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: usb: Adjust the USB_DEVICE() macro namingSimon Glass2015-07-21-2/+2
| | | | | | | | | In Linux USB_DEVICE() is used to declare a USB device by vendor/device ID. We should follow the same convention in U-Boot. Rename the existing USB_DEVICE() macro to U_BOOT_USB_DEVICE() and bring in the USB_DEVICE() macro from Linux for use in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: usb: eth: Support driver model with USB EthernetSimon Glass2015-07-21-0/+127
| | | | | | | | | | | | | At present USB Ethernet does not work with CONFIG_DM_ETH. Add driver model support to this feature, so that it can work alongside other Ethernet devices with driver model. It was found that quite a bit of code is common in most of the USB Ethernet drivers. Add this code to the common layer to reduce the amount of duplicate code needed in USB Ethernet drivers when CONFIG_DM_ETH is used. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* net: cosmetic: Fix var naming net <-> eth driversJoe Hershberger2015-04-18-4/+6
| | | | | | | | | | | | | | | Update the naming convention used in the network stack functions and variables that Ethernet drivers use to interact with it. This cleans up the temporary hacks that were added to this interface along with the DM support. This patch has a few remaining checkpatch.pl failures that would be out of the scope of this patch to fix (drivers that are in gross violation of checkpatch.pl). Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: cosmetic: Name ethaddr variables consistentlyJoe Hershberger2015-04-18-1/+1
| | | | | | | | Use "_ethaddr" at the end of variables and drop CamelCase. Make constant values actually 'const'. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: usb: Add support for USB ethernet devices with driver modelSimon Glass2015-04-18-8/+44
| | | | | | | | | Add support for scanning USB etghernet devices with driver model. This mostly involves scanning all buses since device numbering is not unique across buses. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: eth: asix: Build warning fixes for 64-bitThierry Reding2015-04-14-1/+1
| | | | | | | Fix a type mismatch in a printf format string. Cc: Marek Vasut <marex@denx.de> Signed-off-by: Thierry Reding <treding@nvidia.com>
* usb: eth: asix88179: add ability to modify MAC addressRene Griessl2015-01-18-0/+14
| | | | | | | This patch enables U-Boot to modify the MAC address of the AX88179. Tested on RECS5250 (similar to Arndale5250) Signed-off-by: Rene Griessl <rgriessl@cit-ec.uni-bielefeld.de>
* usb: eth: add ASIX AX88179 DRIVERRene Griessl2014-12-31-0/+708
| | | | | | | | | | This patch adds driver support for the ASIX AX88179 USB3.0 to GbE network adapter. Driver has been tested on the RECS5250 COM module (similar to ARDALE5250). Testcase was DHCP and PXE boot. Signed-off-by: Rene Griessl <rgriessl@cit-ec.uni-bielefeld.de>
* usb: eth: fix MakefileRene Griessl2014-11-07-3/+1
| | | | | | fix obj-y term Signed-off-by: Rene Griessl <rgriessl@cit-ec.uni-bielefeld.de>
* net: asix: Add support for AX88772BAlexandre Courbot2014-10-22-0/+1
| | | | | | This USB device works as-is on this driver. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
* net: usb: Add SMSC copyright to smsc95xx driverSimon Glass2014-09-16-0/+1
| | | | | | | | | | | | | | | This driver was upstreamed without an SMSC copyright, even thought it seems that SMSC was the original author. See the kernel version for a code comparison: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2f7ca802bdae2ca41022618391c70c2876d92190 It's not clear who actually moved this code, or whether the kernel was the original source, or somewhere else, but it probably should still have the SMSC copyright. Signed-off-by: Simon Glass <sjg@chromium.org>
* usb: eth: smsc95xx: add LAN9500A device IDIlya Ledvich2014-06-25-0/+1
| | | | | | | | Add LAN9500A product ID (0x9e00) in order to support LAN9500A based dongles. Tested on cm_t335. Signed-off-by: Ilya Ledvich <ilya@compulab.co.il> Acked-by: Marek Vasut <marex@denx.de>
* usb: cosmetic: double constJeroen Hofstee2014-06-25-2/+2
| | | | | | | | | For plain array const can be either before or after the type definition. Adding both is simply redundand. Remove the later one. cc: marex@denx.de Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* usb: net: introduce support for Moschip USB ethernetGerhard Sittig2014-03-12-0/+820
| | | | | | | | | | | | | | | introduce an 'mcs7830' driver for Moschip MCS7830 based (7730/7830/7832) USB 2.0 Ethernet Devices see "MCS7830 -- USB 2.0 to 10/100M Fast Ethernet Controller" at http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=109;74;109 the driver was implemented based on the U-Boot Asix driver with additional information gathered from the Moschip Linux driver, development was done on "Delock 61147" and "Logilink UA0025C" dongles Signed-off-by: Gerhard Sittig <gsi@denx.de> Acked-by: Marek Vasut <marex@denx.de>
* net: asix: don't pad odd-length TX packetsStephen Warren2014-03-07-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | For Ethernet/USB RX packets, the ASIX HW pads odd-sized packets so that they have an even size. Currently, asix_recv() does remove this padding, and asic_send() adds equivalent padding in the TX path. However, the HW does not appear to need this packing for TX packets in practical testing with "ASIX Elec. Corp. AX88x72A 000001" Vendor: 0x0b95 Product 0x7720 Version 0.1. The Linux kernel does no such padding for the TX path. Remove the padding from the TX path: * For consistency with the Linux kernel. * NVIDIA has a Tegra simulator which validates that the length of USB packets sent to an ASIX device matches the packet length value inside the packet data. Having U-Boot and the kernel do the same thing when creating the TX packets simplifies the simulator's validation. Cc: Lucas Stach <dev@lynxeye.de> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de> Tested-by: Gerhard Sittig <gsi@denx.de>
* drivers: usb: convert makefiles to Kbuild styleMasahiro Yamada2013-10-31-25/+3
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* usb:smsx95xx LED activity for USB net driverSuriyan Ramasami2013-10-20-0/+14
| | | | | | | Add LED activity for SMSX95XX USB Ether driver. Signed-off-by: “Suriyan Ramasami" <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: smsc95xx: Add support for another SMSC95xx variantStefan Roese2013-08-19-0/+1
| | | | | | | | | This patch adds support for the SMSC9500 with product id 0x9900 which is equipped in the "EXSYS USB 2.0" etherner USB adapter. Tested on omap3_beagle. Signed-off-by: Stefan Roese <sr@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-65/+4
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* usb: add support for the USB Ethernet adapter D-Link DUB-E100 H/W Ver C1Pierre Aubert2013-06-30-0/+1
| | | | | | | | This trivial patch adds the definition of the vid/pid for the Ver C1 of the USB Ethernet adapter D-Link DUB-E100. Signed-off-by: Pierre Aubert <p.aubert@staubli.com> CC: Marek Vasut <marex@denx.de>
* usb: asix: Move software resets to basic_initJulius Werner2013-06-12-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | The ASIX driver calls a basic_init() function during get_info(), so that not all initialization tasks need to be redone on every init(). Unfortunately, the most important one is still triggered too often: the driver does a full port and MII reset on every asix_init(), requiring up to several seconds to reestablish the link. This patch confines that software reset into the asix_basic_init() function so that it will only be executed once. This saves about a second of boot time on systems using BOOTP. Note: this patch was previously submitted many moons ago as: usb: usbeth: asix: Do a fast init if link already established That patch seens to have been lost or forgotten, so this is a rebased version. It is tested on snow with a Asix USB dongle (Cisco). Signed-off-by: Julius Werner <jwerner@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* OMAP5: Enable USB Ethernet support with LAN9730Lubomir Popov2013-05-14-0/+1
| | | | | | | | Added the LAN9730 to list of supported devices. This chip is used in the sEVM, uEVM and som5_evb. Tested on the som5_evb with dhcp and ping. Signed-off-by: Lubomir Popov <lpopov@mm-sol.com>
* usb: usbeth: smsc95xx: remove EEPROM loaded checkMichael Spang2013-03-18-4/+0
| | | | | | | | | | | | [port of Linux kernel commit bcd218be5aeb by Steve Glendinning] The eeprom read & write commands currently check the E2P_CMD_LOADED_ bit is set before allowing any operations. This prevents any reading or writing unless a correctly programmed EEPROM is installed. Signed-off-by: Michael Spang <spang@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
* usb: add support for multiple usb controllersLucas Stach2012-10-15-1/+1
| | | | | | | | | Allows to initialize more than one USB controller at once. v2: print message when controller stop fails Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
* net: asix: add AX88772B supportLucas Stach2012-09-26-12/+23
| | | | | | | | | | | | | | | | | | | | Add AX88772B ID together with two fixes needed to make this work. 1. The packet length check has to be adjusted, as all ASIX chips only use 11 bits to indicate the length. AX88772B uses the other bits to indicate unrelated things, which cause the check to fail. This fix is based on a fix for the Linux kernel by Marek Vasut. Linux upstream commit: bca0beb9363f8487ac902931a50eb00180a2d14a 2. AX88772B provides several bulk endpoints. Only the first IN/OUT endpoints work in the default configuration. So stop enumeration after we found them to avoid overwriting the endpoint config with a non-working one. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: asix: add read_mac functionLucas Stach2012-09-26-12/+35
| | | | | | | | | | | | | | Initial device MAC should be read while getting info about the device, so it's wrong to only read it in asix_init(). Add a dedicated function to read the initial MAC, which is also able to handle devices that have their initial MAC stored in EEPROM. Call this function inasix_eth_get_info(). Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: asix: add write_hwaddr functionLucas Stach2012-09-26-11/+52
| | | | | | | | | | | | | All ASIX chipsets aside from AX88172 are able to set the MAC address on the hardware level. Add a function to expose this ability. To differentiate between chip types we now carry flags as driver private data. Also while touching the asix_dongles array constify this. Signed-off-by: Lucas Stach <dev@lynxeye.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: asix: split out basic reset functionLucas Stach2012-09-26-18/+26
| | | | | | | | | | | | The basic device reset ensures that the device is ready to service commands and does not need to get redone before each network operation. Split out the basic reset from asix_init() and instead call it from asix_eth_get_info(), so that it only gets called once. Signed-off-by: Lucas Stach <dev@lynxeye.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* net: introduce transparent driver private in ueth_dataLucas Stach2012-09-26-14/+35
| | | | | | | | | | Avoid clutter in ueth_data. Individual drivers should not mess with structures belonging to the core like this. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* Merge branch 'next' of git://git.denx.de/u-bootWolfgang Denk2012-07-30-13/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'next' of git://git.denx.de/u-boot: MPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c doc: cleanup - move board READMEs into respective board directories net: sh_eth: add support for SH7757's GETHER net: sh_eth: modify the definitions of regsiter net: sh_eth: add SH_ETH_TYPE_ condition net: sh_eth: clean up for the SH7757's code net: fec_mxc: Fix MDC for xMII net: fec_mxc: Fix setting of RCR for xMII net: nfs: make NFS_TIMEOUT configurable net: Inline the new eth_setenv_enetaddr_by_index function net: allow setting env enetaddr from net device setting net/designware: Consecutive writes to the same register to be avoided CACHE: net: asix: Fix asix driver to work with data cache on net: phy: micrel: make ksz9021 phy accessible net: abort network initialization if the PHY driver fails phylib: phy_startup() should return an error code on failure net: tftp: fix type of block arg to store_block Signed-off-by: Wolfgang Denk <wd@denx.de>
| * CACHE: net: asix: Fix asix driver to work with data cache onMarek Vasut2012-07-11-13/+17
| | | | | | | | | | | | | | | | | | The asix driver did not align buffers, therefore it didn't work with data cache enabled. Fix this. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@gmail.com>
* | smsc95xx: align buffers to cache line sizeIlya Yanok2012-07-18-4/+9
|/ | | | | | | Align buffers passed to the USB code to cache line size so they can be DMAed safely. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* drivers/usb/eth/asix.c: Fix build warningAnatolij Gustschin2012-05-22-1/+1
| | | | | | | | Fix: asix.c: In function 'asix_eth_get_info': asix.c:629:12: warning: assignment from incompatible pointer type Signed-off-by: Anatolij Gustschin <agust@denx.de>
* drivers/usb/eth/smsc95xx.c: Fix GCC 4.6 warningAnatolij Gustschin2012-05-22-2/+1
| | | | | | | | | Fix: smsc95xx.c: In function 'smsc95xx_eth_get_info': smsc95xx.c:869:12: warning: assignment from incompatible pointer type [enabled by default] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* eth: remove usb-ethernet devices before re-enumerating themVincent Palatin2012-03-03-2/+5
| | | | | | | | Fix the crash when running several times usb_init() with a USB ethernet device plugged. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Tested-by: Wolfgang Grandegger <wg@denx.de>
* usb_ether: fix typoPeter Meerwald2012-02-14-1/+1
| | | | | Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* smsc95xx: Debug message cleanupWolfgang Grandegger2011-11-22-7/+3
| | | | | | | | Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Wolfgang Grandegger <wg@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Simon Glass <sjg@chromium.org>
* smsc95xx: Fix MAC address programmingWolfgang Grandegger2011-11-22-3/+3
| | | | | | | | | | | | | Commit 79ad54400932d6484178a372fb3b659e3437473b broke MAC address programming in the SMSC95xx register set. Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Wolfgang Grandegger <wg@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Simon Glass <sjg@chromium.org>
* GCC4.6: Squash warnings in smsc95xx.cMarek Vasut2011-10-27-1/+1
| | | | | | | | | | | smsc95xx.c: In function 'smsc95xx_write_hwaddr': smsc95xx.c:380:2: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org>
* ASIX: Fix buffer access in asix_get_phy_addr()Marek Vasut2011-09-24-1/+1
| | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* Add Ethernet hardware MAC address framework to usbnetSimon Glass2011-08-08-2/+7
| | | | | | | | | | | | Built-in Ethernet adapters support setting the mac address by means of a ethaddr environment variable for each interface (ethaddr, eth1addr, eth2addr). This adds similar support to the USB network side, using the names usbethaddr, usbeth1addr, etc. They are kept separate since we don't want a USB device taking the MAC address of a built-in device or vice versa. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Eric Bénard <eric@eukrea.com>
* Add support for SMSC95XX USB 2.0 10/100MBit Ethernet AdapterSimon Glass2011-08-08-0/+887
| | | | | | | | The SMSC95XX is a USB hub with a built-in Ethernet adapter. This adds support for this, using the USB host network framework. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Eric Bénard <eric@eukrea.com>