[PATCH v3 0/3] PCI: Disable parity checking if broken_parity is set

2021-01-06 Thread Heiner Kallweit
Thecus N2100. v2: - reduce scope of N2100 change to using the new PCI core quirk v3: - improve commit message of patch 2 Heiner Kallweit (3): PCI: Disable parity checking if broken_parity_status is set ARM: iop32x: improve N2100 PCI broken parity quirk r8169: simplify broken parity handling

Re: [PATCH v2 2/3] ARM: iop32x: improve N2100 PCI broken parity quirk'

2021-01-06 Thread Heiner Kallweit
On 06.01.2021 18:37, Bjorn Helgaas wrote: > On Wed, Jan 06, 2021 at 12:05:41PM +0100, Heiner Kallweit wrote: >> Use new PCI core function pci_quirk_broken_parity(), in addition to >> setting broken_parity_status is disables parity checking. > > That sentence has a typo or so

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

2021-01-06 Thread Heiner Kallweit
Use WARN_ONCE here to get a call trace in case of a problem. This facilitates finding the offending code part. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next 3/3] r8169: don't wakeup-enable device on shutdown if WOL is disabled

2021-01-06 Thread Heiner Kallweit
If WOL isn't enabled, then there's no need to enable wakeup from D3. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethern

[PATCH net-next 1/3] r8169: replace BUG_ON with WARN in _rtl_eri_write

2021-01-06 Thread Heiner Kallweit
Use WARN here to avoid stopping the system. In addition print the addr and mask values that triggered the warning. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/realtek

[PATCH net-next 0/3] r8169: small improvements

2021-01-06 Thread Heiner Kallweit
This series includes a number of smaller improvements. Heiner Kallweit (3): r8169: replace BUG_ON with WARN in _rtl_eri_write r8169: improve rtl_ocp_reg_failure r8169: don't wakeup-enable device on shutdown if WOL is disabled drivers/net/ethernet/realtek/r8169_main.c

[PATCH net-next] net: phy: replace mutex_is_locked with lockdep_assert_held in phylib

2021-01-06 Thread Heiner Kallweit
Switch to lockdep_assert_held(_once), similar to what is being done in other subsystems. One advantage is that there's zero runtime overhead if lockdep support isn't enabled. Signed-off-by: Heiner Kallweit --- drivers/net/phy/mdio_bus.c | 4 ++-- drivers/net/phy/phy.c| 2 +

[PATCH v2 3/3] r8169: simplify broken parity handling now that PCI core takes care

2021-01-06 Thread Heiner Kallweit
Meanwhile the PCI core disables parity checking for a device that has broken_parity_status set. Therefore we don't need the quirk any longer to disable parity checking on the first parity error interrupt. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c

[PATCH v2 2/3] ARM: iop32x: improve N2100 PCI broken parity quirk

2021-01-06 Thread Heiner Kallweit
Use new PCI core function pci_quirk_broken_parity(), in addition to setting broken_parity_status is disables parity checking. This allows us to remove a quirk in r8169 driver. Signed-off-by: Heiner Kallweit --- v2: - remove additional changes from this patch --- arch/arm/mach-iop32x/n2100.c | 2

[PATCH v2 0/3] PCI: Disable parity checking if broken_parity is set

2021-01-06 Thread Heiner Kallweit
Thecus N2100. v2: - reduce scope of N2100 change to using the new PCI core quirk Heiner Kallweit (3): PCI: Disable parity checking if broken_parity_status is set ARM: iop32x: improve N2100 PCI broken parity quirk r8169: simplify broken parity handling now that PCI core takes care arch/arm

[PATCH v2 1/3] PCI: Disable parity checking if broken_parity is set

2021-01-06 Thread Heiner Kallweit
Thecus N2100. Signed-off-by: Heiner Kallweit Reviewed-by: Leon Romanovsky --- drivers/pci/quirks.c | 17 +++-- include/linux/pci.h | 2 ++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 653660e3b..ab54e26b8 100644

[PATCH net-next 2/2] r8169: improve RTL8168g PHY suspend quirk

2021-01-06 Thread Heiner Kallweit
the change as an improvement. The PHY driver has no means to access the chip ERI registers, therefore we have to intercept MDIO writes to BMCR register. If the BMCR_PDOWN bit is going to be set, then let's apply the quirk before actually powering down the PHY. Signed-off-by: Heiner Kallweit -

[PATCH net-next 1/2] r8169: move ERI access functions to avoid forward declaration

2021-01-06 Thread Heiner Kallweit
No functional change here. We just move a code block to avoid a function forward declaration in a subsequent change. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 128 +++--- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/drivers

[PATCH net-next 0/2] r8169: improve RTL8168g PHY suspend quirk

2021-01-06 Thread Heiner Kallweit
the change as an improvement. The PHY driver has no means to access the chip ERI registers, therefore we have to intercept MDIO writes to the BMCR register. If the BMCR_PDOWN bit is going to be set, then let's apply the quirk before actually powering down the PHY. Heiner Kallweit (2):

