aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files
Commit message (Collapse)AuthorAgeFilesLines
* 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: mtdsplit: split by WRG headerGeorge Hopkins2018-02-131-3/+18
| | | | | | | Support splitting WRG images, which can be found in older D-Link devices. Signed-off-by: George Hopkins <george-hopkins@null.net>
* kernel: mtdsplit: Add support for D-link JBOOTPawel Dembicki2018-02-113-0/+283
| | | | | | | | | The D-Link devices with JBOOT bootloader use their own kernel image header (stag + sch2 headers). This driver find jImage header and set rootfs start after kernel file. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* 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: make mtdsplit-tplink.c honor rootfs offsetThibaut VARÈNE2017-11-081-6/+6
| | | | | | | | | | | | | | | | | | | | The splitter ignored the rootfs offset from the header, probably because until c1e6e61 it was invalid. This patch fixes the splitter to use the now correct header data. Regarding target/linux/ar71xx/files/drivers/mtd/tplinkpart.c, this particular splitter "falls back" to the correct rootfs offset reading and as such it doesn't need to be updated, although it will report a kernel partition length that can be larger than the actual length as it assumes that partition fills the entire segment up to the rootfs partition. Tested-by: Mathias Kresin <dev@kresin.me> Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Tested-by: Daniel Engberg <daniel.engberg.lists@pyret.net> Tested-by: Henryk Heisig <hyniu@o2.pl> Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* kernel: owl-loader: fix compile warningHauke Mehrtens2017-10-011-1/+1
| | | | | | | | | | | | | check if the config option CONFIG_LANTIQ is defined. This fixes the following warning: CC [M] drivers/misc/owl-loader.o drivers/misc/owl-loader.c: In function 'ath9k_pci_fixup': drivers/misc/owl-loader.c:92:5: warning: "CONFIG_LANTIQ" is not defined [-Wundef] #if CONFIG_LANTIQ ^ Fixes: e9401a2335cc ("kernel: owl-loader for delayed Atheros ath9k fixup") 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-012-3/+3
| | | | | | | | | | | | | | 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-022-6/+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>
* linux/ledtrig-netdev: remove `unsigned < 0` checkAlexander Couzens2017-06-111-1/+1
| | | | | Found-by: Coverity Scan 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>
* kernel: update myloader for linux 4.9Sergey Ryazanov2017-06-071-1/+1
| | | | | | add backport patches for older kernels. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@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>
* ath9k: drop obsolete patchMathias Kresin2017-04-081-1/+0
| | | | | | | Now that the wireless LEDs are added via platform leds this patch isn't required any longer. Signed-off-by: Mathias Kresin <dev@kresin.me>
* 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>
* kernel: mtdsplit: Add support for Mikrotik NOR firmwareThibaut VARENE2017-02-223-0/+123
| | | | | | | | | | | | | | | | The RouterBOOT bootloader does not care where the kernel lives in the SPI flash, all that matters is that the kernel is wrapped in the custom yaffs container as generated by kernel2minor. This container has a fixed signature as follows: 00000000 00 00 00 01 00 00 00 01 ff ff 6b 65 72 6e 65 6c |..........kernel| This patch adds mtdsplit support for identifying that signature and triggering the search for the rootfs. rootfs is expected at EB boundary since we use wget mtd_find_rootfs_from(). We make no use of the yaffs file size field because it contains invalid data in the image generated by kernel2minor. Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
* 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: fix build error in mtdsplit driverKoen Vandeputte2017-02-071-1/+1
| | | | | | | Add missing parentheses. Fixes kernel build issue when using this driver. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* 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>
* kernel: update mtdsplit for linux 4.9Felix Fietkau2017-02-0310-15/+16
| | | | | | 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>
* ledtrig-netdev: don't cancel work on events for different interfacesSergey Sergeev2017-01-291-3/+3
| | | | | | | | | This fixes logic bug(in function netdev_trig_notify) introduced in 0b2991a8ed32b5d9ba0a7c3441a72e1c1a1c4fde commit. Events triggered by different interfaces were stopping work queue so it wasn't working for tx/rx mode. Signed-off-by: Sergey Sergeev <adron@yapic.net>
* 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: remove yaffs2 support, it is no longer neededFelix Fietkau2017-01-1642-16387/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* 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>
* kernel: make ledtrig-netdev use a work queue for updatesFelix Fietkau2017-01-161-16/+16
| | | | | | | | This fixes hangs in igb that happen if the update call interrupts an already existing dev_get_stats call. In that case the calling CPU deadlocks because it's trying to acquire the same spinlock recursively. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* mvsw61xx: add support for MV88E6352Imre Kaloz2017-01-132-0/+7
| | | | | | MV88E6352 is used on Linksys WRT3200ACM Signed-off-by: Imre Kaloz <kaloz@openwrt.org>