| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
It adjusts b53 code to upstream changes from the commit 3c1bcc8614db
("net: ethernet: Convert phydev advertize and supported from u32 to link
mode").
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
| |
This allows users to specify a shorter mib poll interval so that the
swconfig leds could behave normal with current get_port_stats()
implementation.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This applies to ar8216 and ar8236. QCA's newer U-boot will enable
the switch mdio master for FE switches which makes phy inaccessible
from CPU mdio. (e.g. on TP-Link TL-WR941N v7 Chinese version which
uses QCA9558+AR8236.) For these devices PHY probing is broken and
mdio device probing is a must. We also need to disable switch mdio
master in driver for later PHY initialization.
Do a soft reset during hw_init so that mdio master can be disabled
and expose PHYs to CPU mdio for later PHY accessing.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
|
| |
ar8xxx_mib_capture will update mib counters for all ports. Current
code only update one port at a time and the data for other ports
are lost.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Partially reverts commit eff3549c5883a9abc5dbff00c084cabbcfdf4437.
AR7240 and AR9341 have buggy hardware switch LED trigger. The AR7240
one doesn't blink and the blinking of port0/port5 is reversed on
AR9341 if we swap PHY0 and PHY4. (Only blinking is reversed, which
means LED for PHY0 will lit when PHY0 is link up and will blink when
PHY4 has active link and vice versa.) On these two chips a software
swconfig LED trigger is required.
This commit adds swconfig port stats back but:
1. move checking of mib_t/rxb_id into ar8xxx_chip since we can't
distinguish ar7240sw and ar8216 using only chip id.
2. don't update mib counter in get_port_stat. This function is called
every 0.01s and this capturing procedure will take up a lot of CPU.
We already have a mib_work_func updating mib counters every 2s so
return the saved counter instead of fetching new data. The blinking
rate will be weird but it should solve the previously mentioned CPU
time problem.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This builtin switch is a bugless ar8216 with different mib counters
and gigabit cpu port.
Atheros uses the same device ID and it's impossible to distinguish
the standalone one and the builtin one. So we add support to mdio
device probe only.
This switch doesn't have buggy vlan tag so it's not needed to enable
atheros header. This commit changed ar8216_setup_port so that it can
be reused for this switch.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
| |
This option allows setting phy4 as a phy connected directly to CPU.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
| |
the added function also works for ar8216 and will be used in the
following ar7240 support.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Atheros FE switches have a builtin mdio master available for PHY
accessing and on ar724x/ar933x builtin switches this mdio master
is the only way of accessing PHYs.
After this patch if there is phy_read/phy_write method available
in ar8xxx_chip we register a separated mdio bus for accessing PHYs.
Still adds support for mdio device probing only since this isn't
needed for those switches registered using PHY probing.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ar8229 is the builtin switch in ar934x and later chips. There is
also a standalone version available and their registers/functions
are the same.
This commit added support for the builtin ar8229. The only thing
missing for standalone ar8229 should be phy modes. Since I don't
have a router using that, this commit doesn't add support for
other phy modes.
Only add its support for mdio-device probing method because the
current PHY probing can't return 1G speed when it's a FE switch.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
| |
currently only ar8327 and ar8236 are added since they are the only
two I could verify.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
|
| |
ar8xxx_id_chip is used to determine current ar8xxx_chip using switch
id and this isn't needed during mdiodev probing.
Move it out of ar8xxx_probe_switch so that we can skip it.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
| |
dev has been taken up by switch_dev so it's named pdev instead.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
| |
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
|
|
| |
for mdio-device probing we still need to read chip id but ar8xxx_chip
can be determined using drvdata. We can't distinguish the buggy
standalone ar8216 and the builtin ar8216 in ar724x/ar933x using chip
id.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The WRGG images exist in both big and little endian variants,
as can be seen from the image generator in
tools/firmware-utils/src/mkwrggimg.c, you either pass
the "-b" flag or not. The D-Link DIR-685 is using little
endian images so we need to support splitting these.
Detect endianness like this: if the kernel entity size
gets silly big (bigger than the flash memory) we are
probably using the wrong endianness.
Example: my kernel of 0x0067ff64 was switched around by
wrong endianness and detected as 0x64ff67a0 (the actual
size in swapped endianness + header 0xa0).
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a crash that occured on the
BT Home Hub v5a (lantiq/xrx200) which resulted
in the device bootlooping.
Reported-by: Ryan Mounce <ryan@mounce.com.au>
Tested-by: Vitalij Alshevsky <v_alshevsky@tut.by>
Fixes: ddece08bf456 ("kernel: owl-loader: fix sparse endian warnings")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
owl-loader.c:83:21: sparse: warning: incorrect type in assignment (different base types)
owl-loader.c:83:21: sparse: expected unsigned short [usertype] reg
owl-loader.c:83:21: sparse: got restricted __be16 const [usertype] reg
owl-loader.c:84:21: sparse: warning: incorrect type in assignment (different base types)
owl-loader.c:84:21: sparse: expected unsigned int [usertype] val
owl-loader.c:84:21: sparse: got restricted __be16 const [usertype] low_val
owl-loader.c:85:28: sparse: warning: restricted __be16 degrades to integer
Reported-by: kbuild test robot
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
|
|
|
|
|
| |
It allows specifying those parsers directly in the DT.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
|
|
| |
This fixed warnings caused by returning value in a void function
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
|
|
|
|
|
|
| |
It allows specifying default and Netgear parsers directly in the DT.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
|
|
|
|
|
| |
Compile & run tested on mvebu
Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the patches which were just copied in the previous commit
apply on top of kernel 4.19.
The patches in the backports-4.19 folder were checked if they are really
in kernel 4.19 based on the title and only removed if they were found in
the upstream kernel.
The following additional patches form the pending folder went into
upstream Linux 4.19:
pending-4.19/171-usb-dwc2-Fix-inefficient-copy-of-unaligned-buffers.patch
pending-4.19/190-2-5-e1000e-Fix-wrong-comment-related-to-link-detection.patch
pending-4.19/478-mtd-spi-nor-Add-support-for-XM25QH64A-and-XM25QH128A.patch
pending-4.19/479-mtd-spi-nor-add-eon-en25qh32.patch
pending-4.19/950-tty-serial-exar-generalize-rs485-setup.patch
pending-4.19/340-MIPS-mm-remove-mips_dma_mapping_error.patch
Bigger changes were introduced to the m25p80 spi nor driver, as far as I
saw it in the new code, it now has the functionality provided in this
patch:
pending-4.19/450-mtd-m25p80-allow-fallback-from-spi_flash_read-to-reg.patch
Part of this patch went upstream independent of OpenWrt:
hack-4.19/220-gc_sections.patch
This patch was reworked to match the changes done upstream.
The MIPS DMA API changed a lot, this patch was rewritten to match the
new DMA handling:
pending-4.19/341-MIPS-mm-remove-no-op-dma_map_ops-where-possible.patch
I did bigger manual changes to the following patches and I am not 100% sure if they are all correct:
pending-4.19/0931-w1-gpio-fix-problem-with-platfom-data-in-w1-gpio.patch
pending-4.19/411-mtd-partial_eraseblock_write.patch
pending-4.19/600-netfilter_conntrack_flush.patch
pending-4.19/611-netfilter_match_bypass_default_table.patch
pending-4.19/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
hack-4.19/211-host_tools_portability.patch
hack-4.19/221-module_exports.patch
hack-4.19/321-powerpc_crtsavres_prereq.patch
hack-4.19/902-debloat_proc.patch
This is based on patchset from Marko Ratkaj <marko.ratkaj@sartura.hr>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
|
|
|
|
|
|
|
|
| |
The b53 driver was added as a dsa driver into the mainline Linux kernel,
but we still use the swconfig based driver. The header file b53.h is
used by both drivers, but the swconfig one needs an extra member, add
this one in a patch to not overwrite the version shipped with the
mainline kernel.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The ledtrig-netdev was added to upstream Linux kernel 4.16, replace our
own version with the patch based on the upstream version.
This will remove the ledtrig-netdev support from kernel 3.18, because I
not want to spend time on backporting it to 3.18. This will make it
easier to use the upstream version with kernel 4.19, by just not
applying this patch.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
|
|
|
|
|
| |
All those parsers are used by 4.14 targets. They don't need that
backward compatibility code.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
| |
It allows specifying those parsers directly in the DT.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
| |
It allows specifying those parsers directly in the DT.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
| |
It allows selecting split-firmware parser directly by
specifying image-format in the device-tree.
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have IPQ8064 AP161 board which has three GMAC's
* RGMII x2
* SGMII x1.
The existing ar8327 driver does not have support for
three GMAC's connection, hence this change adds support
for the same. This has been verified on AP148 and AP161
board.
Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
|
|
|
|
|
|
|
|
| |
It allows specifying jimage parser directly in the DT.
Tested on LAVA LR-25G001
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
|
|
|
|
|
|
| |
Multicast ARL entries can have multiple destination ports. Get and dump
all destination ports of each entry, not just the lowest.
Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
|
|
|
|
|
|
|
|
|
| |
Driver crash when 'phydev->adjust_link' isn't provided.
This patch check if 'phydev->adjust_link' exist before
call the method.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
|
|
|
|
|
|
|
| |
This patch adds the feature to parse the existing cpu_port DT
property, which is used to specify which port is the cpu port
of the switch.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On the WNDAP620, the mdio and mdc lines are controlled by
the EMAC ethernet device. This results in a hen-vs-egg problem.
The rtl8367b driver is probed before the ethernet driver and
the mdio-bus is not available yet, which caused the rtl8367b
driver to fail.
This patch changes the rtl8366_smi_probe_of() function to
return -EPROBE_DEFER if the mdio-bus lookup failed and changes
rtl8366_smi_probe()'s signature to return the error code back to
the callee, so it can propagate back to the kernel. Which, will
retry the switch probe at a later time.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
|
|
|
|
| |
Fixes: a29c8d685be7 ("kernel: add DT binding support to the TP-LINK parser")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
| |
It allows triggering it directly by specifying format in the DT.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
| |
It allows specifying default and Netgear parsers directly in the DT.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the b53 MDIO switch driver registers the switch on
config-init and not on device probe. Because of this, the switch
gets added every time the associated interface comes up.
This commit fixes this behavior by registering the switch on device
probe.
Compile- and run-tested on OCEDO Koala.
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
|
|
|
|
| |
It allows specifying that parser directly in the DT.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current version of rtl8366-smi module only supports Realtek switch
managment via two gpio lines. This adds Realtek switch
management via mii_bus. Tested on a Tp-link Archer C2 v1 (Mediatek
SoC mt7620a based)
dts-file configuration should look like this:
rtl8367rb {
compatible = "realtek,rtl8367b";
realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
mii-bus = <&mdio0>;
};
ðernet {
status = "okay";
mtd-mac-address = <&rom 0xf100>;
pinctrl-names = "default";
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
port@5 {
status = "okay";
mediatek,fixed-link = <1000 1 1 1>;
phy-mode = "rgmii";
};
mdio0: mdio-bus {
status = "okay";
};
};
Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Franz Flasch <franz.flasch@gmx.at>
|
|
|
|
|
|
|
| |
Remove the compatible without vendor prefix. It is formal wrong and not
used in the tree.
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
|
|
|
| |
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
| |
Should reduce network related latency caused by accessing MIB counters
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|