summaryrefslogtreecommitdiffstats
path: root/drivers/usb/eth/asix.c
Commit message (Collapse)AuthorAgeFilesLines
* Move ALLOC_CACHE_ALIGN_BUFFER() to the new memalign.h headerSimon Glass2015-09-111-0/+1
| | | | | | | Now that we have a new header file for cache-aligned allocation, we should move the stack-based allocation macro there also. Signed-off-by: Simon Glass <sjg@chromium.org>
* net: asix: fix operation without eepromMarcel Ziswiler2015-08-051-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-211-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>
* net: cosmetic: Fix var naming net <-> eth driversJoe Hershberger2015-04-181-1/+2
| | | | | | | | | | | | | | | 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>
* usb: eth: asix: Build warning fixes for 64-bitThierry Reding2015-04-141-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>
* net: asix: Add support for AX88772BAlexandre Courbot2014-10-221-0/+1
| | | | | | This USB device works as-is on this driver. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
* usb: cosmetic: double constJeroen Hofstee2014-06-251-1/+1
| | | | | | | | | 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>
* net: asix: don't pad odd-length TX packetsStephen Warren2014-03-071-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>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-16/+1
| | | | | | 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-301-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-121-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>
* net: asix: add AX88772B supportLucas Stach2012-09-261-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-261-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-261-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-261-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>
* CACHE: net: asix: Fix asix driver to work with data cache onMarek Vasut2012-07-111-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>
* drivers/usb/eth/asix.c: Fix build warningAnatolij Gustschin2012-05-221-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>
* ASIX: Fix buffer access in asix_get_phy_addr()Marek Vasut2011-09-241-1/+1
| | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
* Add support for ASIX AX88772 USB 2.0 10/100Mbit Ethernet AdaptorSimon Glass2011-02-191-0/+635
Driver originally written by NVIDIA Corporation, modified to handle odd-length packets. Signed-off-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud