Re: [patch 21/35] net: usb: kaweth: Remove last user of kaweth_control()

2020-09-27 Thread Greg Kroah-Hartman
On Sun, Sep 27, 2020 at 09:49:07PM +0200, Thomas Gleixner wrote: > From: Sebastian Andrzej Siewior > > kaweth_async_set_rx_mode() invokes kaweth_contol() and has two callers: > > - kaweth_open() which is invoked from preemptible context > . > - kaweth_start_xmit() which holds a spinlock and has

Re: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c

2020-09-27 Thread Baptiste Jonglez
On 27-09-20, David Ahern wrote: > On 9/27/20 9:10 AM, Baptiste Jonglez wrote: > > On 27-09-20, Baptiste Jonglez wrote: > >> 1) failing IPv6 neighbours, what Alarig reported. We are seeing this > >>on a full-view BGP router with rather low amount of IPv6 traffic > >>(around 10-20 Mbps) > >

Re: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Marc Kleine-Budde
On 9/28/20 7:23 AM, Joakim Zhang wrote: + for (i = 0; i < ram_init[0].len; i++) + priv->write(0, (void __iomem *)regs + ram_init[0].offset + +sizeof(u32) * i); >>> >>> As the write function only does endian conversion, and you're writing 0 >>> here. >>> What about using io

Re: [patch 28/35] net: iwlwifi: Remove in_interrupt() from tracing macro.

2020-09-27 Thread Coelho, Luciano
On Sun, 2020-09-27 at 21:49 +0200, Thomas Gleixner wrote: > From: Sebastian Andrzej Siewior > > The usage of in_interrupt) in driver code is phased out. > > The iwlwifi_dbg tracepoint records in_interrupt() seperately, but that's > superfluous because the trace header already records all kind of

[PATCH net v3] net: phy: realtek: fix rtl8211e rx/tx delay config

2020-09-27 Thread Willy Liu
There are two chip pins named TXDLY and RXDLY which actually adds the 2ns delays to TXC and RXC for TXD/RXD latching. These two pins can config via 4.7k-ohm resistor to 3.3V hw setting, but also config via software setting (extension page 0xa4 register 0x1c bit13 12 and 11). The configuration regi

Re: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c

2020-09-27 Thread Vincent Bernat
❦ 27 septembre 2020 20:38 -07, David Ahern: > fib_rt_alloc is incremented by calls to ip6_dst_alloc. Each of your > 9,999 pings is to a unique address and hence causes a dst to be > allocated and the counter to be incremented. It is never decremented. > That is standard operating procedure. At s

Re: [PATCH] ptp: add stub function for ptp_get_msgtype()

2020-09-27 Thread Kurt Kanzenbach
On Sun Sep 27 2020, Yangbo Lu wrote: > Added the missing stub function for ptp_get_msgtype(). > > Reported-by: Randy Dunlap > Fixes: 036c508ba95e ("ptp: Add generic ptp message type function") > Signed-off-by: Yangbo Lu Oh, my bad. Thanks for fixing it. Thanks, Kurt signature.asc Description:

RE: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Joakim Zhang
> -Original Message- > From: Joakim Zhang > Sent: 2020年9月28日 10:29 > To: Marc Kleine-Budde ; linux-...@vger.kernel.org > Cc: dl-linux-imx ; netdev@vger.kernel.org > Subject: RE: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for > ECC > function > > > > -Original Messag

Re: [PATCH] xfrm: Use correct address family in xfrm_state_find

2020-09-27 Thread Steffen Klassert
On Fri, Sep 25, 2020 at 02:42:56PM +1000, Herbert Xu wrote: > Resend with proper subject. > > ---8<--- > The struct flowi must never be interpreted by itself as its size > depends on the address family. Therefore it must always be grouped > with its original family value. > > In this particular

[PATCH 2/2] virtio-net: ethtool configurable RXCSUM

2020-09-27 Thread xiangxia . m . yue
From: Tonghao Zhang Allow user configuring RXCSUM separately with ethtool -K, reusing the existing virtnet_set_guest_offloads helper that configures RXCSUM for XDP. This is conditional on VIRTIO_NET_F_CTRL_GUEST_OFFLOADS. Cc: Michael S. Tsirkin Cc: Jason Wang Signed-off-by: Tonghao Zhang ---

[PATCH 1/2] virtio-net: don't disable guest csum when disable LRO

