[PATCH v2] net: stmmac: Fix wrong message in stmmac_probe_config_dt

2017-02-01 Thread Heiner Kallweit
Most likely a copy & paste error in referenced commit. Restore the debug message to what it was before. Fixes: f573c0b9c4e0 ("stmmac: move stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to platform structure") Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- v2: - Do

Re: [PATCH] net: stmmac: Remove wrong message in stmmac_probe_config_dt

2017-02-01 Thread Heiner Kallweit
Am 02.02.2017 um 03:20 schrieb Phil Reid: > On 2/02/2017 05:05, Heiner Kallweit wrote: >> I can only imagine that this message ended up there by a copy & paste >> mistake. The same message appears correctly a few lines later, but >> here it doesn't make sense. >> &g

[PATCH] net: stmmac: don't set tx delay in RGMII_ID and RGMII_TXID mode

2017-02-01 Thread Heiner Kallweit
As documented in Documentation/devicetree/bindings/net/ethernet.txt, in RGMII_ID and RGMII_TXID mode the MAC should not add a tx delay. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 16 +--- 1 file chan

[PATCH] net: stmmac: Remove wrong message in stmmac_probe_config_dt

2017-02-01 Thread Heiner Kallweit
I can only imagine that this message ended up there by a copy & paste mistake. The same message appears correctly a few lines later, but here it doesn't make sense. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1

[PATCH] net: stmmac: add separate warning for PTP not being supported by HW

2017-02-01 Thread Heiner Kallweit
Chips like Amlogic S905GXBB are supported by this driver but don't have support for PTP. Add a separate warning for missing HW support to differentiate it from other actual failures. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main

net: stmmac: don't use netdev_[dbg, info, ..] before net_device is registered

2017-01-15 Thread Heiner Kallweit
Don't use netdev_info and friends before the net_device is registered. This avoids ugly messages like "meson8b-dwmac c941.ethernet (unnamed net_device) (uninitialized): Enable RX Mitigation via HW Watchdog Timer" Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- driv

[PATCH] net: stmmac: don't use netdev_[dbg, info, ..] before net_device is registered

2017-01-15 Thread Heiner Kallweit
Don't use netdev_info and friends before the net_device is registered. This avoids ugly messages like "meson8b-dwmac c941.ethernet (unnamed net_device) (uninitialized): Enable RX Mitigation via HW Watchdog Timer" Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- driv

Re: net: stmmac: don't use netdev_[dbg, info, ..] before net_device is registered

2017-01-15 Thread Heiner Kallweit
Am 15.01.2017 um 19:23 schrieb Joe Perches: > On Sun, 2017-01-15 at 19:17 +0100, Heiner Kallweit wrote: >> Don't use netdev_info and friends before the net_device is registered. >> This avoids ugly messages like >> "meson8b-dwmac c941.ethernet (unnamed net_device) (un

linux-next-20170320 breaks stmmac on meson (Amlogic S905GXBB)

2017-03-20 Thread Heiner Kallweit
As reported by Corentin Labbe before: stmmac in the latest next kernel is broken also on meson8b. The following commit seems to create the trouble: 6deee2221e11 "net: stmmac: prepare dma op mode config for multiple queues" I also get queue timeout errors. Rgds, Heiner

[PATCH 2/2] net: phy: remove generic settings for callbacks config_aneg and read_status from drivers

2017-11-15 Thread Heiner Kallweit
Remove generic settings for callbacks config_aneg and read_status from drivers. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/phy/amd.c| 2 -- drivers/net/phy/at803x.c | 6 -- drivers/net/phy/bcm-cygnus.c | 2 -- drivers/net/phy/bcm63xx.c

Re: [PATCH RfC 1/2] net: phy: core: remove now uneeded disabling of interrupts

2017-11-15 Thread Heiner Kallweit
Am 15.11.2017 um 23:04 schrieb Florian Fainelli: > On 11/12/2017 01:08 PM, Heiner Kallweit wrote: >> After commits c974bdbc3e "net: phy: Use threaded IRQ, to allow IRQ from >> sleeping devices" and 664fcf123a30 "net: phy: Threaded interrupts allow >> some simp

[PATCH 1/2] net: phy: core: use genphy version of callbacks read_status and config_aneg per default

2017-11-15 Thread Heiner Kallweit
implement the mandatory calls. If a driver doesn't do so we'd just get a NPE. With this patch this potential issue doesn't exit any longer. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/phy/phy.c | 5 - include/linux/phy.h | 33 ++--- 2

[PATCH net-next resubmit 1/2] net: phy: core: use genphy version of callbacks read_status and config_aneg per default