Re: [PATCH 2/3] ARM: iop32x: improve N2100 PCI broken parity quirk

2021-01-05 Thread Heiner Kallweit
On 06.01.2021 01:52, Russell King - ARM Linux admin wrote: > On Wed, Jan 06, 2021 at 01:44:03AM +0100, Heiner Kallweit wrote: >> The machine type check is there to protect from (theoretical) cases >> where the n2100 code (incl. the RTL8169 quirk) may be compiled in, >> but

Re: [PATCH 2/3] ARM: iop32x: improve N2100 PCI broken parity quirk

2021-01-05 Thread Heiner Kallweit
On 06.01.2021 01:28, Bjorn Helgaas wrote: > On Tue, Jan 05, 2021 at 10:42:31AM +0100, Heiner Kallweit wrote: >> Simplify the quirk by using new PCI core function >> pci_quirk_broken_parity(). In addition make the quirk >> more specific, use device id 0x8169 instead of PCI_ANY

Re: [PATCH] net: phy: Trigger link_change_notify on PHY_HALTED

2021-01-05 Thread Heiner Kallweit
alled afterward. For phy_state_machine(), > no state transition happens, because old_state = PHY_HALTED and > phy_dev->state = PHY_HALTED. > > Signed-off-by: Marek Vasut > Cc: Andrew Lunn > Cc: David S. Miller > Cc: Heiner Kallweit > --- > drivers/net/phy/phy.c | 10 ++

Re: [PATCH] net: phy: Trigger link_change_notify on PHY_HALTED

2021-01-05 Thread Heiner Kallweit
On 05.01.2021 18:05, Russell King - ARM Linux admin wrote: > On Tue, Jan 05, 2021 at 05:58:21PM +0100, Heiner Kallweit wrote: >> On 05.01.2021 17:11, Marek Vasut wrote: >>> @@ -1021,8 +1022,17 @@ void phy_stop(struct phy_device *phydev) >>&

Re: [PATCH] net: phy: Trigger link_change_notify on PHY_HALTED

2021-01-05 Thread Heiner Kallweit
kub are missing as maintainers. > Signed-off-by: Marek Vasut > Cc: Andrew Lunn > Cc: David S. Miller > Cc: Heiner Kallweit > --- > drivers/net/phy/phy.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/ph

[PATCH 2/3] ARM: iop32x: improve N2100 PCI broken parity quirk

2021-01-05 Thread Heiner Kallweit
Simplify the quirk by using new PCI core function pci_quirk_broken_parity(). In addition make the quirk more specific, use device id 0x8169 instead of PCI_ANY_ID. Signed-off-by: Heiner Kallweit --- arch/arm/mach-iop32x/n2100.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff

[PATCH 3/3] r8169: simplify broken parity handling now that PCI core takes care

2021-01-05 Thread Heiner Kallweit
Meanwhile the PCI core disables parity checking for a device that has broken_parity_status set. Therefore we don't need the quirk any longer to disable parity checking on the first parity error interrupt. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c

[PATCH 1/3] PCI: Disable parity checking if broken_parity_status is set

2021-01-05 Thread Heiner Kallweit
Thecus N2100. Signed-off-by: Heiner Kallweit --- drivers/pci/quirks.c | 17 +++-- include/linux/pci.h | 2 ++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 653660e3b..ab54e26b8 100644 --- a/drivers/pci/quirks.c

[PATCH 0/3] PCI: Disable parity checking if broken_parity is set

2021-01-05 Thread Heiner Kallweit
Thecus N2100. Heiner Kallweit (3): PCI: Disable parity checking if broken_parity_status is set ARM: iop32x: improve N2100 PCI broken parity quirk r8169: simplify broken parity handling now that PCI core takes care arch/arm/mach-iop32x/n2100.c | 8 +++- drivers/net/ethernet

Re: [Aspeed, v1 1/1] net: ftgmac100: Change the order of getting MAC address

2021-01-04 Thread Heiner Kallweit
On 04.01.2021 18:28, Hongwei Zhang wrote: > >> From: Jakub Kicinski >> Sent: Monday, December 28, 2020 5:01 PM >> >> On Tue, 22 Dec 2020 22:00:34 +0100 Andrew Lunn wrote: >>> On Tue, Dec 22, 2020 at 09:46:52PM +0100, Heiner Kallweit wrote: >>&

[PATCH net] r8169: work around power-saving bug on some chip versions

2020-12-30 Thread Heiner Kallweit
A user reported failing network with RTL8168dp (a quite rare chip version). Realtek confirmed that few chip versions suffer from a PLL power-down hw bug. Fixes: 07df5bd874f0 ("r8169: power down chip in probe") Signed-off-by: Heiner Kallweit --- Note that since the original change s

Re: Registering IRQ for MT7530 internal PHYs