2020-09-27 Thread xiangxia . m . yue
From: Tonghao Zhang Open vSwitch and Linux bridge will disable LRO of the interface when this interface added to them. Now when disable the LRO, the virtio-net csum is disable too. That drops the forwarding performance. Fixes: e59ff2c49ae1 ("virtio-net: disable guest csum during XDP set") Cc: Mi

Re: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c

2020-09-27 Thread David Ahern
On 9/27/20 9:10 AM, Baptiste Jonglez wrote: > On 27-09-20, Baptiste Jonglez wrote: >> 1) failing IPv6 neighbours, what Alarig reported. We are seeing this >>on a full-view BGP router with rather low amount of IPv6 traffic >>(around 10-20 Mbps) > > Ok, I found a quick way to reproduce this

Re: [PATCH RFC net-next] virtio_net: Relax queue requirement for using XDP

2020-09-27 Thread David Ahern
On 2/27/20 2:41 AM, Magnus Karlsson wrote: > I will unfortunately be after Netdevconf due to other commitments. The > plan is to send out the RFC to the co-authors of the Plumbers > presentation first, just to check the sanity of it. And after that > send it to the mailing list. Note that I have ta

[PATCH v5] ipvs: adjust the debug info in function set_tcp_state

2020-09-27 Thread longguang.yue
Outputting client,virtual,dst addresses info when tcp state changes, which makes the connection debug more clear Signed-off-by: longguang.yue --- net/netfilter/ipvs/ip_vs_proto_tcp.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp

linux-next: manual merge of the net-next tree with the net tree

2020-09-27 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/phy/Kconfig between commit: 7dbbcf496f2a ("mdio: fix mdio-thunder.c dependency & build error") from the net tree and commit: a9770eac511a ("net: mdio: Move MDIO drivers into a new subdirectory") from t

[PATCH net-next] net: vlan: Fixed signedness in vlan_group_prealloc_vid()