2017-11-30 Thread Heiner Kallweit
implement the mandatory calls. If a driver doesn't do so we'd just get a NPE. With this patch this potential issue doesn't exit any longer. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/net/phy/phy.c | 5 - i

[PATCH net-next resubmit 2/2] net: phy: remove generic settings for callbacks config_aneg and read_status from drivers

2017-11-30 Thread Heiner Kallweit
Remove generic settings for callbacks config_aneg and read_status from drivers. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- drivers/net/phy/amd.c| 2 -- drivers/net/phy/at803x.c | 6 -- drivers

[PATCH net-next resubmit 2/2] net: phy: core: don't disable device interrupts in phy_change

2017-11-30 Thread Heiner Kallweit
. Tested on a Odroid-C2 with RTL8211F phy in interrupt mode. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/phy/phy.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index b37

[PATCH net-next resubmit 1/2] net: phy: core: remove now uneeded disabling of interrupts

2017-11-30 Thread Heiner Kallweit
if more people could test this. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> Acked-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- drivers/net/phy/phy.c | 26 ++ include/linux/phy.h | 1 - 2 files changed, 2 insertions(+), 25 deletions(-) diff

Re: [PATCH RfC 1/2] net: phy: core: remove now uneeded disabling of interrupts

2017-11-29 Thread Heiner Kallweit
Am 16.11.2017 um 10:51 schrieb Ard Biesheuvel: > On 15 November 2017 at 22:19, Heiner Kallweit <hkallwe...@gmail.com> wrote: >> Am 15.11.2017 um 23:04 schrieb Florian Fainelli: >>> On 11/12/2017 01:08 PM, Heiner Kallweit wrote: >>>> After commits c974bdbc3e &

Re: [PATCH 1/2] net: phy: core: use genphy version of callbacks read_status and config_aneg per default

2017-11-29 Thread Heiner Kallweit
Am 15.11.2017 um 22:56 schrieb Florian Fainelli: > On 11/15/2017 01:42 PM, Heiner Kallweit wrote: >> read_status and config_aneg are the only mandatory callbacks and most >> of the time the generic implementation is used by drivers. >> So make the core fall back to the generi

[PATCH net-next] net: phy: broadcom: re-add mistakenly removed config settings

2017-12-02 Thread Heiner Kallweit
Previous patch mistakenly removed three chip-specific config settings. Add them again. Fixes: 80274abafc60 "net: phy: remove generic settings for callbacks config_aneg and read_status from drivers" Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/phy/broad

Re: [PATCH v2 1/2] r8169: fix RTL8111EVL EEE and green settings

2017-12-16 Thread Heiner Kallweit
Am 21.11.2017 um 02:34 schrieb Andrew Lunn: > Hi Heiner > > Do you have access to the data sheet? > > I had a quick look through the driver. It would be nice to refactor it > to follow the usual Linux conventions: > > Turn the MDIO read/write functions into an MDIO bus driver. > > Move the PHY

[PATCH] net: phy: realtek: fix RTL8211F interrupt mode

2017-11-12 Thread Heiner Kallweit
0. Because register INSR needs to be accessed via page 0xa43 I assumed that register INER needs to be accessed via some page too. Some brute force check resulted in page 0xa42 being the right one. With this patch the phy is working properly in interrupt mode. Signed-off-by: Heiner Kallweit <hkallwe

Re: [PATCH v2 1/2] r8169: fix RTL8111EVL EEE and green settings

2017-11-20 Thread Heiner Kallweit
Am 21.11.2017 um 02:34 schrieb Andrew Lunn: > Hi Heiner Hi Andrew, > > Do you have access to the data sheet? > Not to more recent ones. I only have two older data sheets for early members of the rtl8169 family. > I had a quick look through the driver. It would be nice to refactor it > to

[PATCH 1/2] r8169: fix RTL8111EVL EEE and green settings

2017-11-18 Thread Heiner Kallweit
was moved to the current place in 2011). The patch was tested on a Zotac Mini-PC with a RTL8111E-VL chip. Before the patch EEE was disabled, now it's properly advertised and works fine. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/ethernet/realtek/r8169.c | 12 ++--

[PATCH 2/2] r8169: use same RTL8111EVL green settings as in vendor driver

2017-11-18 Thread Heiner Kallweit
Adjust the code to use the same green settings as in the latest vendor driver. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/ethernet/realtek/r8169.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/et

Realtek r8169: Problem with EEE on RTL8111E-VL