2020-12-30 Thread Heiner Kallweit
On 30.12.2020 17:15, Florian Fainelli wrote: > > > On 12/30/2020 1:12 AM, Heiner Kallweit wrote: >> On 30.12.2020 10:07, DENG Qingfang wrote: >>> Hi Heiner, >>> Thanks for your reply. >>> >>> On Wed, Dec 30, 2020 at 3:39 PM Heiner Kallweit &

Re: Registering IRQ for MT7530 internal PHYs

2020-12-30 Thread Heiner Kallweit
On 30.12.2020 10:07, DENG Qingfang wrote: > Hi Heiner, > Thanks for your reply. > > On Wed, Dec 30, 2020 at 3:39 PM Heiner Kallweit wrote: >> I don't think that's the best option. > > I'm well aware of that. > >> You may want to add a PHY dr

Re: Registering IRQ for MT7530 internal PHYs

2020-12-29 Thread Heiner Kallweit
On 30.12.2020 05:22, DENG Qingfang wrote: > Hi, > > I added MT7530 IRQ support and registered its internal PHYs to IRQ. > It works but my patch used two hacks. > > 1. Removed phy_drv_supports_irq check, because config_intr and > handle_interrupt are not set for Generic PHY. > I don't think that'

Re: [PATCH] net: phy: realtek: Add support for RTL9000AA/AN

2020-12-25 Thread Heiner Kallweit
On 25.12.2020 01:47, Yuusuke Ashizuka wrote: > RTL9000AA/AN as 100BASE-T1 is following: > - 100 Mbps > - Full duplex > - Link Status Change Interrupt > > Signed-off-by: Yuusuke Ashizuka > Signed-off-by: Torii Kenichi > --- > drivers/net/phy/realtek.c | 51 +++

Re: [PATCH -next] intel/iwlwifi: use DEFINE_MUTEX (and mutex_init() had been too late)

2020-12-23 Thread Heiner Kallweit
On 23.12.2020 15:11, Zheng Yongjun wrote: > Signed-off-by: Zheng Yongjun > --- > drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c > b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c

Re: [Aspeed, v2 2/2] net: ftgmac100: Change the order of getting MAC address

2020-12-22 Thread Heiner Kallweit
; > Hi Heiner, > >> From:Heiner Kallweit >> Sent:Monday, December 21, 2020 4:37 PM >>> Change the order of reading MAC address, try to read it from MAC chip >>> first, if it's not availabe, then try to read it from device tree. >>&

Re: [Aspeed, v1 1/1] net: ftgmac100: Change the order of getting MAC address

2020-12-21 Thread Heiner Kallweit
Am 21.12.2020 um 21:51 schrieb Hongwei Zhang: > Change the order of reading MAC address, try to read it from MAC chip > first, if it's not availabe, then try to read it from device tree. > This commit message leaves a number of questions. It seems the change isn't related at all to the change that

[PATCH net-next] r8169: facilitate adding new chip versions

2020-12-15 Thread Heiner Kallweit
Add a constant RTL_GIGA_MAC_MAX and use it if all new chip versions handle a feature in a specific way. As result we have to touch less places when adding support for a new chip version. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169.h | 3 ++- drivers/net/ethernet

Re: [PATCH net v2] lan743x: fix rx_napi_poll/interrupt ping-pong

2020-12-11 Thread Heiner Kallweit
Am 11.12.2020 um 13:43 schrieb Sven Van Asbroeck: > Hi Heiner, > > On Thu, Dec 10, 2020 at 2:32 AM Heiner Kallweit wrote: >> >> >> In addition you could play with sysfs attributes >> /sys/class/net//gro_flush_timeout >> /sys/class/net//napi_defer_hard_irqs

[PATCH] dma-mapping: move hint unlikely for dma_mapping_error from drivers to core

2020-12-10 Thread Heiner Kallweit
nly if something is really very unlikely. I think that's the case here. Patch was created with some help from coccinelle. @@ expression dev, dma_addr; @@ - unlikely(dma_mapping_error(dev, dma_addr)) + dma_mapping_error(dev, dma_addr) Signed-off-by: Heiner Kallweit --- If ok, then tbd throu

Re: [PATCH net v2] lan743x: fix rx_napi_poll/interrupt ping-pong

2020-12-09 Thread Heiner Kallweit
Am 10.12.2020 um 04:55 schrieb Sven Van Asbroeck: > From: Sven Van Asbroeck > > Even if there is more rx data waiting on the chip, the rx napi poll fn > will never run more than once - it will always read a few buffers, then > bail out and re-arm interrupts. Which results in ping-pong between nap

[PATCH] PCI: Remove pci_try_set_mwi

2020-12-09 Thread Heiner Kallweit
herefore remove pci_try_set_mwi() and remove the __must_check attribute from pci_set_mwi(). I don't expect either function to be used in new code anyway. Signed-off-by: Heiner Kallweit --- patch applies on top of pci/misc for v5.11 --- Documentation/PCI/pci.rst |

[PATCH net-next 1/2] r8169: improve rtl_rx