2020-09-27 Thread Florian Fainelli
After commit d0186842ec5f ("net: vlan: Avoid using BUG() in vlan_proto_idx()"), vlan_proto_idx() was changed to return a signed integer, however one of its called: vlan_group_prealloc_vid() was still using an unsigned integer for its return value, fix that. Fixes: d0186842ec5f ("net: vlan: Avoid u

RE: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Joakim Zhang
> -Original Message- > From: Marc Kleine-Budde > Sent: 2020年9月28日 3:58 > To: Joakim Zhang ; linux-...@vger.kernel.org > Cc: dl-linux-imx ; netdev@vger.kernel.org > Subject: Re: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for > ECC > function > > On 9/27/20 6:07 PM, Joakim

RE: [PATCH linux-can-next/flexcan 1/4] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Joakim Zhang
> -Original Message- > From: Marc Kleine-Budde > Sent: 2020年9月28日 3:56 > To: Joakim Zhang ; linux-...@vger.kernel.org > Cc: dl-linux-imx ; netdev@vger.kernel.org > Subject: Re: [PATCH linux-can-next/flexcan 1/4] can: flexcan: initialize all > flexcan > memory for ECC function > > On 9/2

Re: KASAN: stack-out-of-bounds Read in xfrm_selector_match (2)

2020-09-27 Thread Paul Moore
On Thu, Sep 24, 2020 at 11:08 PM Herbert Xu wrote: > On Mon, Sep 21, 2020 at 07:56:20AM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:eb5f95f1 Merge tag 's390-5.9-6' of git://git.kernel.org/pu.. > > git tree: upstream > > console output:

Re: [PATCH net-next v2] net: vlan: Avoid using BUG() in vlan_proto_idx()

2020-09-27 Thread Florian Fainelli
On 9/25/2020 2:20 PM, Vladimir Oltean wrote: On Fri, Sep 25, 2020 at 02:12:34PM -0700, David Miller wrote: From: Florian Fainelli Date: Thu, 24 Sep 2020 17:27:44 -0700 Applied, thanks Florian. Uh-oh, that 'negative value stored in unsigned variable' issue that the build bot reported was o

RE: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Joakim Zhang
> -Original Message- > From: Marc Kleine-Budde > Sent: 2020年9月28日 3:52 > To: Joakim Zhang ; linux-...@vger.kernel.org > Cc: dl-linux-imx ; netdev@vger.kernel.org > Subject: Re: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for > ECC > function > > On 9/27/20 6:07 PM, Joakim

[PATCH net-next 5/5] ibmvnic: create send_control_ip_offload

2020-09-27 Thread Lijun Pan
Factor send_control_ip_offload out of handle_query_ip_offload_rsp. Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 150 +++-- 1 file changed, 80 insertions(+), 70 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/i

[PATCH net-next 3/5] ibmvnic: rename send_map_query to send_query_map

2020-09-27 Thread Lijun Pan
The new name send_query_map pairs with handle_query_map_rsp. Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 928ad9e98afa..1ab3

[PATCH net-next 4/5] ibmvnic: create send_query_ip_offload

2020-09-27 Thread Lijun Pan
Factor send_query_ip_offload out of handle_request_cap_rsp to pair with handle_query_ip_offload_rsp. Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 52 +- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvn

[PATCH net-next 1/5] ibmvnic: rename send_cap_queries to send_query_cap

2020-09-27 Thread Lijun Pan
The new name send_query_cap pairs with handle_query_cap_rsp. Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index a151ff37fda2..b4

[PATCH net-next 0/5] ibmvnic: refactor some send/handle functions

2020-09-27 Thread Lijun Pan
This patch series rename and factor some send crq request functions. The new naming aligns better with handle* functions such that it make the code easier to read and search by new contributors. Lijun Pan (5): ibmvnic: rename send_cap_queries to send_query_cap ibmvnic: rename ibmvnic_send_req_

[PATCH net-next 2/5] ibmvnic: rename ibmvnic_send_req_caps to send_request_cap

2020-09-27 Thread Lijun Pan
The new name send_request_cap pairs with handle_request_cap_rsp. Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index b4dc63cad4c5..

[PATCH net] ibmvnic: set up 200GBPS speed

2020-09-27 Thread Lijun Pan
Set up the speed according to crq->query_phys_parms.rsp.speed. Fix IBMVNIC_10GBPS typo. Fixes: f8d6ae0d27ec ("ibmvnic: Report actual backing device speed and duplex values") Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 5 - drivers/net/ethernet/ibm/ibmvnic.h | 2 +- 2 f

Re: [patch 13/35] net: mdiobus: Remove WARN_ON_ONCE(in_interrupt())

2020-09-27 Thread Andrew Lunn
On Sun, Sep 27, 2020 at 09:48:59PM +0200, Thomas Gleixner wrote: > From: Sebastian Andrzej Siewior > > in_interrupt() is ill defined and does not provide what the name > suggests. The usage especially in driver code is deprecated and a tree wide > effort to clean up and consolidate the (ab)usage

[PATCH] atm: atmtcp: Constify atmtcp_v_dev_ops

2020-09-27 Thread Rikard Falkeborn
The only usage of atmtcp_v_dev_ops is to pass its address to atm_dev_register() which takes a pointer to const, and comparing its address to another address, which does not modify it. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/a

Re: [patch 00/35] net: in_interrupt() cleanup and fixes

2020-09-27 Thread David Miller
From: Thomas Gleixner Date: Sun, 27 Sep 2020 21:48:46 +0200 > in the discussion about preempt count consistency accross kernel > configurations: Please respin this against net-next, some of the patches in here are already in net-next (the wireless debug macro one) and even after that the series

Re: [PATCH net] r8169: fix RTL8168f/RTL8411 EPHY config

2020-09-27 Thread David Miller
From: Heiner Kallweit Date: Sun, 27 Sep 2020 19:44:29 +0200 > Mistakenly bit 2 was set instead of bit 3 as in the vendor driver. > > Fixes: a7a92cf81589 ("r8169: sync PCIe PHY init with vendor driver 8.047.01") > Signed-off-by: Heiner Kallweit Applied and queued up for -stable, thanks.

Re: [PATCH net-next 00/11] bnxt_en: Update for net-next.

2020-09-27 Thread David Miller
From: Michael Chan Date: Sun, 27 Sep 2020 13:42:09 -0400 > This patch series adds 2 main features to the bnxt_en driver: 200G > link speed support and FEC support with some refactoring of the > link speed logic. The firmware interface is updated to have proper > support for these 2 features. Th

Re: [RESEND PATCH] dt-bindings: net: renesas,ravb: Add support for r8a774e1 SoC

2020-09-27 Thread David Miller
From: Lad Prabhakar Date: Sun, 27 Sep 2020 13:34:39 +0100 > From: Marian-Cristian Rotariu > > Document RZ/G2H (R8A774E1) SoC bindings. > > Signed-off-by: Marian-Cristian Rotariu > > Signed-off-by: Lad Prabhakar > Reviewed-by: Sergei Shtylyov > Reviewed-by: Geert Uytterhoeven > Acked-by: R

Re: [PATCH] ptp: add stub function for ptp_get_msgtype()

2020-09-27 Thread David Miller
From: Yangbo Lu Date: Sun, 27 Sep 2020 16:01:50 +0800 > Added the missing stub function for ptp_get_msgtype(). > > Reported-by: Randy Dunlap > Fixes: 036c508ba95e ("ptp: Add generic ptp message type function") > Signed-off-by: Yangbo Lu Applied to net-next, thanks.

Re: [PATCH net-next 00/10] mlxsw: Expose transceiver overheat counter

2020-09-27 Thread David Miller
From: Ido Schimmel Date: Sun, 27 Sep 2020 10:50:05 +0300 > From: Ido Schimmel > > Amit says: > > An overheated transceiver can be the root cause of various network > problems such as link flapping. Counting the number of times a > transceiver's temperature was higher than its configured thresh

Re: [PATCH net-next 00/10] net: hns3: updates for -next

2020-09-27 Thread David Miller
From: Huazhong Tan Date: Sun, 27 Sep 2020 15:12:38 +0800 > To facilitate code maintenance and compatibility, #1 and #2 add > device version to replace pci revision, #3 to #9 adds support for > querying device capabilities and specifications, then the driver > can use these query results to implem

Re: [PATCH net] mlxsw: spectrum_acl: Fix mlxsw_sp_acl_tcam_group_add()'s error path

2020-09-27 Thread David Miller
From: Ido Schimmel Date: Sun, 27 Sep 2020 09:42:11 +0300 > From: Ido Schimmel > > If mlxsw_sp_acl_tcam_group_id_get() fails, the mutex initialized earlier > is not destroyed. > > Fix this by initializing the mutex after calling the function. This is > symmetric to mlxsw_sp_acl_tcam_group_del()

Re: [PATCH] mdio: fix mdio-thunder.c dependency & build error

2020-09-27 Thread David Miller
From: Randy Dunlap Date: Sat, 26 Sep 2020 21:33:43 -0700 > From: Randy Dunlap > > Fix build error by selecting MDIO_DEVRES for MDIO_THUNDER. > Fixes this build error: > > ld: drivers/net/phy/mdio-thunder.o: in function `thunder_mdiobus_pci_probe': > drivers/net/phy/mdio-thunder.c:78: undefined

Re: [patch 00/35] net: in_interrupt() cleanup and fixes

2020-09-27 Thread Joe Perches
On Sun, 2020-09-27 at 21:48 +0200, Thomas Gleixner wrote: > Folks, > > in the discussion about preempt count consistency accross kernel > configurations: > > https://lore.kernel.org/r/20200914204209.256266...@linutronix.de/ > > Linus clearly requested that code in drivers and libraries which

[patch 15/35] net: sfc: Replace in_interrupt() usage.

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior efx_ef10_try_update_nic_stats_vf() uses in_interrupt() to figure out whether it is safe to sleep or not. The following callers are involved: - efx_start_all() and efx_stop_all() are fully preemptible because a mutex is acquired near by. - efx_ethtool_get_stats

[patch 01/35] net: enic: Cure the enic api locking trainwreck

2020-09-27 Thread Thomas Gleixner
From: Thomas Gleixner enic_dev_wait() has a BUG_ON(in_interrupt()). Chasing the callers of enic_dev_wait() revealed the gems of enic_reset() and enic_tx_hang_reset() which are both invoked through work queues in order to be able to call rtnl_lock(). So far so good. After locking rtnl both funct

[patch 03/35] net: Add netif_rx_any_context()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior Quite some drivers make conditional decisions based on in_interrupt() to invoke either netif_rx() or netif_rx_ni(). Conditionals based on in_interrupt() or other variants of preempt count checks in drivers should not exist for various reasons and Linus clearly req

[patch 12/35] net: ionic: Remove WARN_ON(in_interrupt()).

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check

[PATCH net-next] lib8390: Replace panic() call with BUILD_BUG_ON

2020-09-27 Thread Armin Wolf
Replace panic() call in lib8390.c with BUILD_BUG_ON() since checking the size of struct e8390_pkt_hdr should happen at compile-time. Also add __packed to e8390_pkt_hdr to prevent padding. Signed-off-by: Armin Wolf --- drivers/net/ethernet/8390/8390.h| 2 +- drivers/net/ethernet/8390/lib8390.

[patch 14/35] net: natsemi: Replace in_interrupt() usage.

2020-09-27 Thread Thomas Gleixner
The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. sonic_quiesce() uses 'in_interrupt() |

[patch 11/35] net: ionic: Replace in_interrupt() usage.

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The in_interrupt() usage in this driver tries to figure out which context may sleep and which context may not sleep. in_interrupt() is not really suitable as it misses both preemption disabled and interrupt disabled invocations from task context. Conditionals like

[patch 04/35] net: caif: Use netif_rx_any_context()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. cfhsi_rx_desc() and cfhsi_rx_pld() use in_interrupt() to distinguish if they should

[patch 16/35] net: sunbmac: Replace in_interrupt() usage

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior bigmac_init_rings() has an argument signaling if it is called from the interrupt handler. This is used to decide between GFP_KERNEL and GFP_ATOMIC for memory allocations. But it also checks in_interrupt() to handle invocations which come from the timer callback bi

[patch 22/35] net: usb: net1080: Remove in_interrupt() comment

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The comment above nc_vendor_write() suggests that the function could become async so that is usable in `in_interrupt()' context or that it already is safe to be called from such a context. Eitherway: The function did not become async since v2.4.9.2 (2002) and it m

[patch 13/35] net: mdiobus: Remove WARN_ON_ONCE(in_interrupt())

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check

[patch 17/35] net: sun3lance: Remove redundant checks in interrupt handler

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior lance_interrupt() contains two pointless checks: - A check whether the 'dev_id' argument is NULL. 'dev_id' is the pointer which was handed in to request_irq() and the interrupt handler will always be invoked with that pointer as 'dev_id' argument by the cor

[patch 29/35] net: hostap: Remove in_interrupt() usage

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. hfa384x_cmd() and prism

[patch 32/35] net: libertas: Use netif_rx_any_context()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. libertas uses in_interupt() to select the netif_rx*() variant which matches the cal

[patch 24/35] net: brcmfmac: Replace in_interrupt()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior brcmf_sdio_isr() is using in_interrupt() to distinguish if it is called from a interrupt service routine or from a worker thread. Passing such information from the calling context is preferred and requested by Linus, so add an argument `in_isr' to brcmf_sdio_isr()

[patch 35/35] net: rtlwifi: Replace in_interrupt() for context detection

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior rtl_lps_enter() and rtl_lps_leave() are using in_interrupt() to detect whether it is safe to acquire a mutex or if it is required to defer to a workqueue. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes beha

[patch 30/35] net: mwifiex: Use netif_rx_any_context().

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. mwifiex uses in_interupt() to select the netif_rx*() variant which matches the call

[patch 28/35] net: iwlwifi: Remove in_interrupt() from tracing macro.

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt) in driver code is phased out. The iwlwifi_dbg tracepoint records in_interrupt() seperately, but that's superfluous because the trace header already records all kind of state and context information like hardirq status, softirq status, pr

[patch 33/35] net: rtlwifi: Remove void* casts related to delayed work

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior INIT_DELAYED_WORK() takes two arguments: A pointer to the delayed work and a function reference for the callback. The rtl code casts all function references to (void *) because the callbacks in use are not matching the required function signature. That's error pro

[patch 19/35] net: zd1211rw: Remove ZD_ASSERT(in_interrupt())

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. handle_regs_int() is al

[patch 26/35] net: brcmfmac: Convey allocation mode as argument

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. brcm

[patch 20/35] net: usb: kaweth: Replace kaweth_control() with usb_control_msg()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior kaweth_control() is almost the same as usb_control_msg() except for the memory allocation mode (GFP_ATOMIC vs GFP_NOIO) and the in_interrupt() check. All the invocations of kaweth_control() are within the probe function in fully preemtible context so there is no r

[patch 34/35] net: rtlwifi: Remove in_interrupt() from debug macro

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in drivers in is phased out. rtlwifi uses in_interrupt() in the RT_TRACE() debug macro which is sprinkled all over the driver. RT_TRACE() is almost identical to RTPRINT() which another hideous debug printk wrapper. The only difference i

Re: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Marc Kleine-Budde
On 9/27/20 6:07 PM, Joakim Zhang wrote: [...] > +static void flexcan_init_ram(struct net_device *dev) > +{ > + struct flexcan_priv *priv = netdev_priv(dev); > + struct flexcan_regs __iomem *regs = priv->regs; > + u32 reg_ctrl2; > + int i; > + > + /* 11.8.3.13 Detection and corr

[patch 10/35] net: intel: Remove in_interrupt() warnings

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the checks

[patch 23/35] net: wan/lmc: Remove lmc_trace()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior lmc_trace() was first introduced in commit e7a392d5158af ("Import 2.3.99pre6-5") and was not touched ever since. The reason for looking at this was to get rid of the in_interrupt() usage, but while looking at it the following observations were made: - At least l

[patch 25/35] net: brcmfmac: Use netif_rx_any_context().

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. brcmfmac uses in_interupt() to select the netif_rx*() variant which matches the cal

[patch 27/35] net: ipw2x00,iwlegacy,iwlwifi: Remove in_interrupt() from debug macros

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in non-core code is phased out. The debugging macros in these drivers use in_interrupt() to print 'I' or 'U' depending on the return value of in_interrupt(). While 'U' is confusing at best and 'I' is not really describing the actual con

[patch 21/35] net: usb: kaweth: Remove last user of kaweth_control()

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior kaweth_async_set_rx_mode() invokes kaweth_contol() and has two callers: - kaweth_open() which is invoked from preemptible context . - kaweth_start_xmit() which holds a spinlock and has bottom halfs disabled. If called from kaweth_start_xmit() kaweth_async_set_rx_

[patch 18/35] net: vxge: Remove in_interrupt() conditionals

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior vxge_os_dma_malloc() and vxge_os_dma_malloc_async() are both called from callchains which use GFP_KERNEL allocations unconditionally or have other requirements to be called from fully preemptible task context.. vxge_os_dma_malloc(): 1) __vxge_hw_blockpool_creat

[patch 09/35] net: fec_mpc52xx: Replace in_interrupt() usage

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. mpc5

[patch 05/35] net: atheros: Remove WARN_ON(in_interrupt())

2020-09-27 Thread Thomas Gleixner
From: Thomas Gleixner in_interrupt() is ill defined and does not provide what the name suggests. The usage especially in driver code is deprecated and a tree wide effort to clean up and consolidate the (ab)usage of in_interrupt() and related checks is happening. In this case the check covers onl

[patch 07/35] net: cxbg4: Remove pointless in_interrupt() check

2020-09-27 Thread Thomas Gleixner
From: Thomas Gleixner t4_sge_stop() is only ever called from task context and the in_interrupt() check is presumably a leftover from copying t3_sge_stop(). Aside of in_interrupt() being deprecated because it's not providing what it claims to provide, this check would paper over illegitimate call

[patch 31/35] net: libertas libertas_tf: Remove in_interrupt() from debug macro.

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior The debug macro prints (INT) when in_interrupt() returns true. The value of this information is dubious as it does not distinguish between the various contexts which are covered by in_interrupt(). As the usage of in_interrupt() in drivers is phased out and the sam

[patch 06/35] net: cxgb3: Cleanup in_interrupt() usage

2020-09-27 Thread Thomas Gleixner
From: Thomas Gleixner t3_sge_stop() is called from task context and from error handlers in interrupt context. It relies on in_interrupt() to differentiate the contexts. in_interrupt() is deprecated as it is ill defined and does not provide what it suggests. Instead of replacing it with some oth

[patch 02/35] net: caif: Remove unused caif SPI driver

2020-09-27 Thread Thomas Gleixner
From: Thomas Gleixner While chasing in_interrupt() (ab)use in drivers it turned out that the caif_spi driver has never been in use since the driver was merged 10 years ago. There never was any matching code which provides a platform device. The driver has not seen any update (asided of treewide

[patch 08/35] net: e100: Remove in_interrupt() usage and pointless GFP_ATOMIC allocation

2020-09-27 Thread Thomas Gleixner
From: Sebastian Andrzej Siewior e100_hw_init() invokes e100_self_test() only if in_interrupt() returns false as e100_self_test() uses msleep() which requires sleepable task context. The in_interrupt() check is incomplete because in_interrupt() cannot catch callers from contexts which have just pr

[patch 00/35] net: in_interrupt() cleanup and fixes

2020-09-27 Thread Thomas Gleixner
Folks, in the discussion about preempt count consistency accross kernel configurations: https://lore.kernel.org/r/20200914204209.256266...@linutronix.de/ Linus clearly requested that code in drivers and libraries which changes behaviour based on execution context should either be split up so t

Re: [PATCH linux-can-next/flexcan 1/4] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Marc Kleine-Budde
On 9/27/20 10:01 AM, Joakim Zhang wrote: > [...] >> Can you create a "static const struct" holding the reg (or offset) + len and >> loop >> over it. Something linke this? >> >> const struct struct flexcan_ram_init ram_init[] { >> void __iomem *reg; >> u16 len; >> } = { >> { >>

Re: [PATCH V2 1/3] can: flexcan: initialize all flexcan memory for ECC function

2020-09-27 Thread Marc Kleine-Budde
On 9/27/20 6:07 PM, Joakim Zhang wrote: > One issue was reported at a baremetal environment, which is used for > FPGA verification. "The first transfer will fail for extended ID > format(for both 2.0B and FD format), following frames can be transmitted > and received successfully for extended forma

[PATCH bpf-next] bpf/preload: make sure Makefile cleans up after itself, and add .gitignore

2020-09-27 Thread Toke Høiland-Jørgensen
The Makefile in bpf/preload builds a local copy of libbpf, but does not properly clean up after itself. This can lead to subsequent compilation failures, since the feature detection cache is kept around which can lead subsequent detection to fail. Fix this by properly setting clean-files, and whil

[PATCH 2/2] ath10k: Try to download pre-cal using nvmem api

2020-09-27 Thread Ansuel Smith
Most of routers that have the ath10k wifi chip integrated in the Soc have the pre-cal data stored in a dedicated nvmem partition. Introduce a new function to directly extract and use it if a nvmem with the name 'pre-cal' is defined and available. Pre-cal file have still priority to everything else.

[PATCH 1/2] ath10k: Try to get mac-address from dts

2020-09-27 Thread Ansuel Smith
Most of embedded device that have the ath10k wifi integrated store the mac-address in nvmem partitions. Try to fetch the mac-address using the standard 'of_get_mac_address' than in all the check also try to fetch the address using the nvmem api searching for a defined 'mac-address' cell. Mac-addres

[PATCH net] r8169: fix RTL8168f/RTL8411 EPHY config

2020-09-27 Thread Heiner Kallweit
Mistakenly bit 2 was set instead of bit 3 as in the vendor driver. Fixes: a7a92cf81589 ("r8169: sync PCIe PHY init with vendor driver 8.047.01") Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dr

[PATCH net-next 06/11] bnxt_en: Handle ethernet link being disabled by firmware.

2020-09-27 Thread Michael Chan
On some 200G dual port NICs, if one port is configured to 200G, firmware will disable the ethernet link on the other port. Firmware will send notification to the driver for the disabled port when this happens. Define a new field in the link_info structure to keep track of this state. The new phy

[PATCH net-next 10/11] bnxt_en: Implement ethtool set_fec_param() method.

2020-09-27 Thread Michael Chan
This feature allows the user to set the different FEC modes on the NIC port. Any new setting will take effect immediately after a link toggle. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt

[PATCH net-next 04/11] bnxt_en: add basic infrastructure to support PAM4 link speeds

2020-09-27 Thread Michael Chan
From: Edwin Peer The firmware interface has added support for new link speeds using PAM4 modulation. Expand the bnxt_link_info structure to closely mirror the new firmware structures. Add logic to copy the PAM4 capabilities and settings from the firmware. Signed-off-by: Edwin Peer Signed-off-

[PATCH net-next 08/11] bnxt_en: Report FEC settings to ethtool.

2020-09-27 Thread Michael Chan
Implement .get_fecparam() method to report the configured and active FEC settings. Also report the supported and advertised FEC settings to the .get_link_ksettings() method. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +- dri

[PATCH net-next 07/11] bnxt_en: avoid link reset if speed is not changed

2020-09-27 Thread Michael Chan
From: Edwin Peer PORT_PHY_CONFIG is always sent with REQ_FLAGS_RESET_PHY set. This flag must be set in order for the firmware to institute the requested PHY change immediately, but it results in a link flap. This is unnecessary and results in an improved user experience if the PHY reconfiguration

[PATCH net-next 09/11] bnxt_en: Report Active FEC encoding during link up.

2020-09-27 Thread Michael Chan
The current code is reporting the FEC configured settings during link up. Change it to report the more useful active FEC encoding that may be negotiated or auto detected. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 29 +++

[PATCH net-next 05/11] bnxt_en: ethtool: support PAM4 link speeds up to 200G

2020-09-27 Thread Michael Chan
From: Edwin Peer Add ethtool PAM4 link modes for: 5baseCR_Full 10baseCR2_Full 20baseCR4_Full Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 71 --- 1 file changed, 63 insertions(+),

[PATCH net-next 11/11] bnxt_en: Improve preset max value for ethtool -l.

2020-09-27 Thread Michael Chan
The current logic that calculates the preset maximum value for combined channel does not take into account the rings used for XDP and mqprio TCs. Each of these features will reduce the number of TX rings. Add the logic to divide the TX rings accordingly based on whether the device is currently in

[PATCH net-next 02/11] bnxt_en: refactor code to limit speed advertising

2020-09-27 Thread Michael Chan
From: Edwin Peer Extract the code for determining an advertised speed is no longer supported into a separate function. This will avoid some code duplication in a later patch when supporting PAM4 speeds, since these speeds are specified in a separate field. Reviewed-by: Scott Branden Signed-off-

[PATCH net-next 00/11] bnxt_en: Update for net-next.

2020-09-27 Thread Michael Chan
This patch series adds 2 main features to the bnxt_en driver: 200G link speed support and FEC support with some refactoring of the link speed logic. The firmware interface is updated to have proper support for these 2 features. The ethtool preset max channel value is also adjusted properly to acc

[PATCH net-next 03/11] bnxt_en: refactor bnxt_get_fw_speed()

2020-09-27 Thread Michael Chan
From: Edwin Peer It will be necessary to update more than one field in the link_info structure when PAM4 speeds are added in a later patch. Instead of merely translating ethtool speed values to firmware speed values, change the responsiblity of this function to update all the necessary link_info

[PATCH net-next 01/11] bnxt_en: Update firmware interface spec to 1.10.1.65.

2020-09-27 Thread Michael Chan
The main changes include FEC, ECN statistics, HWRM_PORT_PHY_QCFG response size reduction, and a new counter added to ctx_hw_stats_ext struct to support the new 58818 chip. The ctx_hw_stats_ext structure is now the superset supporting the new 58818 chips and the prior P5 chips. Add a new flag to i

Re: [PATCH] ptp: add stub function for ptp_get_msgtype()

2020-09-27 Thread Randy Dunlap
On 9/27/20 1:01 AM, Yangbo Lu wrote: > Added the missing stub function for ptp_get_msgtype(). > > Reported-by: Randy Dunlap > Fixes: 036c508ba95e ("ptp: Add generic ptp message type function") > Signed-off-by: Yangbo Lu Yes, that works. Thanks. Acked-by: Randy Dunlap # build-tested > --- >

Re: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c

2020-09-27 Thread Baptiste Jonglez
On 27-09-20, Baptiste Jonglez wrote: > 1) failing IPv6 neighbours, what Alarig reported. We are seeing this >on a full-view BGP router with rather low amount of IPv6 traffic >(around 10-20 Mbps) Ok, I found a quick way to reproduce this issue: # for net in {1..}; do ip -6 route a

Re: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c

2020-09-27 Thread Baptiste Jonglez
Hi, We are seeing the same issue, more information below. On 07-03-20, David Ahern wrote: > On 3/5/20 1:17 AM, Alarig Le Lay wrote: > > Hi, > > > > On the bird users ML, we discussed a bug we’re facing when having a > > full table: from time to time all the IPv6 traffic is dropped (and all > > n

Re: [PATCH] mdio: fix mdio-thunder.c dependency & build error

2020-09-27 Thread Andrew Lunn
On Sat, Sep 26, 2020 at 09:33:43PM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > Fix build error by selecting MDIO_DEVRES for MDIO_THUNDER. > Fixes this build error: > > ld: drivers/net/phy/mdio-thunder.o: in function `thunder_mdiobus_pci_probe': > drivers/net/phy/mdio-thunder.c:78: undefi

  1   2   >