2017-11-18 Thread Heiner Kallweit
I have a Zotac Mini-PC with a RTL8111E-VL and just by chance figured out that EEE is disabled on the link between my EEE-capable switch and this device. After a little investigating I found that from the beginning of this driver advertising of EEE was disabled: See rtl8168e_2_hw_phy_config, line

Re: Realtek r8169: Problem with EEE on RTL8111E-VL

2017-11-18 Thread Heiner Kallweit
Am 18.11.2017 um 22:33 schrieb Heiner Kallweit: > I have a Zotac Mini-PC with a RTL8111E-VL and just by chance figured out > that EEE is disabled on the link between my EEE-capable switch and > this device. > > After a little investigating I found that from the beginning o

[PATCH v2 1/2] r8169: fix RTL8111EVL EEE and green settings

2017-11-19 Thread Heiner Kallweit
was moved to the current place in 2011). The patch was tested on a Zotac Mini-PC with a RTL8111E-VL chip. Before the patch EEE was disabled, now it's properly advertised and works fine. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- v2: - no changes --- drivers/net/ethernet/real

[PATCH v2 2/2] r8169: use same RTL8111EVL green settings as in vendor driver

2017-11-19 Thread Heiner Kallweit
Adjust the code to use the same green settings as in the latest vendor driver. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- v2: - replace magic numbers with constants --- drivers/net/ethernet/realtek/r8169.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drive

[PATCH RfC 1/2] net: phy: core: remove now uneeded disabling of interrupts

2017-11-12 Thread Heiner Kallweit
if more people could test this. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/phy/phy.c | 26 ++ include/linux/phy.h | 1 - 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 2

[PATCH RfC 2/2] net: phy: core: don't disable device interrupts in phy_change

2017-11-12 Thread Heiner Kallweit
. Tested on a Odroid-C2 with RTL8211F phy in interrupt mode. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/phy/phy.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index b37

Re: linux-next: build warning after merge of the net-next tree

2017-12-03 Thread Heiner Kallweit
Am 04.12.2017 um 01:02 schrieb Stephen Rothwell: > Hi all, > > After merging the net-next tree, today's linux-next build (arm > multi_v7_defconfig) produced this warning: > > drivers/net/phy/broadcom.c:391:12: warning: 'bcm5482_read_status' defined but > not used [-Wunused-function] > static

[PATCH v2 0/3] r8169: extend PCI core and switch to device-managed functions in probe

2017-12-11 Thread Heiner Kallweit
Probe error path and remove callback can be significantly simplified by using device-managed functions. To be able to do this in the r8169 driver we need a device-managed version of pci_set_mwi first. v2: Change patch 1 based on Björn's review comments and add his Acked-by. Heiner Kallweit (3

[PATCH v2 1/3] PCI: Add pcim_set_mwi(), a device-managed pci_set_mwi()

2017-12-11 Thread Heiner Kallweit
Add pcim_set_mwi(), a device-managed version of pci_set_mwi(). First user is the Realtek r8169 driver. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> Acked-by: Bjorn Helgaas <bhelg...@google.com> --- v2: - Reorder calls - Adjust and commit message --- drivers/pci/

[PATCH v2 3/3] r8169: remove netif_napi_del in probe error path

2017-12-11 Thread Heiner Kallweit
netif_napi_del is called implicitely by free_netdev, therefore we don't have to do it explicitely. When the probe error path is reached, the net_device isn't registered yet. Therefore reordering the call to netif_napi_del shouldn't cause any issues. Signed-off-by: Heiner Kallweit <hkal

[PATCH v2 2/3] r8169: switch to device-managed functions in probe

2017-12-11 Thread Heiner Kallweit
Simplify probe error path and remove callback by using device-managed functions. rtl_disable_msi isn't needed any longer because the release callback of pcim_enable_device does this implicitely. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- v2: - no changes --- drivers/net/et

Re: [PATCH net-next resubmit 2/2] net: phy: remove generic settings for callbacks config_aneg and read_status from drivers

2017-12-01 Thread Heiner Kallweit
Am 01.12.2017 um 21:42 schrieb David Miller: > From: Heiner Kallweit <hkallwe...@gmail.com> > Date: Thu, 30 Nov 2017 23:47:52 +0100 > >> Remove generic settings for callbacks config_aneg and read_status >> from drivers. >> When re-testing I just figured out tha

[PATCH 0/3] r8169: extend PCI core and switch to device-managed functions in probe

2017-12-09 Thread Heiner Kallweit
Probe error path and remove callback can be significantly simplified by using device-managed functions. To be able to do this in the r8169 driver we need a device-managed version of pci_set_mwi first. Heiner Kallweit (3): PCI: introduce device-managed version of pci_set_mwi r8169: switch