2020-12-05 Thread Heiner Kallweit
eft with a normal counter variable, this allows to simplify the code. Last but not least there's no need any longer to pass the budget as an u32. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-

[PATCH net-next 2/2] r8169: make NUM_RX_DESC a signed int

2020-12-05 Thread Heiner Kallweit
After recent changes there's no need any longer to define NUM_RX_DESC as an unsigned value. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/dr

[PATCH net-next 0/2] r8169: improve rtl_rx and NUM_RX_DESC handling

2020-12-05 Thread Heiner Kallweit
This series improves rtl_rx() and the handling of NUM_RX_DESC. Heiner Kallweit (2): r8169: improve rtl_rx r8169: make NUM_RX_DESC a signed int drivers/net/ethernet/realtek/r8169_main.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) -- 2.29.2

Re: [PATCH V3 net-next 1/9] net: ena: use constant value for net_device allocation

2020-12-03 Thread Heiner Kallweit
Am 03.12.2020 um 15:38 schrieb Kiyanovski, Arthur: > > >> -Original Message----- >> From: Heiner Kallweit >> Sent: Wednesday, December 2, 2020 11:55 PM >> To: Kiyanovski, Arthur ; k...@kernel.org; >> netdev@vger.kernel.org >> Cc: Woodhouse,

Re: [PATCH V3 net-next 1/9] net: ena: use constant value for net_device allocation

2020-12-02 Thread Heiner Kallweit
Am 02.12.2020 um 21:03 schrieb akiy...@amazon.com: > From: Arthur Kiyanovski > > The patch changes the maximum number of RX/TX queues it advertises to > the kernel (via alloc_etherdev_mq()) from a value received from the > device to a constant value which is the minimum between 128 and the > numb

[PATCH net-next] r8169: set tc_offset only if tally counter reset isn't supported

2020-12-01 Thread Heiner Kallweit
On chip versions supporting tally counter reset we currently update the counters after a reset although we know all counters are zero. Skip this unnecessary step. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 25 --- 1 file changed, 9

Re: [PATCH] mlxsw: switch from 'pci_' to 'dma_' API

2020-11-29 Thread Heiner Kallweit
Am 29.11.2020 um 22:17 schrieb Christophe JAILLET: > he wrappers in include/linux/pci-dma-compat.h should go away. > > The patch has been generated with the coccinelle script below and has been > hand modified to replace GFP_ with a correct flag. > It has been compile tested. > > When memory is a

Re: [PATCH V1 net-next 5/9] net: ena: aggregate stats increase into a function

2020-11-25 Thread Heiner Kallweit
Am 25.11.2020 um 23:51 schrieb akiy...@amazon.com: > From: Arthur Kiyanovski > > Introduce ena_increase_stat_atomic() function to increase statistics by > certain number. > The function includes the > - lock aquire > - stat increase > - lock release > Having "atomic" in the name may

Re: [PATCH v2] net: phy: realtek: read actual speed on rtl8211f to detect downshift

