aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy
Commit message (Collapse)AuthorAgeFilesLines
* generic: revert workarounds for AR8337 switchMathias Kresin2018-08-232-62/+1
| | | | | | | | | | | | | The intention of 967b6be118e3 ("ar8327: Add workarounds for AR8337 switch") was to remove the register fixups for AR8337. But instead they were removed for AR8327. The RGMII RX delay is forced even if the port is used as phy instead of mac, which results in no package flow at least for one board. Fixes: FS#1664 Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: rtl8366_smi: guard of_mdiobus_register() callJo-Philipp Wich2018-05-111-1/+5
| | | | | | | | Make the call to of_mdiobus_register() dependant on CONFIG_OF to avoid pulling in an unwanted dependency on of_mdio.ko. Fixes: 3dc523f232 kernel: add OF support to rtl8355 driver Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* kernel: add OF support to rtl8355 driverJohn Crispin2018-05-071-1/+10
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* ar8216: reduce latency even further for ar8327 chipsFelix Fietkau2018-04-081-2/+4
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar8216: reduce latency by inserting scheduling points into code hogging the CPUFelix Fietkau2018-04-081-2/+7
| | | | | | Should reduce network related latency caused by accessing MIB counters Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: b53: fix compilation on BCM47XXRafał Miłecki2018-03-211-0/+2
| | | | | | | | | This fixes: drivers/net/phy/b53/b53_priv.h:325:2: error: enumeration value '<board>' not handled in switch [-Werror=switch] errors. Fixes: 0de2213eeade7 ("kernel: b53: look for NVRAM's "robo_reset" entry on every platform") Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: b53: look for NVRAM's "robo_reset" entry on every platformRafał Miłecki2018-03-211-6/+8
| | | | | | | | | | Since kernel 4.1 bcm47xx_nvram_gpio_pin() is now defined in a global header and can be safely called even on non-Broadcom platforms. This change makes b53 look for "robo_reset" on ARCH_BCM_5301X and slightly simplifies the code. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: b53: drop support for old location of bcm47xx_nvram.hRafał Miłecki2018-03-131-3/+1
| | | | | | | | In kernels 4.0 and older that header file was located in some subdir of arch/mips/include. Target brcm47xx supports kernels 4.4 and 4.9 only so that code isn't needed anymore. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* swconfig: convert swdevs_lock from spinlock to mutexFelix Fietkau2018-03-121-3/+3
| | | | | | Should fix some sleep-while-atomic issues Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: ar83xx: remove stray leading spaceJohn Crispin2018-02-201-3/+3
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* kernel: ar83xx: add support to configure per port VLAN priorityTan Hong Hui2018-02-203-0/+55
| | | | | | | | | Add support to allow for per switch port VLAN priority (PCP) bits for the ar8327/8337 chip using the swconfig utility. Tested on Netgear R7800 Signed-off-by: Tan Hong Hui <hhtan72@yahoo.com>
* generic: swconfig: reduce lock duration on sysfs filesKevin Darbyshire-Bryant2018-02-141-8/+12
| | | | | | | | sysfs attributes 'port_mask' & 'speed_mask' held locks whilst doing mundane tasks such as sprintf. Refactor code to reduce length of time locks are held unnecessarily. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* generic: swconfig: add mode led attributeKevin Darbyshire-Bryant2018-02-141-12/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add sysfs 'mode' attribute to swconfig controlled LEDs. swconfig 'link state' LEDs blink in the presence of port traffic. This behaviour becomes more obvious as switches start to support get_port_stats() e.g. commits 0369e358916ef092a1644334f5dd1412051b68a4, 3056d09b4046e0eb0f6de0f3f5432cd9fa86fc51, 4ddbc43cc15c2fa128a2f169964ef7eb508cf2c5, 4d8a66d9346373c2a7fcac5bdae3f662a9dbd9df. This blinking can be confusing/distracting if the switch has other LEDs used to indicate traffic. Provide a 'mode' sysfs attribute that controls the blink on traffic behaviour. mode - either "none" (LED is off) or a space separated list of one or more: link: LED's normal state reflects whether the link is up (has carrier) or not tx: LED blinks on transmitted data rx: LED blinks on receive data Note that 'link' considers any port speed mask that may be applicable. e.g. if an LED is configured to indicate 1Gbit link speed and mode is set to 'link rx tx' but the port is connected at 100Mbit then the LED will not light or blink. A mode of 'tx rx' will blink in the presence of traffic only if the port matches the rate (if configured) This maintains compatibility with existing behaviour. Attribute is 'link tx rx' by default for backwards compatible behaviour. Many thanks to Thibaut Varene for providing a more sensible led_event routine after I had mangled the original, and other coding style hints. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Acked-by: Thibaut VARENE <hacks@slashdirt.org>
* kernel: generic: Add kernel 4.14 supportHauke Mehrtens2017-12-163-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds initial support for kernel 4.14 based on the patches for kernel 4.9. In the configuration I deactivated some of the new possible security features like: CONFIG_REFCOUNT_FULL CONFIG_SLAB_FREELIST_HARDENED CONFIG_SOFTLOCKUP_DETECTOR CONFIG_WARN_ALL_UNSEEDED_RANDOM And these overlay FS options are also deactivated: CONFIG_OVERLAY_FS_INDEX CONFIG_OVERLAY_FS_REDIRECT_DIR I activated this: CONFIG_FORTIFY_SOURCE CONFIG_POSIX_TIMERS CONFIG_SLAB_MERGE_DEFAULT CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED I am not sure if I did the porting correct for the following patches: target/linux/generic/backport-4.14/020-backport_netfilter_rtcache.patch target/linux/generic/hack-4.14/220-gc_sections.patch target/linux/generic/hack-4.14/321-powerpc_crtsavres_prereq.patch target/linux/generic/pending-4.14/305-mips_module_reloc.patch target/linux/generic/pending-4.14/611-netfilter_match_bypass_default_table.patch target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* generic: drop support for get_port_stats() on ar8xxxThibaut VARENE2017-09-133-59/+18
| | | | | | | | | | | | | | | | The implementation is not efficient on ar8xxx switches. It triggers high CPU load and degrades device performance. The high CPU load has been traced down to the ar8xxx_reg_wait() call in ar8xxx_mib_op(), which has to usleep_range() till the MIB busy flag set by the request to update the MIB counter is cleared. This commit removes the get_port_stats() code introduced in 4d8a66d and leaves a note for future hacker's beware. Fixes: FS#1004 Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* kernel: rtl8306: fix port link statusMathias Kresin2017-09-081-0/+4
| | | | | | | | | | | In case the link changes from down to up, the register is only updated on read. If the link failed/was down, this bit will be 0 until after reading this bit again. Fixes a reported link down by swconfig alebit the link is up (query for the link again will show the correct link status) Signed-off-by: Mathias Kresin <dev@kresin.me>
* generic: make switch_port_stats tx/rx_bytes long longThibaut VARENE2017-09-011-1/+1
| | | | | | | | | | | | | | This generic structure defines tx_bytes and rx_bytes as unsigned long (u32), while several devices would typically report unsigned long long (u64). The code can work as is, but there's a chance that with a sufficiently fast interface the overflow might happen too fast to be correctly noticed by the consumers of this data. This patch makes both field unsigned long long and updates the only known consumer of this data: swconfig_leds.c Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* generic: provide get_port_stats() on rtl836x switchesThibaut VARENE2017-09-016-0/+74
| | | | | | | | | | This patch provides a generic switch_dev_ops 'get_port_stats()' callback by taping into the relevant port MIB counters. This callback is used by swconfig_leds led trigger to blink LEDs with port network traffic. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* generic: provide get_port_stats() on b53 switchesThibaut VARENE2017-09-011-1/+57
| | | | | | | | | | This patch provides a generic switch_dev_ops 'get_port_stats()' callback by taping into the relevant port MIB counters. This callback is used by swconfig_leds led trigger to blink LEDs with port network traffic. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* generic: provide get_port_stats() on adm6996 switchesThibaut VARENE2017-09-011-0/+32
| | | | | | | | | | This patch provides a generic switch_dev_ops 'get_port_stats()' callback by taping into the relevant port MIB counters. This callback is used by swconfig_leds led trigger to blink LEDs with port network traffic. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* generic: provide get_port_stats() on ar8xxx switchesThibaut VARENE2017-09-013-0/+61
| | | | | | | | | | | | | This patch provides a generic switch_dev_ops 'get_port_stats()' callback by taping into the relevant port MIB counters. The implementation uses a generic callback that select the correct MIB counter index based on chip version. This callback is used by swconfig_leds led trigger to blink LEDs with port network traffic. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* brcm47xx: resolve GPIO conflict for WRT54GSv1Mirko Parthey2017-07-021-5/+0
| | | | | | | | | | | | | | | On the Linksys WRT54GSv1, the adm6996 switch driver and the gpio_button_hotplug module both claim GPIO 6, which is connected to the Reset button. When the switch driver's request wins, the Reset button cannot work. This makes it impossible to enter failsafe mode without a serial console. Stop requesting the "adm_rc" GPIO in the switch driver, since it is not used anywhere. Fixes FS#792. Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
* linux/swconfig_get_attr: fix leak of msg in case of errorAlexander Couzens2017-06-111-1/+1
| | | | | Found-by: Coverity Scan #1330102 Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* b53: allow configuration through device treeJonas Gorski2017-06-103-19/+180
| | | | | | | Add support for the same binding as upstream b53 to allow an easy switch. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* ip17xx: correct aneg_done return valueSergey Ryazanov2017-06-071-1/+1
| | | | | | | | | PHY core treats any positive return value as the auto-negotiation done indication. Since we do not actually check any device register in this callback then update it to return positive value with a neutral meaning instead of the register flag to avoid confusing for future readers. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* mvswitch: fix autonegotiation issueSergey Ryazanov2017-06-071-0/+7
| | | | | | | | | | | | | | | The Marvel 88E6060 switch has an MDIO interface, but does not emulate regular PHY behavior for the host. The network core can not detect using the generic code, whether the connection via the attached PHY can be used or not. The PHY's state machine is stuck in a state of auto-negotiation and does not go any further so the Ethernet interface of the router stay forever in the not-runing state. Fix this issue by implementing the aneg_done callback to be able to inform the network core that the Ethernet interface link to which the switch is connected can be marked as RUNNING. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* generic: rtl8366rb: add support for initvals from DTSKevin Darbyshire-Bryant2017-04-251-0/+25
| | | | | | | | | Allow per-device initvals in the DTS file for rlt8366rb switches. Shamelessly copies 30494598f891fc4436a49eca55fc31d03c087841 Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* ar8327: Add workarounds for AR8337 switch.Vittorio Gambaletta2017-03-302-1/+62
| | | | | | | | | | | | | | | | RGMII RX delay setting needs to be always specified for AR8337 to avoid port 5 RX hang on high traffic / flood conditions. Also, the HOL registers that set per-port and per-packet-priority buffer sizes are updated with the reduced values suggested by the QCA switch team. Finally, AR8327 reserved register fixups are disabled for the AR8337. This patch is adapted from the Code Aurora QSDK, but with magic values mapped to proper defines. Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
* Revert "kernel: ar8327/ar8337: disable ARL access code to avoid lockups ↵Stijn Tintel2017-02-221-6/+0
| | | | | | | | | | | (FS#384)" This reverts commit ec1a695daa7390a6c24e3b28d3956f194cba2cb5. Revert the workaround, the problem was properly fixed in 237454991618e0e8b7ceb8a8a2a43fca12c1a454. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* ar8216: flush ARL table during reset after init_globalsGünther Kelleter2017-02-161-0/+1
| | | | | | | | | | commit 33b72b8e0faf7a39faabece584fd6da61cd8f8df "ar8216: adjust ATU flushing in case of link changes" introduced portwise flushing on link down events. Now the ARL table could be in a chaotic state after boot where ar8xxx_sw_get_arl_table looped forever (depending on the entries collected while booting). Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
* kernel: port b53 to use kernel 4.5+ APIRafał Miłecki2017-02-062-17/+8
| | | | | | For backward 4.4 compatibility I added patch reverting my changes. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: update phy drivers for 4.9Felix Fietkau2017-02-037-134/+90
| | | | | | add backport patches for older kernels Signed-off-by: Felix Fietkau <nbd@nbd.name>
* generic: rtl8366rb: fix compatible stringMathias Kresin2017-02-031-1/+1
| | | | | | | Use a vendor prefix as it has to be for all not core driver. Update the compatible string in the device tree files accordingly. Signed-off-by: Mathias Kresin <dev@kresin.me>
* rtl8366_smi: add linux 4.4 compatibilityFelix Fietkau2017-02-011-4/+9
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* generic: rtl836x: add support for Green FeatureTobias Wolf2017-01-271-62/+198
| | | | | | | | The GPL licensed source code of Belkin contains an ASIC based "Green Feature". This change adds support for this Green Feature that can be activated with an DTS option or swconfig. Signed-off-by: Tobias Wolf <github-NTEO@vplace.de>
* generic: rtl8366s: add support support for initvals from DTSTobias Wolf2017-01-271-2/+27
| | | | | | | This change provides the possibility to define per-device initvals in the DTS file for a rlt8366s switch. Signed-off-by: Tobias Wolf <github-NTEO@vplace.de>
* kernel: ar8327/ar8337: disable ARL access code to avoid lockups (FS#384)Jo-Philipp Wich2017-01-161-0/+6
| | | | | | | | | | Running ar8327_get_arl_entry() early after boot leads to MDIO related system lockups on several devices using this driver. Since dumping the ARL table contens is an optional, uncritical feature, simply disable the code for now. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* mvsw61xx: add support for MV88E6352Imre Kaloz2017-01-132-0/+7
| | | | | | MV88E6352 is used on Linksys WRT3200ACM Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
* generic: ar8216: fix invalid bounds check imported from ChromeOS (FS#347)Jo-Philipp Wich2016-12-231-1/+1
| | | | | | | | The priv->vlan_id member is of size AR8X16_MAX_VLANS, not AR8X16_MAX_PORTS, so check for the proper maximum value in order to avoid capping valid VLAN IDs to 7 (AR8X16_MAX_PORTS - 1). Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* net: ar8327: modify some configuration of switchPavel Kubelun2016-12-012-4/+13
| | | | | | | | | | | | | | | | Imported from https://source.codeaurora.org/quic/qsdk/system/openwrt/commit/?h=korg/linux-3.4.y/release/arugula_bb_cs&id=2be4f8a8b205ae1a37db44839864451ebe893e6e Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> Enable flow control of LAN and WAN ports to get better performance. Setup pvid as 0 for all ports during initialisation to avoid confusion during system or switch INIT. Disable PORT MAC before config MAC to avoid it work abnormal. This change is for IR-054144, IR-057315. Change-Id: I345f3dffa59ad3f97150e09692723da12a7b1067 Signed-off-by: Zou Shunxiang <shunxian@codeaurora.org> Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
* net: ar8216: address security vulnerabilities in swconfig & ar8216Pavel Kubelun2016-12-012-7/+26
| | | | | | | | | | | | | | | | | | | | | | | Imported from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e1aaf7ec008a97311867f0a7d0418e4693fecfd4%5E%21/#F0 Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> CHROMIUM: net: ar8216: address security vulnerabilities in swconfig & ar8216 This patch does the following changes: *address the security vulnerabilities in both swconfig framework and in ar8216 driver (many bound check additions, and turned swconfig structure signed element into unsigned when applicable) *address a couple of whitespaces and indendation issues BUG=chrome-os-partner:33096 TEST=none Change-Id: I94ea78fcce8c1932cc584d1508c6e3b5dfb93ce9 Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> Reviewed-on: https://chromium-review.googlesource.com/236490 Reviewed-by: Toshi Kikuchi <toshik@chromium.org> Commit-Queue: Toshi Kikuchi <toshik@chromium.org> Tested-by: Toshi Kikuchi <toshik@chromium.org>
* net: ar8216: prevent device duplication in ar8xxx_dev_listPavel Kubelun2016-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/fd7b89dd464a4afffa04ff2e17c771dfe95668cf%5E%21/#F0 Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> CHROMIUM: drivers: ar8216: prevent device duplication in ar8xxx_dev_list If probe is called twice, once for PHY0 and a second time for PHY4, the same switch device will be added twice to ar8xxx_dev_list, while supposedly this list should have one element per hardware switch present in the system. While no negative impact have been observed, it does happen if a platform instanciates these two PHYs from device-tree, as an example. Change-Id: Iddcbdf7d4adacb0af01975b73f8e56b4582e894e Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> Reviewed-on: https://chromium-review.googlesource.com/234790 Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Toshi Kikuchi <toshik@chromium.org> Tested-by: Toshi Kikuchi <toshik@chromium.org>
* net: ar8216: hold ar8xxx_dev_list_lock during use_count--Pavel Kubelun2016-12-011-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c3fd96a7b87da23979d8569ce45447f8419ca303%5E%21/#F0 Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> CHROMIUM: drivers: ar8216: hold ar8xxx_dev_list_lock during use_count-- It is possible for the remove() callback to run twice in parallel, which could result into --use_count returning only 1 in both cases and the rest of the unregistration path to never be reached. This case has never been observed in practice, but we will fix preventively to make the code more robust. BUG=chrome-os-partner:33096 TEST=none Change-Id: If09abe27fdb2037f514f8674418bafaab3cbdef6 Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> Reviewed-on: https://chromium-review.googlesource.com/232870 Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Toshi Kikuchi <toshik@chromium.org> Tested-by: Toshi Kikuchi <toshik@chromium.org>
* net: ar8327: replace sprintf() by scnprintf()Pavel Kubelun2016-12-011-2/+1
| | | | | | | | | | | | | | | | | Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/fd0c41c7b9327ce003f44df38ce42556fb177b17%5E%21/#F0 Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> CHROMIUM: drivers: ar8216: replace sprintf() by scnprintf() BUG=chrome-os-partner:33096 TEST=none Change-Id: Ib82035c9f2769a86d3e90f9573a09e5700ff5676 Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> Reviewed-on: https://chromium-review.googlesource.com/232829 Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Tested-by: Toshi Kikuchi <toshik@chromium.org> Reviewed-by: Toshi Kikuchi <toshik@chromium.org>
* net: ar8327: remove unnecessary spinlocksPavel Kubelun2016-12-011-4/+0
| | | | | | | | | | | | | | | | | Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/541c15f8dd02ddce07e0a462a0c2572d8398bccc%5E%21/#F0 Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> CHROMIUM: drivers: ar8216: remove unnecessary spinlocks BUG=chrome-os-partner:33096 TEST=none Change-Id: Ia1b51258504501863fd3298717cc923a1baf34ca Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> Reviewed-on: https://chromium-review.googlesource.com/232828 Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Toshi Kikuchi <toshik@chromium.org> Tested-by: Toshi Kikuchi <toshik@chromium.org>
* net: ar8216: sync mib_work cancellationPavel Kubelun2016-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c05af20272059e149e2da2e1fa1fbd90c03ec979 Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> CHROMIUM: drivers: ar8216: sync mib_work cancellation ar8xxx_mib_stop() is called from ar8xxx_phy_remove(), so we want to make sure the work doesn't run after priv is freed / the device ceases to exist. BUG=chrome-os-partner:33096 TEST=none Change-Id: Iafb44ce93a87433adc4576e5fea5fda58d1f43a9 Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> Reviewed-on: https://chromium-review.googlesource.com/232827 Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Toshi Kikuchi <toshik@chromium.org> Reviewed-by: Grant Grundler <grundler@chromium.org> Tested-by: Toshi Kikuchi <toshik@chromium.org>
* kernel: rtl8367(b): fix build errorMathias Kresin2016-11-192-2/+2
| | | | | | | | | | Fix build on targets not using CONFIG_MODULE_STRIPPED. Neither RTL8367_DRIVER_DESC nor RTL8367B_DRIVER_DESC are defined anywhere. It worked for targets using CONFIG_MODULE_STRIPPED since our module stripper no-ops the various module info macros. Signed-off-by: Mathias Kresin <dev@kresin.me>
* generic: ar8216: improve ar8xxx_is_possible checkChristian Lamparter2016-10-151-6/+6
| | | | | | | | | | | | | | | | | The commit "generic: ar8216: add sanity check to ar8216_probe" (774da6c7a40320a320b28d71291c0e61fcf7bc8a) stated that PHY IDs should be checked at address 0-4. However, the PHY 4 was never check by the loop. This patch extends the check to be similar to the Atheors SDK. It tries all 4 ports and skips unconnected PHYs if necessary. If it cannot find any familiar PHYs, it will prevent the phy driver from initializing. This patch is necessary for the C-60. It doesn't have a PHY at port 3, so this caused the check in ar8xxx_is_possible to fail. As a result, the ethernet ports on the C-60 didn't work. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* mvsw61xx: enable SerDes on 6176 if requiredJonas Gorski2016-09-262-0/+59
| | | | | | | | If the cpu port is connected through SGMII we need to enable SerDes for it to work. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Acked-by: Felix Fietkau <nbd@nbd.name>
* mvsw61xx: reset phys on probe to enable switch ports on clearfog proJonas Gorski2016-09-262-1/+54
| | | | | | | | The clearfog u-boot does not initialize the switch at all, so we need to power up the phys ourselves. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Acked-by: Felix Fietkau <nbd@nbd.name>