[PATCH 1/3] PCI: introduce a device-managed version of pci_set_mwi

2017-12-09 Thread Heiner Kallweit
Introduce a device-managed version of pci_set_mwi. First user is the Realtek r8169 driver. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/pci/pci.c | 29 + include/linux/pci.h | 1 + 2 files changed, 30 insertions(+) diff --git a/drive

[PATCH 2/3] r8169: switch to device-managed functions in probe

2017-12-09 Thread Heiner Kallweit
Simplify probe error path and remove callback by using device-managed functions. rtl_disable_msi isn't needed any longer because the release callback of pcim_enable_device does this implicitely. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/ethernet/realtek/r8169.

[PATCH 3/3] r8169: remove netif_napi_del in probe error path

2017-12-09 Thread Heiner Kallweit
netif_napi_del is called implicitely by free_netdev, therefore we don't have to do it explicitely. When the probe error path is reached, the net_device isn't registered yet. Therefore reordering the call to netif_napi_del shouldn't cause any issues. Signed-off-by: Heiner Kallweit <hkal

[PATCH net-next] r8169: fix powering up RTL8168h

2018-05-07 Thread Heiner Kallweit
in my case the patch fixed the issue. Reported-by: Slava Kardakov <o...@ojab.ru> Tested-by: Slava Kardakov <o...@ojab.ru> Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/ethernet/realtek/r8169.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net

[PATCH net] r8169: fix powering up RTL8168h

2018-05-07 Thread Heiner Kallweit
in my case the patch fixed the issue. Reported-by: Slava Kardakov <o...@ojab.ru> Tested-by: Slava Kardakov <o...@ojab.ru> Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- This patch will not apply to net-next as it conflicts with other changes which have been done i

[PATCH net-next] r8169: fix network error on resume from suspend

2018-05-19 Thread Heiner Kallweit
the call to rtl_set_rx_mode() there. Due to adding this call we have to move definition of rtl_hw_start() after definition of rtl_set_rx_mode(). Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> Fixes: 82d3ff6dd199 ("r8169: remove calls to rtl_set_rx_mode") --- drivers/net/

[PATCH net-next] r8169: perform reset synchronously in __rtl8169_resume

2018-05-21 Thread Heiner Kallweit
The driver uses pm_runtime_get_sync() in few places and relies on the device being fully runtime-resumed after this call. So far however the runtime resume callback triggers an asynchronous reset. Avoid this and perform the reset synchronously. Signed-off-by: Heiner Kallweit <hkal

Re: [PATCH net-next] r8169: perform reset synchronously in __rtl8169_resume

2018-05-21 Thread Heiner Kallweit
Am 21.05.2018 um 23:24 schrieb Francois Romieu: > Heiner Kallweit <hkallwe...@gmail.com> : > [...] >> diff --git a/drivers/net/ethernet/realtek/r8169.c >> b/drivers/net/ethernet/realtek/r8169.c >> index 75dfac024..1eb4f625a 100644 >> --- a/drivers/net/ethernet/

[PATCH net-next 1/2] net: phy: improve check for when to call phy_resume in mdio_bus_phy_resume

2018-05-23 Thread Heiner Kallweit
We don't have to do all the checks again which we did in mdio_bus_phy_suspend already. Instead we can simply check whether the PHY is actually suspended and needs to be resumed. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/phy/phy_device.c | 12 +---

[PATCH net-next v2 2/2] net: phy: improve checks when to suspend the PHY

2018-05-23 Thread Heiner Kallweit
phy_may_suspend() and call it from phy_suspend(). Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- v2: - Check for MDIO bus parent being runtime-suspended before calling phy_ethtool_get_wol() which could access the MDIO bus. --- drivers/net/phy/phy_device.

[PATCH net-next v2 1/2] net: phy: improve check for when to call phy_resume in mdio_bus_phy_resume

2018-05-23 Thread Heiner Kallweit
We don't have to do all the checks again which we did in mdio_bus_phy_suspend already. Instead we can simply check whether the PHY is actually suspended and needs to be resumed. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- v2: - no changes --- drivers/net/phy/phy_device.

Re: [PATCH net-next 2/2] net: phy: improve checks for when to suspend the PHY