2020-11-24 Thread Heiner Kallweit
Am 24.11.2020 um 23:33 schrieb Antonio Borneo: > On Tue, 2020-11-24 at 23:22 +0100, Heiner Kallweit wrote: >> Am 24.11.2020 um 22:59 schrieb Antonio Borneo: >>> The rtl8211f supports downshift and before commit 5502b218e001 >>> ("net: phy: use phy_resolve_ane

Re: [PATCH v2] net: phy: realtek: read actual speed on rtl8211f to detect downshift

2020-11-24 Thread Heiner Kallweit
e existing > function rtlgen_read_status(). > > Signed-off-by: Antonio Borneo > Link: > https://lore.kernel.org/r/478f871a-583d-01f1-9cc5-2eea56d8c...@huawei.com > --- > To: Andrew Lunn > To: Heiner Kallweit > To: Russell King > To: "David S. Miller" >

Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Heiner Kallweit
Am 24.11.2020 um 16:17 schrieb Antonio Borneo: > On Tue, 2020-11-24 at 14:56 +, Russell King - ARM Linux admin wrote: >> On Tue, Nov 24, 2020 at 03:38:48PM +0100, Antonio Borneo wrote: >>> If the auto-negotiation fails to establish a gigabit link, the phy >>> can try to 'down-shift': it resets

Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift'

2020-11-24 Thread Heiner Kallweit
7;. > > Fixes: 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in > genphy_read_status") > Cc: sta...@vger.kernel.org # v5.1+ > Signed-off-by: Antonio Borneo > Link: > https://lore.kernel.org/r/478f871a-583d-01f1-9cc5-2eea56d8c...@huawei.com > --- > To:

[PATCH net-next] net: warn if gso_type isn't set for a GSO SKB

2020-11-20 Thread Heiner Kallweit
/msg690794.html Signed-off-by: Heiner Kallweit --- net/core/dev.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/core/dev.c b/net/core/dev.c index 4bfdcd6b2..3c3070d9d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3495,6 +3495,11 @@ static netdev_features_t gso_features_ch

[PATCH net-next] net: bridge: switch to net core statistics counters handling

2020-11-20 Thread Heiner Kallweit
Use netdev->tstats instead of a member of net_bridge for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Signed-off-by: Heiner Kallweit --- net/bridge/br_device.c | 31 +-- net/bridge/br_input.c |

Re: [PATCH v2] mdio_bus: suppress err message for reset gpio EPROBE_DEFER

2020-11-19 Thread Heiner Kallweit
Am 19.11.2020 um 22:41 schrieb Andrew Lunn: Doesn't checkpatch complain about line length > 80 here? >>> >>> :) >>> >>> commit bdc48fa11e46f867ea4d75fa59ee87a7f48be144 >>> Author: Joe Perches >>> Date:   Fri May 29 16:12:21 2020 -0700 >>> >>>     checkpatch/coding-style: deprecate 80-column w

Re: [PATCH v2] mdio_bus: suppress err message for reset gpio EPROBE_DEFER

2020-11-19 Thread Heiner Kallweit
Am 19.11.2020 um 22:17 schrieb Grygorii Strashko: > > > On 19/11/2020 23:11, Heiner Kallweit wrote: >> Am 19.11.2020 um 21:34 schrieb Grygorii Strashko: >>> The mdio_bus may have dependencies from GPIO controller and so got >>> deferred. Now it will print error

Re: [PATCH v2] mdio_bus: suppress err message for reset gpio EPROBE_DEFER

2020-11-19 Thread Heiner Kallweit
Am 19.11.2020 um 21:34 schrieb Grygorii Strashko: > The mdio_bus may have dependencies from GPIO controller and so got > deferred. Now it will print error message every time -EPROBE_DEFER is > returned which from: > __mdiobus_register() > |-devm_gpiod_get_optional() > without actually identifying

[PATCH net-next] r8169: use dev_err_probe in rtl_get_ether_clk

2020-11-19 Thread Heiner Kallweit
Tiny improvement, let dev_err_probe() deal with EPROBE_DEFER. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek

[PATCH net-next] r8169: reduce number of workaround doorbell rings

2020-11-19 Thread Heiner Kallweit
ed hw will trigger a tx done interrupt and we come here again (with skb != NULL) and ring the doorbell if needed Therefore skip the workaround doorbell ring if skb is NULL. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 7 +-- 1 file changed, 5 insert

Re: [PATCH V1 net 2/4] net: ena: set initial DMA width to avoid intel iommu issue

2020-11-19 Thread Heiner Kallweit
Am 19.11.2020 um 20:18 schrieb Shay Agroskin: > > Heiner Kallweit writes: > >> Am 18.11.2020 um 23:35 schrieb Heiner Kallweit: >>> Am 18.11.2020 um 22:59 schrieb Shay Agroskin: >>>> The ENA driver uses the readless mechanism, which uses DMA, to find >>

Re: [PATCH] mdio_bus: suppress err message for reset gpio EPROBE_DEFER

2020-11-19 Thread Heiner Kallweit
Am 19.11.2020 um 14:38 schrieb Grygorii Strashko: > > > On 19/11/2020 14:30, Heiner Kallweit wrote: >> Am 18.11.2020 um 15:24 schrieb Grygorii Strashko: >>> The mdio_bus may have dependencies from GPIO controller and so got >>> deferred. Now it will print error

Re: [PATCH] mdio_bus: suppress err message for reset gpio EPROBE_DEFER

2020-11-19 Thread Heiner Kallweit
Am 18.11.2020 um 15:24 schrieb Grygorii Strashko: > The mdio_bus may have dependencies from GPIO controller and so got > deferred. Now it will print error message every time -EPROBE_DEFER is > returned from: > __mdiobus_register() > |-devm_gpiod_get_optional() > without actually identifying error

Re: [PATCH V1 net 2/4] net: ena: set initial DMA width to avoid intel iommu issue

2020-11-18 Thread Heiner Kallweit
Am 18.11.2020 um 23:35 schrieb Heiner Kallweit: > Am 18.11.2020 um 22:59 schrieb Shay Agroskin: >> The ENA driver uses the readless mechanism, which uses DMA, to find >> out what the DMA mask is supposed to be. >> >> If DMA is used without setting the dma_mask first, i

Re: [PATCH V1 net 2/4] net: ena: set initial DMA width to avoid intel iommu issue

2020-11-18 Thread Heiner Kallweit
Am 18.11.2020 um 22:59 schrieb Shay Agroskin: > The ENA driver uses the readless mechanism, which uses DMA, to find > out what the DMA mask is supposed to be. > > If DMA is used without setting the dma_mask first, it causes the > Intel IOMMU driver to think that ENA is a 32-bit device and therefor

[PATCH net-next] r8169: remove not needed check in rtl8169_start_xmit

2020-11-17 Thread Heiner Kallweit
In rtl_tx() the released descriptors are zero'ed by rtl8169_unmap_tx_skb(). And in the beginning of rtl8169_start_xmit() we check that enough descriptors are free, therefore there's no way the DescOwn bit can be set here. Signed-off-by: Heiner Kallweit --- drivers/net/ethern

[PATCH net-next] net: bridge: replace struct br_vlan_stats with pcpu_sw_netstats

2020-11-17 Thread Heiner Kallweit
Struct br_vlan_stats duplicates pcpu_sw_netstats (apart from br_vlan_stats not defining an alignment requirement), therefore switch to using the latter one. Signed-off-by: Heiner Kallweit --- net/bridge/br_netlink.c | 2 +- net/bridge/br_private.h | 14 +++--- net/bridge/br_vlan.c

Re: [PATCH net] atl1c: fix error return code in atl1c_probe()

2020-11-17 Thread Heiner Kallweit
> Without this, we get data corruption and crashes on machines with 4 GB > of RAM or more. > > - Chris > > On Mon, Nov 16, 2020 at 11:14 PM Heiner Kallweit wrote: >> >> Am 17.11.2020 um 03:55 schrieb Zhang Changzhong: >>> Fix to return a negative error cod

Re: [PATCH net] atl1c: fix error return code in atl1c_probe()

2020-11-16 Thread Heiner Kallweit
Am 17.11.2020 um 03:55 schrieb Zhang Changzhong: > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 85eb5bc33717 ("net: atheros: switch from 'pci_' to 'dma_' API") > Reported-by: Hulk Robot > Signed-off-by: Zhang Chang

[PATCH RESEND net-next] r8169: remove nr_frags argument from rtl_tx_slots_avail

2020-11-16 Thread Heiner Kallweit
The only time when nr_frags isn't SKB_MAX_FRAGS is when entering rtl8169_start_xmit(). However we can use SKB_MAX_FRAGS also here because when queue isn't stopped there should always be room for MAX_SKB_FRAGS + 1 descriptors. Signed-off-by: Heiner Kallweit --- drivers/net/ethern

[PATCH net-next] r8169: remove nr_frags argument from rtl_tx_slots_avail

2020-11-15 Thread Heiner Kallweit
The only time when nr_frags isn't SKB_MAX_FRAGS is when entering rtl8169_start_xmit(). However we can use SKB_MAX_FRAGS also here because when queue isn't stopped there should always be room for MAX_SKB_FRAGS + 1 descriptors. Signed-off-by: Heiner Kallweit --- drivers/net/ethern

[PATCH net-next] net: phy: don't duplicate driver name in phy_attached_print

2020-11-15 Thread Heiner Kallweit
\ (mii_bus:phy_addr=r8169-300:00, irq=IGNORE) Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy_device.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index e13a46c25..04652603a 100644 --- a/drivers/net

[PATCH net-next] r8169: improve rtl8169_start_xmit

2020-11-14 Thread Heiner Kallweit
ull memory barrier on some platforms, therefore use smp_mb__after_atomic to avoid overhead Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c

Re: [PATCH v2 1/3] net: mac80211: use core API for updating TX/RX stats

2020-11-13 Thread Heiner Kallweit
re API instead of ieee80211_tx/rx_stats(). > > Signed-off-by: Lev Stipakov > --- > v2: also replace ieee80211_rx_stats() with dev_sw_netstats_rx_add() > Reviewed-by: Heiner Kallweit

Re: [PATCH v2 3/3] net: xfrm: use core API for updating/providing stats

2020-11-13 Thread Heiner Kallweit
ile on it, remove xfrmi_get_stats64() and replace it with > dev_get_tstats64(). > > Signed-off-by: Lev Stipakov > --- > Reviewed-by: Heiner Kallweit

Re: [PATCH v2 2/3] net: openvswitch: use core API to update/provide stats

2020-11-13 Thread Heiner Kallweit
le on it, remove internal_get_stats() and replace it > with dev_get_tstats64(). > > Signed-off-by: Lev Stipakov > --- > > v2: > - do not delete len variable and add comment why > - replace internal_get_stats() vs dev_get_tstats64() > Reviewed-by: Heiner Kallweit

[PATCH net] net: bridge: add missing counters to ndo_get_stats64 callback

2020-11-13 Thread Heiner Kallweit
In br_forward.c and br_input.c fields dev->stats.tx_dropped and dev->stats.multicast are populated, but they are ignored in ndo_get_stats64. Fixes: 28172739f0a2 ("net: fix 64 bit counters on 32 bit arches") Signed-off-by: Heiner Kallweit --- Patch will not apply cleanly on kern

Re: [PATCH 1/3] net: mac80211: use core API for updating TX stats

2020-11-12 Thread Heiner Kallweit
Am 12.11.2020 um 12:09 schrieb Lev Stipakov: > Commit d3fd65484c781 ("net: core: add dev_sw_netstats_tx_add") > has added function "dev_sw_netstats_tx_add()" to update > net device per-cpu TX stats. > > Use this function instead of ieee80211_tx_stats(). > I think you can do the same with ieee8021

Re: [PATCH 2/3] net: openvswitch: use core API for updating TX stats

2020-11-12 Thread Heiner Kallweit
Am 12.11.2020 um 12:11 schrieb Lev Stipakov: > Commit d3fd65484c781 ("net: core: add dev_sw_netstats_tx_add") has added > function "dev_sw_netstats_tx_add()" to update net device per-cpu TX > stats. > > Use this function instead of own code. While on it, replace > "len" variable with "skb->len". >

Re: [PATCH 1/3] net: mac80211: use core API for updating TX stats

2020-11-12 Thread Heiner Kallweit
Am 13.11.2020 um 00:30 schrieb Jakub Kicinski: > On Thu, 12 Nov 2020 13:09:53 +0200 Lev Stipakov wrote: >> Commit d3fd65484c781 ("net: core: add dev_sw_netstats_tx_add") >> has added function "dev_sw_netstats_tx_add()" to update >> net device per-cpu TX stats. >> >> Use this function instead of iee

Re: [PATCH 3/3] net: xfrm: use core API for updating TX stats

2020-11-12 Thread Heiner Kallweit
Am 12.11.2020 um 12:13 schrieb Lev Stipakov: > Commit d3fd65484c781 ("net: core: add dev_sw_netstats_tx_add") has added > function "dev_sw_netstats_tx_add()" to update net device per-cpu TX > stats. > > Use this function instead of own code. > LGTM. In addition you can replace xfrmi_get_stats64()

Re: [PATCH net-next 1/5] IB/hfi1: switch to core handling of rx/tx byte/packet counters

2020-11-12 Thread Heiner Kallweit
Am 12.11.2020 um 14:49 schrieb Jason Gunthorpe: > On Wed, Nov 11, 2020 at 09:03:55AM -0800, Jakub Kicinski wrote: >> On Tue, 10 Nov 2020 20:47:34 +0100 Heiner Kallweit wrote: >>> Use netdev->tstats instead of a member of hfi1_ipoib_dev_priv for storing >>> a pointer

WARNING: CPU: 2 PID: 2320 at net/core/stream.c:207 sk_stream_kill_queues+0x10d/0x120

2020-11-12 Thread Heiner Kallweit
Just got the following when running iperf3 on linux-next from yesterday. Haven't seen this error before. [ 91.508431] [ cut here ] [ 91.508642] WARNING: CPU: 2 PID: 2320 at net/core/stream.c:207 sk_stream_kill_queues+0x10d/0x120 [ 91.508755] Modules linked in: snd_h

[PATCH net-next] r8169: improve rtl_tx

2020-11-11 Thread Heiner Kallweit
icitly adds a WRITE_ONCE() to the write. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 641c94a46..891

[PATCH net-next] r8169: use READ_ONCE in rtl_tx_slots_avail

2020-11-11 Thread Heiner Kallweit
tp->dirty_tx and tp->cur_tx may be changed by a racing rtl_tx() or rtl8169_start_xmit(). Use READ_ONCE() to annotate the races and ensure that the compiler doesn't use cached values. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 3 ++- 1 file

[PATCH RFC] net: core: support managed resource allocation in ndo_open

2020-11-11 Thread Heiner Kallweit
struct net_device. All we need is a dozen lines of code. Resources then can be allocated with e.g. struct device *devm = &dev->devres_up; devm_kzalloc(devm, size, gfp); Signed-off-by: Heiner Kallweit --- include/linux/netdevice.h | 2 ++ net/core/dev.c| 15 +--

[PATCH net-next 2/5] qmi_wwan: switch to core handling of rx/tx byte/packet counters

2020-11-10 Thread Heiner Kallweit
Use netdev->tstats instead of a member of qmimux_priv for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Signed-off-by: Heiner Kallweit --- drivers/net/usb/qmi_wwan.c | 39 -- 1 file changed

[PATCH net-next 4/5] usbnet: switch to core handling of rx/tx byte/packet counters

2020-11-10 Thread Heiner Kallweit
Use netdev->tstats instead of a member of usbnet for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Signed-off-by: Heiner Kallweit --- drivers/net/usb/usbnet.c | 23 +++ include/linux/usb/usbnet.h | 6 ++

[PATCH net-next 5/5] net: usb: switch to dev_get_tstats64 and remove usbnet_get_stats64 alias

2020-11-10 Thread Heiner Kallweit
Replace usbnet_get_stats64() with new identical core function dev_get_tstats64() in all users and remove usbnet_get_stats64(). Signed-off-by: Heiner Kallweit --- drivers/net/usb/aqc111.c | 2 +- drivers/net/usb/asix_devices.c| 6 +++--- drivers/net/usb/ax88172a.c| 2

[PATCH net-next 1/5] IB/hfi1: switch to core handling of rx/tx byte/packet counters

2020-11-10 Thread Heiner Kallweit
Use netdev->tstats instead of a member of hfi1_ipoib_dev_priv for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Signed-off-by: Heiner Kallweit --- drivers/infiniband/hw/hfi1/driver.c | 4 +--- drivers/infiniband/hw/hfi1/ipoi

[PATCH net-next 3/5] qtnfmac: switch to core handling of rx/tx byte/packet counters

2020-11-10 Thread Heiner Kallweit
tricky. Best option seems to be to use the ndo_init/ndo_uninit callbacks. Signed-off-by: Heiner Kallweit --- drivers/net/wireless/quantenna/qtnfmac/core.c | 78 --- drivers/net/wireless/quantenna/qtnfmac/core.h | 4 - .../quantenna/qtnfmac/pcie/pearl_pcie.c | 4 +- .../qua

[PATCH net-next 0/5] net: switch further drivers to core functionality for handling per-cpu byte/packet counters

2020-11-10 Thread Heiner Kallweit
Switch further drivers to core functionality for handling per-cpu byte/packet counters. All changes are compile-tested only. Heiner Kallweit (5): IB/hfi1: switch to core handling of rx/tx byte/packet counters qmi_wwan: switch to core handling of rx/tx byte/packet counters qtnfmac: switch to

[PATCH net] net: phy: realtek: support paged operations on RTL8201CP

2020-11-08 Thread Heiner Kallweit
dor driver") Signed-off-by: Heiner Kallweit --- drivers/net/phy/realtek.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 2ba0d73bf..5844cf2d3 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -551,6 +551,8 @

[PATCH net-next v3 09/10] ipv4/ipv6: switch to dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_gre.c | 6 +++--- net/ipv4/ipip.c| 2 +- net/ipv6/ip6_gre.c | 6 +++--- net/ipv6/sit.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff

[PATCH net-next v3 04/10] ip6_tunnel: use ip_tunnel_get_stats64 as ndo_get_stats64 callback

2020-11-07 Thread Heiner Kallweit
Switch ip6_tunnel to the standard statistics pattern: - use dev->stats for the less frequently accessed counters - use dev->tstats for the frequently accessed counters An additional benefit is that we now have 64bit statistics also on 32bit systems. Signed-off-by: Heiner Kallweit --- ne

[PATCH net-next v3 03/10] tun: switch to net core provided statistics counters

2020-11-07 Thread Heiner Kallweit
Switch tun to the standard statistics pattern: - use netdev->stats for the less frequently accessed counters - use netdev->tstats for the frequently accessed per-cpu counters v3: - add atomic_long_t member rx_frame_errors for making counter updates atomic Signed-off-by: Heiner Ka

[PATCH net-next v3 10/10] net: remove ip_tunnel_get_stats64

2020-11-07 Thread Heiner Kallweit
After having migrated all users remove ip_tunnel_get_stats64(). Signed-off-by: Heiner Kallweit --- include/net/ip_tunnels.h | 2 -- net/ipv4/ip_tunnel_core.c | 9 - 2 files changed, 11 deletions(-) diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 02ccd3254

[PATCH net-next v3 05/10] net: switch to dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- drivers/net/bareudp.c | 2 +- drivers/net/geneve.c | 2 +- drivers/net/vxlan.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net

[PATCH net-next v3 01/10] net: core: add dev_get_tstats64 as a ndo_get_stats64 implementation

2020-11-07 Thread Heiner Kallweit
It's a frequent pattern to use netdev->stats for the less frequently accessed counters and per-cpu counters for the frequently accessed counters (rx/tx bytes/packets). Add a default ndo_get_stats64() implementation for this use case. Reviewed-by: Florian Fainelli Signed-off-by: Heiner

[PATCH net-next v3 06/10] gtp: switch to dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Acked-by: Harald Welte Signed-off-by: Heiner Kallweit --- drivers/net/gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index dc668ed28

[PATCH net-next v3 08/10] vti: switch to dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_vti.c | 2 +- net/ipv6/ip6_vti.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index b957cbee2

[PATCH net-next v3 02/10] net: dsa: use net core stats64 handling

2020-11-07 Thread Heiner Kallweit
Use netdev->tstats instead of a member of dsa_slave_priv for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Reviewed-by: Florian Fainelli Tested-by: Vladimir Oltean Signed-off-by: Heiner Kallweit --- net/dsa/dsa.c |

[PATCH net-next v3 07/10] wireguard: switch to dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Reviewed-by: Jason A. Donenfeld Signed-off-by: Heiner Kallweit --- drivers/net/wireguard/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireguard/device.c b

[PATCH net-next v3 00/10] net: add and use dev_get_tstats64

2020-11-07 Thread Heiner Kallweit
2: - add patches for replacing ip_tunnel_get_stats64 Requested additional migrations will come in a separate series. v3: - add atomic_long_t member rx_frame_errors in patch 3 for making counter updates atomic Heiner Kallweit (10): net: core: add dev_get_tstats64 as a ndo_get_stats64 implem

<    1   2   3   4   5   6   7   8   9   10   >