Re: [OpenWrt-Devel] AR8334 switch support

2015-04-24 Thread Heiner Kallweit
Am 23.04.2015 um 14:43 schrieb Christian Mehlis: > Am 22.04.2015 um 19:01 schrieb Heiner Kallweit: >> Can you provide a complete dmesg output? > > Bootlog is available here: > http://wiki.openwrt.org/toh/compex/wpj344#openwrt_upstream_bootlog > > Dmesg is attached. &

Re: [OpenWrt-Devel] AR8334 switch support

2015-04-27 Thread Heiner Kallweit
dev_info(&priv->phy->dev, "PHY %d not available\n", i); } else { dev_info(&priv->phy->dev, "PHY %d available, BMSR = 0x%x\n", i, bmsr); } On Mon, Apr 27, 2015 at 2:20 PM, Christian Mehlis wrote: > Am 24.04.2015 um 20:05 schrieb

Re: [OpenWrt-Devel] AR8334 switch support

2015-04-27 Thread Heiner Kallweit
Am 27.04.2015 um 17:47 schrieb Christian Mehlis: > Am 27.04.2015 um 15:06 schrieb Heiner Kallweit: >> Could you please provide te dmesg output of this patch version? > > [0.85] switch0: Atheros AR833X rev. 2 switch registered on > ag71xx-mdio.0 > [0.86]

Re: [OpenWrt-Devel] AR8334 switch support