2018-05-23 Thread Heiner Kallweit
Am 23.05.2018 um 21:43 schrieb Florian Fainelli: > On 05/23/2018 12:31 PM, Heiner Kallweit wrote: >> If the parent of the MDIO bus is runtime-suspended, we may not be able >> to access the MDIO bus. Therefore add a check for this situation. >> >> So far phy_suspend(

[PATCH net-next 0/2] net: phy: improve PHY suspend/resume

2018-05-23 Thread Heiner Kallweit
. Heiner Kallweit (2): net: phy: improve check for when to call phy_resume in mdio_bus_phy_resume net: phy: improve checks when to suspend the PHY drivers/net/phy/phy_device.c | 45 +--- 1 file changed, 26 insertions(+), 19 deletions(-) -- 2.17.0

[PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume

2018-05-23 Thread Heiner Kallweit
. Changes in v2: - Check for MDIO bus parent being runtime-suspended before calling phy_ethtool_get_wol() which could access the MDIO bus. Heiner Kallweit (2): net: phy: improve check for when to call phy_resume in mdio_bus_phy_resume net: phy: improve checks when to suspend the PHY drivers

[PATCH net-next 2/2] net: phy: improve checks for when to suspend the PHY

2018-05-23 Thread Heiner Kallweit
phy_may_suspend() and call it from phy_suspend(). Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/phy/phy_device.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_de

[PATCH] net: phy: replace bool members in struct phy_device with bit-fields

2018-05-23 Thread Heiner Kallweit
In struct phy_device we have a number of flags being defined as type bool. Similar to e.g. struct pci_dev we can save some space by using bit-fields. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- include/linux/phy.h | 23 +++ 1 file changed, 11 insertions(

Re: [PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume

2018-05-23 Thread Heiner Kallweit
Am 24.05.2018 um 00:04 schrieb Andrew Lunn: > On Wed, May 23, 2018 at 10:15:29PM +0200, Heiner Kallweit wrote: >> I have the issue that suspending the MAC-integrated PHY gives an >> error during system suspend. The sequence is: >> >> 1. unconnected PHY/MAC are run

Re: [PATCH net-next] net: phy: realtek: add suspend/resume callbacks for RTL8211B

2018-05-24 Thread Heiner Kallweit
Am 24.05.2018 um 22:53 schrieb Andrew Lunn: > On Thu, May 24, 2018 at 10:40:12PM +0200, Heiner Kallweit wrote: >> Add RTL8211B suspend / resume callbacks. >> >> Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> >> --- >> This patch is based on my kno

[PATCH net-next] net: phy: realtek: add suspend/resume callbacks for RTL8211B

2018-05-24 Thread Heiner Kallweit
Add RTL8211B suspend / resume callbacks. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- This patch is based on my knowledge of the r8169 driver, and on some guessing. Therefore I'd appreciate a confirmation from Realtek. The integrated PHY in some chips supported by the r8169

[PATCH net-next] net: phy: convert further flags in struct phy_device to bit-field

2018-05-24 Thread Heiner Kallweit
This patch is a follow-up to 87e5808d52b6 ("net: phy: replace bool members in struct phy_device with bit-fields") and converts further flags to bit-fields. Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- include/linux/phy.h | 17 - 1 file changed, 8

Re: [PATCH net-next] net: phy: convert further flags in struct phy_device to bit-field

2018-05-25 Thread Heiner Kallweit
Am 25.05.2018 um 01:03 schrieb Florian Fainelli: > On 05/24/2018 01:15 PM, Heiner Kallweit wrote: >> This patch is a follow-up to 87e5808d52b6 ("net: phy: replace bool >> members in struct phy_device with bit-fields") and converts further >> flags to bit-fields. >

Re: [PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume

2018-06-08 Thread Heiner Kallweit
On 05.06.2018 21:39, Heiner Kallweit wrote: > On 02.06.2018 22:27, Heiner Kallweit wrote: >> On 01.06.2018 02:10, Andrew Lunn wrote: >>>> Configuring the different WoL options isn't handled by writing to >>>> the PHY registers but by writing to chip / MAC regi

[PATCH net-next] net: phy: consider PHY_IGNORE_INTERRUPT in state machine PHY_NOLINK handling

2018-05-30 Thread Heiner Kallweit
We can bail out immediately also in case of PHY_IGNORE_INTERRUPT because phy_mac_interupt() informs us once the link is up. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c

Re: [PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume

2018-05-30 Thread Heiner Kallweit
Am 24.05.2018 um 00:04 schrieb Andrew Lunn: > On Wed, May 23, 2018 at 10:15:29PM +0200, Heiner Kallweit wrote: >> I have the issue that suspending the MAC-integrated PHY gives an >> error during system suspend. The sequence is: >> >> 1. unconnected PHY/MAC are run

Re: [PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume

2018-05-31 Thread Heiner Kallweit
On 30.05.2018 22:35, Andrew Lunn wrote: >> I think we need a better solution than spending the effort needed >> to make the MDIO ops runtime-pm-aware. In general there seems to be >> just one network driver using both phylib and runtime pm, so most >> drivers aren't affected (yet). >> >> I will

Re: [PATCH net-next] net: phy: consider PHY_IGNORE_INTERRUPT in state machine PHY_NOLINK handling

2018-06-01 Thread Heiner Kallweit
On 01.06.2018 03:26, David Miller wrote: > From: Heiner Kallweit > Date: Wed, 30 May 2018 22:13:20 +0200 > >> We can bail out immediately also in case of PHY_IGNORE_INTERRUPT because >> phy_mac_interupt() informs us once the link is up. >> >> Signed-off-by:

Re: [PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume

2018-05-31 Thread Heiner Kallweit
On 31.05.2018 20:30, Andrew Lunn wrote: >> By the way: The problem is related to an experimental patch series for >> splitting r8169/r8168 drivers and switching r8168 to phylib. >> Therefore the change to r8168.c won't apply to existing kernel code. > > Hi Heiner > > I still think you are trying

Re: [PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume

2018-06-02 Thread Heiner Kallweit
On 01.06.2018 02:10, Andrew Lunn wrote: >> Configuring the different WoL options isn't handled by writing to >> the PHY registers but by writing to chip / MAC registers. >> Therefore phy_suspend() isn't able to figure out whether WoL is >> enabled or not. Only the parent has the full picture. > >

[PATCH net-next 0/2] net: phy: improve PM handling of PHY/MDIO

2018-06-02 Thread Heiner Kallweit
as struct device_type as well. Heiner Kallweit (2): net: phy: add struct device_type representation of a PHY net: phy: remove PM ops from MDIO bus drivers/net/phy/mdio_bus.c | 48 -- drivers/net/phy/phy_device.c | 96 +++- include/linux/mdio.h

[PATCH net-next 2/2] net: phy: remove PM ops from MDIO bus

2018-06-02 Thread Heiner Kallweit
including member pm of struct mdio_device. If for some other type of MDIO device PM ops are needed, it should be modeled as struct device_type as well. Signed-off-by: Heiner Kallweit --- drivers/net/phy/mdio_bus.c | 48 -- include/linux/mdio.h | 1 - 2 files

[PATCH net-next 1/2] net: phy: add struct device_type representation of a PHY

2018-06-02 Thread Heiner Kallweit
-by: Heiner Kallweit --- drivers/net/phy/phy_device.c | 96 +++- 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 9e4ba8e8..bd0f339f 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers

Re: [PATCH net-next 0/2] net: phy: improve PM handling of PHY/MDIO

2018-06-05 Thread Heiner Kallweit
On 04.06.2018 23:48, Andrew Lunn wrote: > On Sat, Jun 02, 2018 at 10:33:36PM +0200, Heiner Kallweit wrote: >> Current implementation of MDIO bus PM ops doesn't actually implement >> bus-specific PM ops but just calls PM ops defined on a device level >> what doesn't see

Re: [PATCH net-next v2 0/2] net: phy: improve PHY suspend/resume

2018-06-05 Thread Heiner Kallweit
On 02.06.2018 22:27, Heiner Kallweit wrote: > On 01.06.2018 02:10, Andrew Lunn wrote: >>> Configuring the different WoL options isn't handled by writing to >>> the PHY registers but by writing to chip / MAC registers. >>> Therefore phy_suspend() isn't able to figure

Re: [PATCH net-next] r8169: remove old PHY reset hack

2018-07-01 Thread Heiner Kallweit
On 01.07.2018 00:25, Heiner Kallweit wrote: > This hack (affecting the non-PCIe models only) was introduced in 2004 > to deal with link negotiation failures in 1GBit mode. Based on a > comment in the r8169 vendor driver I assume the issue affects RTL8169sb > in combination with part

[PATCH net-next] net: phy: realtek: add support for RTL8211C

2018-07-02 Thread Heiner Kallweit
it impossible to connect two network ports directly which both are driven by a RTl8211C. Signed-off-by: Heiner Kallweit --- drivers/net/phy/realtek.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 082fb40c..eb6cb2cc

[PATCH net-next] r8169: reject unsupported WoL options

2018-06-25 Thread Heiner Kallweit
So far unsupported WoL options are silently ignored. Change this and reject attempts to set unsupported options. This prevents situations where a user tries to set an unsupported WoL option and is under the impression it was successful because ethtool doesn't complain. Signed-off-by: Heiner

[PATCH net-next 0/2] r8169: enable ASPM on RTL8168E-VL

2018-06-23 Thread Heiner Kallweit
This patch series enables ASPM for the RTL8168E-VL and aligns ASPM entry latency handling with the vendor driver before. Heiner Kallweit (2): r8169: align ASPM entry latency setting with vendor driver r8169: enable ASPM on RTL8168E-VL drivers/net/ethernet/realtek/r8169.c | 45

[PATCH net-next 1/2] r8169: align ASPM entry latency setting with vendor driver

2018-06-23 Thread Heiner Kallweit
value 0x27 works fine. In addition rename rtl_csi_access_enable_2() to rtl_set_def_aspm_entry_latency() to make clear that we set the default ASPM entry latency. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 43 1 file changed, 19 insertions

[PATCH net-next 2/2] r8169: enable ASPM on RTL8168E-VL

2018-06-23 Thread Heiner Kallweit
Let's enable ASPM also on the RTL8168E-VL (chip version 34). Works fine on my Zotac Mini PC with this chip. Temperature when being idle is significantly lower than before due to reaching deeper PC states. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 2 ++ 1 file

[PATCH net-next 2/3] r8169: improve saved_wolopts handling

2018-06-24 Thread Heiner Kallweit
-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 34 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 480fb141..f8a1309a 100644 --- a/drivers/net/ethernet

[PATCH net-next 1/3] r8169: improve phy initialization when resuming

2018-06-24 Thread Heiner Kallweit
Let's move calling rtl8169_init_phy() to __rtl8169_resume(). It simplifies the code and avoids rtl8169_init_phy() being called when resuming whilst interface is down. rtl_open() will initialize the PHY when the interface is brought up. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet

[PATCH net-next 3/3] r8169: don't check WoL when powering down PHY and interface is down

2018-06-24 Thread Heiner Kallweit
We can power down the PHY irregardless of WOL settings if interface is down. So far we would have left the PHY enabled if WOL options are set and the interface is brought down. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH net-next 0/3] r8169: improve PHY initialization and WoL handling

2018-06-24 Thread Heiner Kallweit
Series with smaller improvements regarding PHY initialization and WoL handling. Heiner Kallweit (3): r8169: improve phy inititalization when resuming r8169: improve saved_wolopts handling r8169: don't check WoL when powering down PHY and interface is down drivers/net/ethernet/realtek

Re: [PATCH] r8169: Fix netpoll oops

2018-06-20 Thread Heiner Kallweit
tek linux nic maintainers > Cc: netdev@vger.kernel.org > Cc: Heiner Kallweit > Cc: David S. Miller > Fixes: ebcd5daa7ffd ("r8169: change interrupt handler argument type") > Signed-off-by: Ville Syrjälä > --- > drivers/net/ethernet/realtek/r8169.c | 2 +- > 1

[PATCH net-next 03/10] r8169: replace open-coded PHY soft reset with genphy_soft_reset

2018-07-02 Thread Heiner Kallweit
Use genphy_soft_reset() instead of open-coding a PHY soft reset. We have to do an explicit PHY soft reset because some chips use the genphy driver which uses a no-op as soft_reset callback. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 27

[PATCH net-next 01/10] r8169: add basic phylib support

2018-07-02 Thread Heiner Kallweit
Add basic phylib support to r8169. All now unneeded old PHY handling code will be removed in subsequent patches. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/Kconfig | 1 + drivers/net/ethernet/realtek/r8169.c | 146 +-- 2 files changed, 115

[PATCH net-next 10/10] r8169: don't read chip phy status register

2018-07-02 Thread Heiner Kallweit
Instead of accessing the PHYstatus register we can use the information phylib stores in the phy_device structure. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/realtek

[PATCH net-next 07/10] r8169: migrate speed_down function to phylib

2018-07-02 Thread Heiner Kallweit
Change rtl_speed_down() to use phylib. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 33 +--- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index

[PATCH net-next 08/10] r8169: remove rtl8169_set_speed_xmii

2018-07-02 Thread Heiner Kallweit
We can remove rtl8169_set_speed_xmii() now that phylib handles all this. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 90 1 file changed, 90 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek

[PATCH net-next 09/10] r8169: remove mii_if_info member from struct rtl8169_private

2018-07-02 Thread Heiner Kallweit
The only remaining usage of the struct mii_if_info member is to store the information whether the chip is GMII-capable. So we can replace it with a simple flag. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 38 +--- 1 file changed, 7

[PATCH net-next 06/10] r8169: use phy_mii_ioctl

2018-07-02 Thread Heiner Kallweit
Switch to using phy_mii_ioctl(). Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 6006676b

[PATCH net-next 05/10] r8169: use phy_ethtool_nway_reset

2018-07-02 Thread Heiner Kallweit
Switch to using phy_ethtool_nway_reset(). Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/Kconfig | 1 - drivers/net/ethernet/realtek/r8169.c | 9 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/ethernet/realtek/Kconfig b/drivers/net/ethernet

Re: Regression introduced by "r8169: simplify rtl_set_mac_address"

2018-07-02 Thread Heiner Kallweit
On 02.07.2018 21:48, Corinna Vinschen wrote: > Hi, > > the patch 1f7aa2bc268e, "r8169: simplify rtl_set_mac_address", > introduced a regression found by trying to team a r8169 NIC. > Thanks for reporting! > Try the following (assuming the r8169 NIC is eth0): > > $ nmcli con add type team

Re: [PATCH net-next 02/10] r8169: use phy_resume/phy_suspend

2018-07-02 Thread Heiner Kallweit
On 02.07.2018 23:06, Andrew Lunn wrote: >> static void r8168_pll_power_down(struct rtl8169_private *tp) >> { >> if (r8168_check_dash(tp)) >> @@ -4510,7 +4469,8 @@ static void r8168_pll_power_down(struct >> rtl8169_private *tp) >> if (rtl_wol_pll_power_down(tp)) >> return;

Re: [PATCH net-next 01/10] r8169: add basic phylib support

2018-07-02 Thread Heiner Kallweit
On 02.07.2018 23:02, Andrew Lunn wrote: >> +static int r8169_mdio_read_reg(struct mii_bus *mii_bus, int phyaddr, int >> phyreg) >> +{ >> +struct rtl8169_private *tp = mii_bus->priv; >> + >> +return rtl_readphy(tp, phyreg); > > So there is no support for phyaddr? > Right, the chip can

Re: [PATCH net-next 07/10] r8169: migrate speed_down function to phylib

2018-07-02 Thread Heiner Kallweit
On 02.07.2018 23:20, Andrew Lunn wrote: > On Mon, Jul 02, 2018 at 09:37:08PM +0200, Heiner Kallweit wrote: >> Change rtl_speed_down() to use phylib. >> >> Signed-off-by: Heiner Kallweit >> --- >> drivers/net/ethernet/realtek/r8169.c | 33 +-

Re: [PATCH net-next 08/10] r8169: remove rtl8169_set_speed_xmii

2018-07-02 Thread Heiner Kallweit
On 02.07.2018 23:21, Andrew Lunn wrote: >> -auto_nego |= ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM; > > This bit you probably want to keep. The PHY never says it support > Pause. The MAC needs to enable pause if the MAC supports pause. > Actually I assumed that phylib would do this

[PATCH net-next 00/10] r8169: add phylib support

2018-07-02 Thread Heiner Kallweit
Now that all the basic refactoring has been done we can add phylib support. This patch series was successfully tested on: RTL8168h RTL8168evl RTL8169sb Heiner Kallweit (10): r8169: add basic phylib support r8169: use phy_resume/phy_suspend r8169: replace open-coded PHY soft reset

[PATCH net] r8169: fix mac address change

2018-07-02 Thread Heiner Kallweit
Network core refuses to change mac address because flag IFF_LIVE_ADDR_CHANGE isn't set. Set this missing flag. Fixes: 1f7aa2bc268e ("r8169: simplify rtl_set_mac_address") Reported-by: Corinna Vinschen Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 1 + 1 fi

[PATCH net-next 02/10] r8169: use phy_resume/phy_suspend

2018-07-02 Thread Heiner Kallweit
Use phy_resume() / phy_suspend() instead of open coding this functionality. The chip version specific differences are handled by the respective PHY drivers. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 48 +++- 1 file changed, 5 insertions

[PATCH net-next 04/10] r8169: use phy_ethtool_(g|s)et_link_ksettings

2018-07-02 Thread Heiner Kallweit
Use phy_ethtool_(g|s)et_link_ksettings() for the respective ethtool_ops callbacks. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 35 +++- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169.c b

[PATCH net-next] r8169: remove old PHY reset hack

2018-06-30 Thread Heiner Kallweit
ersion only and that with most link partners, then we could also think of removing 1GBit from the advertised modes for this chip version in the driver. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.c | 57 +--- 1 file changed, 1 insertion(+), 56 del

[PATCH net-next] net: phy: realtek: add missing entry for RTL8211 to mdio_device_id table

2018-07-01 Thread Heiner Kallweit
When adding support for RTL8211 I forgot to update the mdio_device_id table. Signed-off-by: Heiner Kallweit Fixes: d241d4aac93f ("net: phy: realtek: add support for RTL8211") --- drivers/net/phy/realtek.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/phy/realtek.c

  1   2   3   4   5   >