2015-04-28 Thread Heiner Kallweit
Am 28.04.2015 um 14:15 schrieb Christian Mehlis: > Am 27.04.2015 um 20:56 schrieb Heiner Kallweit: >> The only other difference I found is the initial setting of LED_CTRL3 >> register. >> Could you please test the following patch (first remove the initial patch >> a

Re: [OpenWrt-Devel] AR8334 switch support

2015-04-28 Thread Heiner Kallweit
Am 28.04.2015 um 20:37 schrieb Heiner Kallweit: > Am 28.04.2015 um 14:15 schrieb Christian Mehlis: >> Am 27.04.2015 um 20:56 schrieb Heiner Kallweit: >>> The only other difference I found is the initial setting of LED_CTRL3 >>> register. >>> Could you please te

Re: [OpenWrt-Devel] AR8334 switch support

2015-04-29 Thread Heiner Kallweit
On Wed, Apr 29, 2015 at 11:26 AM, Christian Mehlis wrote: > On plug/unplug I get those events: > > [ 25.12] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is up > [ 37.13] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is down > > but the linux network stack is keeping th

Re: [OpenWrt-Devel] AR8334 switch support

2015-04-29 Thread Heiner Kallweit
I still have to adjust it to make handling of the new platform parameter more consistent with general handling of platform data. Most likely I can submit the final patch by today. Rgds, Heiner On Wed, Apr 29, 2015 at 4:16 PM, Christian Mehlis wrote: > Am 28.04.2015 um 22:10 schrieb Hei

[OpenWrt-Devel] [PATCH] ar8216: Fix problem with AR8337 MAC swap handling

2015-04-29 Thread Heiner Kallweit
eded changes to the device initialization code of affected devices. Hopefully I didn't miss any .. Signed-off-by: Heiner Kallweit --- target/linux/ar71xx/files/arch/mips/ath79/mach-esr1750.c | 1 + target/linux/ar71xx/files/arch/mips/ath79/mach-f9k1115v2.c | 1 + target/linux/ar71xx/files/

[OpenWrt-Devel] Device tree issues with TL-WDR4900 (mpc85xx) and kernel 4.0.1

2015-05-04 Thread Heiner Kallweit
I tried to make the TL-WDR4900 work under kernel 4.0. Adjusting the platform-specific patches was quickly done and the system boots. However I get the following error messages. [2.959975] /leds/system: could not get #gpio-cells for /soc@ffe0/gpio-controller@f000 [2.968276] leds-gpio:

Re: [OpenWrt-Devel] Device tree issues with TL-WDR4900 (mpc85xx) and kernel 4.0.1

2015-05-05 Thread Heiner Kallweit
Am 05.05.2015 um 08:29 schrieb Wojciech Dubowik: > On 04/05/15 22:45, Heiner Kallweit wrote: >> I tried to make the TL-WDR4900 work under kernel 4.0. >> Adjusting the platform-specific patches was quickly done and the system >> boots. >> However I get t

Re: [OpenWrt-Devel] Device tree issues with TL-WDR4900 (mpc85xx) and kernel 4.0.1

2015-05-06 Thread Heiner Kallweit
Am 05.05.2015 um 22:17 schrieb Heiner Kallweit: > Am 05.05.2015 um 08:29 schrieb Wojciech Dubowik: >> On 04/05/15 22:45, Heiner Kallweit wrote: >>> I tried to make the TL-WDR4900 work under kernel 4.0. >>> Adjusting the platform-specific patches was quickly don

Re: [OpenWrt-Devel] Device tree issues with TL-WDR4900 (mpc85xx) and kernel 4.0.1

2015-05-07 Thread Heiner Kallweit
On Thu, May 7, 2015 at 8:01 AM, Wojciech Dubowik wrote: > On 06/05/15 21:23, Heiner Kallweit wrote: >> >> Am 05.05.2015 um 22:17 schrieb Heiner Kallweit: >>> >>> Am 05.05.2015 um 08:29 schrieb Wojciech Dubowik: >>>> >>>> On 04/05/15 22:45,

[OpenWrt-Devel] [PATCH] mpc85xx: TL-WDR4900: Fix port 6 being shown as up (10MBit/half) in LUCI/swconfig

2015-05-12 Thread Heiner Kallweit
initialize port 6 with the aneg bit enabled. This causes ar8216_read_port_link to evaluate the link status bit which is always zero for port 6 as no PHY is connected to this port. And it doesn't hurt as port 6 isn't connected to anything on TL-WDR4900. Signed-off-by: Heiner Kallweit --- ta

[OpenWrt-Devel] procd: "failed to symlink /tmp -> /var" - creation of this symlink in procd needed?

2015-05-13 Thread Heiner Kallweit
Recently the system log started to report a warning "failed to symlink /tmp -> /var". This symlink is part of the base-files package and later procd tries to do the same in early.c. As the symlink is already there this fails and throws the warning. Until few weeks ago this failed silently, on Mar

Re: [OpenWrt-Devel] Patch file for QCA8334 eth switch chip

2015-05-18 Thread Heiner Kallweit
Am 19.05.2015 um 05:45 schrieb nam228: > Hi all, > > I have a board with a qca8334 eth switch chip.The chip is found by the ar8216 > phy as an ar8337. > > My board can not ping unless I remove the AR8337_PAD_MAC06_EXCHANGE_EN with a > path file. > > The patch file is: > > --- a/drivers/net/ph

Re: [OpenWrt-Devel] [PATCH] mpc85xx: TL-WDR4900: Fix port 6 being shown as up (10MBit/half) in LUCI/swconfig

2015-05-22 Thread Heiner Kallweit
Am 22.05.2015 um 15:52 schrieb John Crispin: > > > On 12/05/2015 21:24, Heiner Kallweit wrote: >> Currently port 6 is shown as up 10MBit/half in LUCI and swconfig. >> Reason is that all bits in the port 6 config are zero. >> This means that also the aneg flag

[OpenWrt-Devel] [PATCH 0/5] AR8216: New functionality and improvements

2015-07-25 Thread Heiner Kallweit
Heiner Kallweit (5): don't display MIB counters if all are empty complement MIB counters with info in GiB / MiB / KiB remove redundant port number in MIB header line make ARL age time configurable improve mmd register access .../linux/generic/files/drivers/net/phy/ar8216.c

[OpenWrt-Devel] [PATCH 1/5] AR8216: don't display MIB counters if all are empty

2015-07-25 Thread Heiner Kallweit
For unused switch ports all MIB values are zero. Displaying ~40 empty MIB counters is just confusing and makes it hard to read the output of swconfig dev show. Therefore, if all MIB counters for a port are zero, just display an info that the MIB counters are empty. Signed-off-by: Heiner Kallweit

[OpenWrt-Devel] [PATCH 2/5] AR8216: complement MIB counters with info in GiB / MiB / KiB

2015-07-25 Thread Heiner Kallweit
The decimal values especially for TxByte and RxGoodByte are hard to read once bigger amounts of data have been transferred. Therefore complement the decimal values with info in GiB / MiB / KiB. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 45

[OpenWrt-Devel] [PATCH 4/5] AR8216: make ARL age time configurable

2015-07-25 Thread Heiner Kallweit
have expected the switch to invalidate old entries if it detects the same MAC on another port. But that's not the case. Therefore make the TTL for ARL entries configurable. The effective TTL will always be a multiple of 7 seconds. Signed-off-by: Heiner Kallweit --- .../linux/generic/

[OpenWrt-Devel] [PATCH 3/5] AR8216: remove redundant port number in MIB header line

2015-07-25 Thread Heiner Kallweit
The line before includes the port number anyway so there's no need to duplicate the port number in the MIB info header. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/

[OpenWrt-Devel] [PATCH 5/5] AR8216: improve mmd register access

2015-07-25 Thread Heiner Kallweit
Combine all bus operations for one MMD access in one function. Protecting all these bus operations with one lock also helps to avoid potential issues due to bus operations intercepting the register and data write. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy

[OpenWrt-Devel] [PATCH] ar71xx: modernize fast SPI flash read

2016-04-22 Thread Heiner Kallweit
he 4.4 version. The change was successfully tested on a TP-Link TL-WDR3600. Signed-off-by: Heiner Kallweit --- .../460-spi-add-generic-flash-read.patch | 159 ++ .../460-spi-bitbang-export-spi_bitbang_bufs.patch | 28 .../patches-4.1/461-m25p80-add-flash

Re: [OpenWrt-Devel] [PATCH] ar71xx: modernize fast SPI flash read

2016-04-23 Thread Heiner Kallweit
Am 23.04.2016 um 00:49 schrieb Heiner Kallweit: > OpenWRT has own support for the memory-mapped fast SPI flash read on ath79. > With mainline kernel 4.6/4.7 more elegant generic support for this feature > was added upstream consisting of these two commits: > > 556351f14e74

[OpenWrt-Devel] [PATCH v2] ar71xx: modernize fast SPI flash read

2016-04-23 Thread Heiner Kallweit
he 4.4 version. The change was successfully tested on a TP-Link TL-WDR3600. Signed-off-by: Heiner Kallweit --- v2: - make change compatible with ath79_register_m25p80_multi(): >1 flash chip but one can be mmap-accessed only --- .../460-spi-add-generic-flash-read.patch | 159

[OpenWrt-Devel] Issue with deferred GPIO probing on ar71xx/TL-WDR3600 under kernel 4.4

2016-04-24 Thread Heiner Kallweit
Under 4.4 I get the following errors which do not occur under 4.1: [0.120197] MIPS: machine is TP-LINK TL-WDR3600/4300/4310 [0.126234] unable to request GPIO18 for external LNA0 [0.132811] unable to request GPIO19 for external LNA1 Reason is that gpio_request_one() in the following ca

Re: [OpenWrt-Devel] Issue with deferred GPIO probing on ar71xx/TL-WDR3600 under kernel 4.4

2016-04-24 Thread Heiner Kallweit
Am 24.04.2016 um 16:53 schrieb Heiner Kallweit: > Under 4.4 I get the following errors which do not occur under 4.1: > > [0.120197] MIPS: machine is TP-LINK TL-WDR3600/4300/4310 > [0.126234] unable to request GPIO18 for external LNA0 > [0.132811] unable to request GPIO

[OpenWrt-Devel] [PATCH] ar71xx: simplify patch 613 and add missing error handling

2016-04-24 Thread Heiner Kallweit
Dynamic allocation of label can be simplified. Also add error handling to deal with failed memory allocation. Signed-off-by: Heiner Kallweit --- .../613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch | 6 +++--- .../613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch

Re: [OpenWrt-Devel] [PATCH v2] ar71xx: modernize fast SPI flash read

2016-04-26 Thread Heiner Kallweit
Am 23.04.2016 um 22:15 schrieb Heiner Kallweit: > OpenWRT has own support for the memory-mapped fast SPI flash read on ath79. > With mainline kernel 4.6/4.7 more elegant generic support for this feature > was added upstream consisting of these two commits: > > 556351f14e74

[OpenWrt-Devel] [PATCH v3] ar71xx: modernize fast SPI flash read

2016-04-27 Thread Heiner Kallweit
generic patch 082. The change was successfully tested on a TP-Link TL-WDR3600. Signed-off-by: Heiner Kallweit --- v2: - make change compatible with ath79_register_m25p80_multi(): >1 flash chip but one can be mmap-accessed only v3: - adjusted commit message - removed content of new generic pa

Re: [OpenWrt-Devel] [1/4, RFCv2] net: phy: realtek: Support RTL8366RB variant

2018-08-20 Thread Heiner Kallweit
Am 28.05.2018 um 19:47 schrieb Linus Walleij: > The RTL8366RB is an ASIC with five internal PHYs for > LAN0..LAN3 and WAN. The PHYs are spawn off the main > device so they can be handled in a distributed manner > by the Realtek PHY driver. All that is really needed > is the power save feature enabl

Re: [OpenWrt-Devel] [1/4, RFCv2] net: phy: realtek: Support RTL8366RB variant

2018-08-20 Thread Heiner Kallweit
Am 29.05.2018 um 22:01 schrieb Linus Walleij: > On Tue, May 29, 2018 at 8:51 PM, Heiner Kallweit wrote: > >>> +#define RTL8366RB_POWER_SAVE 0x21 > >> Typically PHY register addresses are 5 bits wide, is 0x21 correct >> and I miss something? > > If it is cor

[OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-10-27 Thread Heiner Kallweit
With two different TPLINK routers (both with a AR8327N switch) I faced the issue that with kernel 3.14 certain switch ports used 10MBit/half only. Under kernel 3.10 everything was fine and the same ports used 1000MBit/full. As the ar8216 driver is the same I had a look at the common phy code in

[OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-10-27 Thread Heiner Kallweit
With two different TPLINK routers (both with a AR8327N switch) I faced the issue that with kernel 3.14 certain switch ports used 10MBit/half only. Under kernel 3.10 everything was fine and the same ports used 1000MBit/full. As the ar8216 driver is the same I had a look at the common phy code in

Re: [OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-10-28 Thread Heiner Kallweit
sets the switch anyway later. Doing the detailed setup in ar8xxx_phy_config_init seems to be more suited however there might be good reason why it's handled the way it is. Rgds, Heiner Am 27.10.2014 um 22:00 schrieb Heiner Kallweit: > With two different TPLINK routers (both with a AR83

Re: [OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-10-28 Thread Heiner Kallweit
o move back the start to config_init. Rgds, Heiner Am 28.10.2014 um 19:41 schrieb Heiner Kallweit: > After a little more thinking about it and looking at the code I basically > have two questions: > > 1. > Is it actually needed to exclude certain phy's in ar8xxx_phy_config_aneg

Re: [OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-10-29 Thread Heiner Kallweit
Am 30.10.2014 um 03:36 schrieb Florian Fainelli: > Le 28/10/2014 11:46, Heiner Kallweit a écrit : >> After a little more thinking about it and looking at the code I basically >> have two questions: >> >> 1. >> Is it actually needed to exclude certain phy's i

Re: [OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-10-30 Thread Heiner Kallweit
Am 30.10.2014 um 07:22 schrieb Heiner Kallweit: > Am 30.10.2014 um 03:36 schrieb Florian Fainelli: >> Le 28/10/2014 11:46, Heiner Kallweit a écrit : >>> After a little more thinking about it and looking at the code I basically >>> have two questions: >>>

[OpenWrt-Devel] [PATCH 1/5] ar8216: introduce global constant for number of PHYs

2014-10-31 Thread Heiner Kallweit
All supported switches have 5 PHYs. Currently partially 5 is hardcoded and partially switch-specific constants exist. Replace them with a global constant. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 8 +--- target/linux/generic/files/drivers/net

[OpenWrt-Devel] [PATCH 3/5] ar8216: introduce fixup_phys callback in ar8xxx_chip

2014-10-31 Thread Heiner Kallweit
Move phy fixup code from the chip-specific hw_init functions into a fixup_phys callback. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/target/linux/generic/files/drivers

[OpenWrt-Devel] [PATCH 2/5] ar8216: after a switch reset poll until BCMR_RESET is cleared

2014-10-31 Thread Heiner Kallweit
Currently there is a fixed 1000ms wait time after the switch was reset. Most if not all switches need much less time to perform a reset. Therefore replace the fixed wait time with polling for BMCR_RESET to be cleared. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy

[OpenWrt-Devel] [PATCH 5/5] ar8216: use genphy_config_aneg also for PHY 0

2014-10-31 Thread Heiner Kallweit
calling genphy_config_aneg for PHY 0 too as genphy_config_aneg sets BMCR_ANENABLE if it's not yet set. Fixes: ticket 17800 Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/target/

[OpenWrt-Devel] [PATCH 4/5] ar8216: factor out PHY init code into a generic function

2014-10-31 Thread Heiner Kallweit
PHY init code in the switch-specific hw_init functions is mainly identical. Factor it out into a generic ar8xxx_phy_init function. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 69 +- 1 file changed, 28 insertions(+), 41 deletions

[OpenWrt-Devel] ar8216 patch series

2014-10-31 Thread Heiner Kallweit
Patch series adds more abstraction to the driver, adds smaller improvements and fixes an issue with kernels >= 3.14. Ticket 17800: With kernel 3.14 sometimes ports operate at 10/half only This patch series works for me on: TP-LINK TL-WDR4300 ( ar71xx + AR8327v2) TP-LINK TL-WDR4900 (mpc85xx + AR832

[OpenWrt-Devel] [PATCH v2 4/5] ar8216: factor out PHY init code into a generic function

2014-11-01 Thread Heiner Kallweit
PHY init code in the switch-specific hw_init functions is mainly identical. Factor it out into a generic ar8xxx_phy_init function. Signed-off-by: Heiner Kallweit --- v2: use ar8xxx_has_gige for determining chip GBit capability instead of submitting this information as function argument

[OpenWrt-Devel] [PATCH v2 5/5] ar8216: use genphy_config_aneg also for PHY 0

2014-11-01 Thread Heiner Kallweit
calling genphy_config_aneg for PHY 0 too as genphy_config_aneg sets BMCR_ANENABLE if it's not yet set. Fixes: ticket 17800 Signed-off-by: Heiner Kallweit --- v2: rebased --- target/linux/generic/files/drivers/net/phy/ar8216.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-)

Re: [OpenWrt-Devel] ar8216 patch series

2014-11-08 Thread Heiner Kallweit
Am 08.11.2014 um 13:49 schrieb Dirk Neukirchen: > On 31.10.2014 21:46, Heiner Kallweit wrote: >> Patch series adds more abstraction to the driver, adds smaller improvements >> and fixes an issue with kernels >= 3.14. >> Ticket 17800: With kernel 3.14 sometimes ports

Re: [OpenWrt-Devel] ar8216 patch series

2014-11-08 Thread Heiner Kallweit
Am 08.11.2014 um 13:49 schrieb Dirk Neukirchen: > On 31.10.2014 21:46, Heiner Kallweit wrote: >> Patch series adds more abstraction to the driver, adds smaller improvements >> and fixes an issue with kernels >= 3.14. >> Ticket 17800: With kernel 3.14 sometimes ports

[OpenWrt-Devel] [PATCH] ar8216: fix "unused variable" compiler warning

2014-11-13 Thread Heiner Kallweit
Most likely a copy & paste error when deriving ar8327_sw_set_ports from ar8xxx_sw_set_ports. Remove unused variable. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/gen

[OpenWrt-Devel] [PATCH] ar8216: fix issue with ANEG being disabled with kernel >=3.14

2014-11-13 Thread Heiner Kallweit
ritten by a soft_reset callback provided by the phy driver. ar8216 driver takes care of resetting the switch properly for all supported switch types anyway, therefore provide a dummy soft_reset callback to disable the unneeded additional phy reset. Signed-off-by: Heiner Kallweit --- .../linux/ge

Re: [OpenWrt-Devel] [PATCH] ar8216: fix issue with ANEG being disabled with kernel >=3.14

2014-11-13 Thread Heiner Kallweit
Am 13.11.2014 um 22:18 schrieb Felix Fietkau: > On 2014-11-13 22:00, Heiner Kallweit wrote: >> See also ticket 17800 >> With kernel>=3.14 autonegotiation is disabled at least for AR8327 based >> switches. Reason is that with 3.14 an additional phy reset was >> introd

Re: [OpenWrt-Devel] [PATCH] ar8216: fix issue with ANEG being disabled with kernel >=3.14

2014-11-14 Thread Heiner Kallweit
Am 13.11.2014 um 23:02 schrieb Heiner Kallweit: > Am 13.11.2014 um 22:18 schrieb Felix Fietkau: >> On 2014-11-13 22:00, Heiner Kallweit wrote: >>> See also ticket 17800 >>> With kernel>=3.14 autonegotiation is disabled at least for AR8327 based >>> switches.

[OpenWrt-Devel] [PATCH] Add 3.14 kernel support for mpc85xx platform

2014-11-18 Thread Heiner Kallweit
with ethernet port autoneg being disabled due to changes in kernel phy handling Signed-off-by: Heiner Kallweit --- target/linux/mpc85xx/config-3.14 | 294 ++ ...erpc-85xx-add-gpio-keys-to-of-match-table.patch | 10 + .../patches-3.14/100-fix_mpc8568e_mds.

Re: [OpenWrt-Devel] [PATCH 5/5] ar8216: use genphy_config_aneg also for PHY 0

2014-11-19 Thread Heiner Kallweit
Am 19.11.2014 um 21:19 schrieb Felix Fietkau: > On 2014-10-31 21:38, Heiner Kallweit wrote: >> Kernel 3.14 introduced a switch reset in phy_init_hw in drivers/net/phy >> causing BMCR_ANENABLE to get cleared. >> >> Due to the fact that ar8xxx_phy_config_ane

[OpenWrt-Devel] [PATCH v2 3/5] ar8216: introduce fixup_phys callback in ar8xxx_chip

2014-11-19 Thread Heiner Kallweit
Move phy fixup code from the chip-specific hw_init functions into a fixup_phys callback. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/linux/generic/files/drivers/net/phy

[OpenWrt-Devel] [PATCH v3 4/5] ar8216: factor out PHY init code into a generic function

2014-11-19 Thread Heiner Kallweit
PHY init code in the switch-specific hw_init functions is mainly identical. Factor it out into a generic ar8xxx_phy_init function. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 66 -- 1 file changed, 25 insertions(+), 41 deletions

[OpenWrt-Devel] [PATCH v3 3/4] ar8216: factor out PHY init and fixup code into a generic function

2014-11-19 Thread Heiner Kallweit
PHY init code in the switch-specific hw_init functions is mainly identical. Factor it out into a generic ar8xxx_phy_init function. Rebase on current trunk. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 29 -- 1 file changed, 10

Re: [OpenWrt-Devel] [PATCH 5/5] ar8216: use genphy_config_aneg also for PHY 0

2014-11-19 Thread Heiner Kallweit
Am 19.11.2014 um 22:39 schrieb Felix Fietkau: > On 2014-11-19 22:17, Heiner Kallweit wrote: >> Am 19.11.2014 um 21:19 schrieb Felix Fietkau: >>> On 2014-10-31 21:38, Heiner Kallweit wrote: >>>> Kernel 3.14 introduced a switch reset in phy_init_hw in drivers/net/phy

[OpenWrt-Devel] [PATCH] ar8216: Use generic hw_init from ar8236 for ar8216 too

2014-11-19 Thread Heiner Kallweit
We should make sure that also for ar8216 hw gets initialized. For ar8216 hw_init is a dummy currently. The hw_init used for ar8236 should be generic enough to be usable with ar8216 too. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 20

[OpenWrt-Devel] [PATCH] mpc85xx: fix missing dts target for kernel 3.14

2014-11-20 Thread Heiner Kallweit
With kernel 3.14 dts target p1010rdb was renamed to p1010rdb-pa. To maintain compatibility define p1010rdb-pa as new standard and copy p1010rdb.dts to p1010rdb-pa.dts under 3.10. Signed-off-by: Heiner Kallweit --- target/linux/mpc85xx/image/Makefile| 2 +- .../mpc85xx/patches

[OpenWrt-Devel] [PATCH 4/4] ar8216: Fix issue with autoneg being disabled under 3.14, revert 43332

2014-11-20 Thread Heiner Kallweit
Patch reverts 43332 which seems to cause issues with VLAN functionality. Add a specific check to check whether ANEG is still enabled and re-enable it if necessary. Disable generic phy soft reset for kernel >=3.16. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8

Re: [OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-11-24 Thread Heiner Kallweit
uot; > <mailto:blo...@openwrt.org>> wrote: > >> > > >> > > >> > > >> > On 19/11/2014 14:44, Weedy wrote: > >> > > > >> > > On Oct 30, 2014 5:08 PM, "Heiner Kallweit" > <mailto:hkallwe...@gmai

[OpenWrt-Devel] Patch to fix issue with renamed dts target for mpc85xx/3.14

2014-11-24 Thread Heiner Kallweit
On Nov 20th I submitted a patch to fix an issue with a dts target which was renamed under 3.14: mpc85xx: fix missing dts target for kernel 3.14 Could you please apply it? It fixes the reopened issue 18020. Heiner ___ openwrt-devel mailing list openwrt-de

[OpenWrt-Devel] Changeset 43410: phydriver soft_reset availability under 3.14

2014-11-27 Thread Heiner Kallweit
Changeset 43410 modifies the ar8216 driver to use the phy_driver soft_reset callback also under 3.14. As far as I can see this callback is not available under 3.14, even in the most recent 3.14.25. Am I missing something? Heiner ___ openwrt-devel maili

Re: [OpenWrt-Devel] Changeset 43410: phydriver soft_reset availability under 3.14

2014-11-27 Thread Heiner Kallweit
Am 27.11.2014 um 19:50 schrieb Heiner Kallweit: > Changeset 43410 modifies the ar8216 driver to use the phy_driver soft_reset > callback also under 3.14. > As far as I can see this callback is not available under 3.14, even in the > most recent 3.14.25. > Am I missing somethi

[OpenWrt-Devel] ar8216: question regarding ar8xxx_phy_config_aneg

2014-11-28 Thread Heiner Kallweit
In my tests with AR8327 this callback was never called with an addr != 0. Seems logical to me as it's called for the PHY attached to the net device only. In most cases this is addr 0, just for AR8316 with port4_phy being set this could be 4. This leads to two questions: 1. The current version of

[OpenWrt-Devel] ar8216: phy_init and bug report 18415

2014-11-28 Thread Heiner Kallweit
This bug report relates to a device using the AR8216 switch chip and a trunk version where the additional phy reset in 3.14 was still enabled. Seems like there was an issue with autoneg. This is not fully clear to me as after the first phy reset in the kernel phy code we do the hw_init in the driv

Re: [OpenWrt-Devel] ar8216: question regarding ar8xxx_phy_config_aneg

2014-11-28 Thread Heiner Kallweit
On Fri, Nov 28, 2014 at 12:15 PM, Jonas Gorski wrote: > On Fri, Nov 28, 2014 at 11:06 AM, Heiner Kallweit > wrote: > > In my tests with AR8327 this callback was never called with an addr != 0. > > Seems logical to me as it's called for the PHY attached to the net devi

[OpenWrt-Devel] [PATCH 0/6] ar8216: further cleanups

2014-11-28 Thread Heiner Kallweit
This patch series factors out more chip-specific differences to ar8xxx_chip. 1/6 factor out info whether switch should be configured at probe stage to ar8xxx_chip 2/6 factor out mib_func to ar8xxx_chip 3/6 factor out set_mirror_regs to ar8xxx_chip 4/6 factor out chip-specific data structures from

[OpenWrt-Devel] [PATCH 1/6] ar8216: factor out info whether switch should be configured at probe stage to ar8xxx_chip

2014-11-28 Thread Heiner Kallweit
Factor out info whether switch should be configured at probe stage to ar8xxx_chip. Remove related chip_is_... checks. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/linux

[OpenWrt-Devel] [PATCH 4/6] ar8216: factor out chip-specific data structures from ar8xxx_priv

2014-11-28 Thread Heiner Kallweit
Factor out chip-specific data structures from ar8xxx_priv. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 31 +++--- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b

[OpenWrt-Devel] [PATCH 3/6] ar8216: factor out set_mirror_regs to ar8xxx_chip

2014-11-28 Thread Heiner Kallweit
Factor out set_mirror_regs to ar8xxx_chip. Remove related chip_is_... checks. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 28 ++ 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/target/linux/generic/files/drivers/net

[OpenWrt-Devel] [PATCH 5/6] ar8216: factor out mii_lo_first to ar8xxx_chip

2014-11-28 Thread Heiner Kallweit
Factor out mii_lo_first to ar8xxx_chip. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers

[OpenWrt-Devel] [PATCH 2/6] ar8216: factor out mib_func to ar8xxx_chip

2014-11-28 Thread Heiner Kallweit
Factor out mib_func to ar8xxx_chip. Remove related chip_is_... checks. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b

[OpenWrt-Devel] [PATCH 6/6] ar8216: factor out reg_port_stats_base parameters to ar8xxx_chip

2014-11-28 Thread Heiner Kallweit
Factor out reg_port_stats_base parameters to ar8xxx_chip. Remove related chip_is_... checks. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 27 -- .../linux/generic/files/drivers/net/phy/ar8216.h | 6 - 2 files changed, 20

[OpenWrt-Devel] [PATCH 0/3] ag71xx: minor improvements patch series

2014-12-04 Thread Heiner Kallweit
Patch 1/3 ag71xx: replace fixed PHY reset wait time in ar7240sw_setup Patch 2/3 ag71xx: replace delay with sleep calls Patch 3/3 ar71xx: dev-eth: replace further mdelay calls Successfully tested on a TP-LINK TL-WDR4300. ___ openwrt-devel mailing list o

[OpenWrt-Devel] [PATCH 2/3] ag71xx: replace delay with sleep calls

2014-12-04 Thread Heiner Kallweit
msleep." Signed-off-by: Heiner Kallweit --- .../files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c | 4 ++-- .../files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/linux/ar71xx/f

[OpenWrt-Devel] [PATCH 1/3] ag71xx: replace fixed PHY reset wait time in ar7240sw_setup

2014-12-04 Thread Heiner Kallweit
Replace the fixed wait time of 1s with polling for BMCR_RESET to be cleared on all PHYs. Signed-off-by: Heiner Kallweit --- .../net/ethernet/atheros/ag71xx/ag71xx_ar7240.c| 29 +- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/files

[OpenWrt-Devel] [PATCH 3/3] ar71xx: dev-eth: replace mdelay calls

2014-12-04 Thread Heiner Kallweit
Similar to patch 2. Replace further mdelay calls. Signed-off-by: Heiner Kallweit --- target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch

Re: [OpenWrt-Devel] ar934x+ar8327v4

2014-12-04 Thread Heiner Kallweit
Am 05.12.2014 um 06:13 schrieb David Hutchison: > Hi, > > I ran into an issue with the Mikrotik Routerboard 951G's switch chip. > The new batch that we received use an updated ar8327 switch chip. The > switch chip would not function properly so I decided to load trunk and > utilize your patches. >

Re: [OpenWrt-Devel] [PATCH 1/3] ag71xx: replace fixed PHY reset wait time in ar7240sw_setup

2014-12-05 Thread Heiner Kallweit
On Fri, Dec 5, 2014 at 9:57 AM, John Crispin wrote: > Hi, > > just added this to my local tree, images are building, the ar71xx > network stuff scares me and i want to test this for a few boards > before pushing. i might not manage to do so today Sure, take your time. A similar phy poll change was

Re: [OpenWrt-Devel] ar934x+ar8327v4

2014-12-05 Thread Heiner Kallweit
On Fri, Dec 5, 2014 at 10:21 AM, Chris Green wrote: > This sounds very like the bug #18401 I have raised for my > RB2011UiAS-2HnD-IN. > > I have exactly the same problem of everything appearing to be detected > OK and interfaces OK but eth0 simply doesn't do anything. Ticket 18401 relates to BB 14

[OpenWrt-Devel] Documentation of AR71xx per-module reset timings?

2014-12-06 Thread Heiner Kallweit
On AR71xx the reset of each module uses such a sequence: ath79_device_reset_set(module_bit); ath79_device_reset_clear(module_bit); Seems like the reset bits are not self-clearing and polling for the reset to be finished is not possible. Is there any Atheros documentation of the per-module rese

Re: [OpenWrt-Devel] Did you do any testing on 3.18?

2014-12-09 Thread Heiner Kallweit
pi-preallocate-local-buffer.patch seems to fix a similar >> issue. A -12 error is described in the header of that patch. >> >> On Tue, Dec 2, 2014 at 2:16 PM, Heiner Kallweit wrote: >>> No, so far I'm using 3.14.25. >>> -12 is the errno value for ENOMEM.

[OpenWrt-Devel] [PATCH 0/5] ar8216: patch series with more smaller improvements

2014-12-15 Thread Heiner Kallweit
1/5 Remove unused function parameter in ar8327_led_register 2/5 Factor out chip-specific parameters from ar8xxx_probe_switch 3/5 Create helpers mii_read32 / mii_write32 for 32 bit MII ops. 4/5 Remove read/write/rmw member functions from ar8xxx_priv 5/5 Inline function ar8xxx_create_mii

[OpenWrt-Devel] [PATCH 1/5] ar8216: remove unused function parameter in ar8327_led_register

2014-12-15 Thread Heiner Kallweit
Remove unused function parameter in ar8327_led_register. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic

[OpenWrt-Devel] [PATCH 2/5] ar8216: Factor out chip-specific parameters from ar8xxx_probe_switch

2014-12-15 Thread Heiner Kallweit
Factor out chip-specific parameters from ar8xxx_probe_switch. Move the ar8xxx_chip definitions after the swops definitions. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 268 - 1 file changed, 151 insertions(+), 117 deletions

[OpenWrt-Devel] [PATCH 3/5] ar8216: Create helpers mii_read32 / mii_write32 for 32 bit MII ops

2014-12-15 Thread Heiner Kallweit
Create helpers mii_read32 / mii_write32 for 32 bit MII ops. Rename r3 variable to page in ar8xxx_mii_write to make it consistent with the other ar8xxx_mii_ functions. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 74 -- 1 file

[OpenWrt-Devel] [PATCH 4/5] ar8216: Remove read/write/rmw member functions from ar8xxx_priv

2014-12-15 Thread Heiner Kallweit
the ar8xxx_mii_.. functions to ar8xxx_.. and use them directly. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 116 + 1 file changed, 51 insertions(+), 65 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/tar

[OpenWrt-Devel] [PATCH 5/5] ar8216: Inline function ar8xxx_create_mii

2014-12-15 Thread Heiner Kallweit
Inline function ar8xxx_create_mii. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files

Re: [OpenWrt-Devel] ar8216: phy_init and bug report 18415

2014-12-17 Thread Heiner Kallweit
Am 17.12.2014 um 08:47 schrieb Weedy: > > On Nov 28, 2014 3:24 PM, "Weedy" <mailto:weedy2...@gmail.com>> wrote: >> >> >> On Nov 28, 2014 5:23 AM, "Heiner Kallweit" > <mailto:hkallwe...@gmail.com>> wrote: >> > Anybody

[OpenWrt-Devel] [PATCH 0/2] ar8216: move AR8327/AR8337-specific code into separate source file

2014-12-19 Thread Heiner Kallweit
to relatively easy create the option to compile a smaller AR8216/AR8236/AR8316 driver w/o the AR8327/AR8337 code. And it improves maintainability IMHO. Heiner Kallweit (2): ar8216: move definitions from ar8216.c to ar8216.h and introduce ar8327.h ar8216: factor out AR8327/AR8337-specific

[OpenWrt-Devel] [PATCH 2/2] ar8216: factor out AR8327/AR8337-specific driver code into ar8327.c

2014-12-19 Thread Heiner Kallweit
Move all AR8327/AR8337-specific driver code into a separate source file ar8327.c and adjust patches so that ar8327.c is compiled if CONFIG_AR8216_PHY is set. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 1059 +--- .../linux/generic

[OpenWrt-Devel] [PATCH 1/2] ar8216: move definitions from ar8216.c to ar8216.h and introduce ar8327.h

2014-12-19 Thread Heiner Kallweit
Move several structure definitions and #defines from ar8216.c to ar8216.h and move AR8327/AR8337 header stuff into a new header file ar8327.h. Signed-off-by: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 178 +--- .../linux/generic/files/drivers/net/phy/ar8216

[OpenWrt-Devel] [PATCH 0/6] ar8216: patch series for AR8327/AR8337

2015-01-12 Thread Heiner Kallweit
EEE capabilities to the link partner. This might still allow the link partner to sleep if network is inactive. Patch 6 displays autonegotiated rx/tx flow control as part of the get_link attribute. So far this was the case in forced mode only. Heiner Kallweit (6): ar8216: define all switch_addr

[OpenWrt-Devel] [PATCH 3/6] ar8216: introduce ar8xxx_reg_clear complementing ar8xxx_reg_set

2015-01-12 Thread Heiner Kallweit
Introduce ar8xxx_reg_clear complementing ar8xxx_reg_set. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 10 -- target/linux/generic/files/drivers/net/phy/ar8216.h | 6 ++ target/linux/generic/files/drivers/net/phy/ar8327.c | 10

[OpenWrt-Devel] [PATCH 1/6] ar8216: define all switch_addr structs as const

2015-01-12 Thread Heiner Kallweit
Define all switch_addr structs as const. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 6 +++--- target/linux/generic/files/drivers/net/phy/ar8327.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/linux/generic/files

[OpenWrt-Devel] [PATCH 2/6] ar8216: replace ar8xxx_rmw with ar8xxx_reg_set where appropriate

2015-01-12 Thread Heiner Kallweit
Replace ar8xxx_rmw with ar8xxx_reg_set where appropriate. Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8216.c | 13 + target/linux/generic/files/drivers/net/phy/ar8327.c | 6 ++ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a

[OpenWrt-Devel] [PATCH 5/6] ar8216: add 802.3az EEE info to swconfig get_link attribute

2015-01-12 Thread Heiner Kallweit
: Heiner Kallweit --- .../linux/generic/files/drivers/net/phy/ar8216.c | 17 +++ .../linux/generic/files/drivers/net/phy/ar8216.h | 3 +++ .../linux/generic/files/drivers/net/phy/ar8327.c | 24 ++ .../linux/generic/files/drivers/net/phy/swconfig.c | 4 +++- target

[OpenWrt-Devel] [PATCH 6/6] ar8216: display flow control info in swconfig get_link in case of autonegatiation too

2015-01-12 Thread Heiner Kallweit
flow control as part of the get_link attribute. Successfully tested on TL-WDR4900 (AR8327 rev.4) and TL-WDR4300 (AR8327 rev.2). Signed-off-by: Heiner Kallweit --- target/linux/generic/files/drivers/net/phy/ar8327.c | 18 +- target/linux/generic/files/drivers/net/phy/ar8327.h | 2

  1   2   >