[PATCH] net/tun: Call notifiers before and after changing device type

2020-11-15 Thread Martin Schiller
Signed-off-by: Martin Schiller --- drivers/net/tun.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index be69d272052f..8253c5b03105 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -3124,9 +3124,11 @@ static long __tun_chr_ioctl(struct file *

[PATCH 6/6] net/lapb: fix t1 timer handling

2020-11-15 Thread Martin Schiller
fix t1 timer handling in LAPB_STATE_0: o DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). o DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime. Signed-off-by: Martin Schiller --- net/lapb/lapb_timer.c

[PATCH 5/6] net/lapb: support netdev events

2020-11-15 Thread Martin Schiller
This makes it possible to handle carrier loss and detection. In case of Carrier Loss, layer 2 is terminated In case of Carrier Detection, we start timer t1 on a DCE interface, and on a DTE interface we change to state LAPB_STATE_1 and start sending SABM(E). Signed-off-by: Martin Schiller --- net

[PATCH 2/6] net/x25: make neighbour params configurable

2020-11-15 Thread Martin Schiller
Extended struct x25_neigh and x25_subscrip_struct to configure following params through SIOCX25SSUBSCRIP: o mode (DTE/DCE) o number of channels o facilities (packet size, window size) o timer T20 Based on this configuration options the follwing changes/extensions where made: o DTE/DCE ha

[PATCH 4/6] net/x25: support NETDEV_CHANGE notifier

2020-11-15 Thread Martin Schiller
This makes it possible to handle carrier lost and detection. In case of carrier lost, we shutdown layer 3 and flush all sessions. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index d98d114

[PATCH 1/6] net/x25: add/remove x25_link_device by NETDEV_REGISTER/UNREGISTER

2020-11-15 Thread Martin Schiller
and also by NETDEV_POST_TYPE_CHANGE/NETDEV_PRE_TYPE_CHANGE. This change is needed so that the x25_neigh struct for an interface is already created when it shows up and is kept independantly if the interface goes UP or DOWN. This is used in the next commit, where x25 params of an neighbour will ge

[PATCH 3/6] net/x25: replace x25_kill_by_device with x25_kill_by_neigh

2020-11-15 Thread Martin Schiller
Remove unnecessary function x25_kill_by_device. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 439ae65ab7a8..d98d1145500e 100644 --- a/net/x25/af_x25.c +++ b

Re: [PATCHv5 iproute2-next 0/5] iproute2: add libbpf support

2020-11-15 Thread Alexei Starovoitov
On Sun, Nov 15, 2020 at 10:56 PM Hangbin Liu wrote: > > This series converts iproute2 to use libbpf for loading and attaching > BPF programs when it is available. This means that iproute2 will > correctly process BTF information and support the new-style BTF-defined > maps, while keeping compatibi

Re: dsa: mv88e6xxx not receiving IPv6 multicast packets

2020-11-15 Thread Tj (Elloe Linux)
On 15/11/2020 17:27, Andrew Lunn wrote: > So check if you have an IGMP querier in the network. If not, try > turning it on in the bridge, > > ip link set br0 type bridge mcast_querier 1 Thanks Andrew - that does indeed seem to have solved the issue. I'm relieved this isn't a hardware or driver

Re: [PATCH] arm64: dts: fsl: DPAA FMan DMA operations are coherent

2020-11-15 Thread Shawn Guo
On Wed, Nov 11, 2020 at 03:33:19PM +, Madalin Bucur wrote: > > -Original Message- > > From: linux-arm-kernel On > > Behalf Of Shawn Guo > > To: Madalin Bucur (OSS) > > Subject: Re: [PATCH] arm64: dts: fsl: DPAA FMan DMA operations are > > coherent > > > > On Mon, Oct 05, 2020 at 03:4

[PATCHv5 iproute2-next 1/5] configure: add check_libbpf() for later libbpf support

2020-11-15 Thread Hangbin Liu
This patch adds a check to see if we have libbpf support. By default the system libbpf will be used, but static linking against a custom libbpf version can be achieved by passing libbpf DESTDIR to variable LIBBPF_DIR for configure. Add another variable LIBBPF_FORCE to control whether to build ipro

[PATCHv5 iproute2-next 5/5] examples/bpf: add bpf examples with BTF defined maps

2020-11-15 Thread Hangbin Liu
Users should try use the new BTF defined maps instead of struct bpf_elf_map defined maps. The tail call examples are not added yet as libbpf doesn't currently support declaratively populating tail call maps. Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- examples/bpf/README

[PATCHv5 iproute2-next 3/5] lib: add libbpf support

2020-11-15 Thread Hangbin Liu
This patch converts iproute2 to use libbpf for loading and attaching BPF programs when it is available, which is started by Toke's implementation[1]. With libbpf iproute2 could correctly process BTF information and support the new-style BTF-defined maps, while keeping compatibility with the old int

[PATCHv5 iproute2-next 0/5] iproute2: add libbpf support

2020-11-15 Thread Hangbin Liu
This series converts iproute2 to use libbpf for loading and attaching BPF programs when it is available. This means that iproute2 will correctly process BTF information and support the new-style BTF-defined maps, while keeping compatibility with the old internal map definition syntax. This is achi

[PATCHv5 iproute2-next 2/5] lib: rename bpf.c to bpf_legacy.c

2020-11-15 Thread Hangbin Liu
This is a preparation for later main libbpf support in iproute2. bpf.c is moved to bpf_legacy.c first. A new file bpf_glue.c is added which could call both legacy libbpf code. There are two wrapper functions added for ipvrf. Function bpf_prog_load() is removed as it's conflict with libbpf function

[PATCHv5 iproute2-next 4/5] examples/bpf: move struct bpf_elf_map defined maps to legacy folder

2020-11-15 Thread Hangbin Liu
Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- examples/bpf/README| 14 +- examples/bpf/{ => legacy}/bpf_cyclic.c | 2 +- examples/bpf/{ => legacy}/bpf_graft.c | 2 +- examples/bpf/{ => legacy}/bpf_map_in_map.c | 2 +- examples/

[PATCH net-next] r8153_ecm: avoid to be prior to r8152 driver

2020-11-15 Thread Hayes Wang
Avoid r8153_ecm is compiled as built-in, if r8152 driver is compiled as modules. Otherwise, the r8153_ecm would be used, even though the device is supported by r8152 driver. Fixes: c1aedf015ebd ("net/usb/r8153_ecm: support ECM mode for RTL8153") Reported-by: Marek Szyprowski Signed-off-by: Hayes

Re: [PATCH RFC] bpf, x64: allow not-converged images when BPF_JIT_ALWAYS_ON is set

2020-11-15 Thread Gary Lin
On Fri, Nov 13, 2020 at 05:48:31PM -0800, Alexei Starovoitov wrote: > On Fri, Nov 13, 2020 at 12:40 AM Gary Lin wrote: > > > > The x64 bpf jit expects the bpf images converge within the given passes. > > However there is a corner case: > > > > l0: ldh [4] > > l1: jeq #0x537d, l2, l40 >

Re: [PATCH v9,net-next,12/12] crypto: octeontx2: register with linux crypto framework

2020-11-15 Thread Herbert Xu
On Fri, Nov 13, 2020 at 08:44:40AM -0800, Jakub Kicinski wrote: > > SGTM, actually everything starting from patch 4 is in drivers/crypto, > so we can merge the first 3 into net-next and the rest via crypto? Yes of course. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herb

Re: [PATCH v2 2/2] net: qrtr: Start MHI channels during init

2020-11-15 Thread Manivannan Sadhasivam
+ath11k list On Mon, Sep 21, 2020 at 09:43:04AM +0200, Loic Poulain wrote: > Start MHI device channels so that transfers can be performed. > The MHI stack does not auto-start channels anymore. > > Signed-off-by: Loic Poulain Applied to mhi-ath11k-immutable branch! This branch will get merged in

Re: [PATCH v2 1/2] bus: mhi: Remove auto-start option

2020-11-15 Thread Manivannan Sadhasivam
+ath11k list On Mon, Sep 21, 2020 at 09:43:03AM +0200, Loic Poulain wrote: > There is really no point having an auto-start for channels. > This is confusing for the device drivers, some have to enable the > channels, others don't have... and waste resources (e.g. pre allocated > buffers) that may

Re: [PATCHv4 iproute2-next 1/5] configure: add check_libbpf() for later libbpf support

2020-11-15 Thread David Ahern
On 11/15/20 9:30 PM, Hangbin Liu wrote: > diff --git a/configure b/configure > index 3081a2ac..5ca10337 100755 > --- a/configure > +++ b/configure > @@ -5,7 +5,7 @@ > # Influential LIBBPF environment variables: > # LIBBPF_FORCE={on,off} on: require link against libbpf; > #

Re: [PATCHv4 iproute2-next 1/5] configure: add check_libbpf() for later libbpf support

2020-11-15 Thread Hangbin Liu
On Fri, Nov 13, 2020 at 08:26:51PM -0700, David Ahern wrote: > > +# Influential LIBBPF environment variables: > > +# LIBBPF_FORCE={on,off} on: require link against libbpf; > > +# off: disable libbpf probing > > +# LIBBPF_LIBDIR Path to libbpf to use > > +

Re: [PATCHv4 iproute2-next 2/5] lib: rename bpf.c to bpf_legacy.c

2020-11-15 Thread Hangbin Liu
On Fri, Nov 13, 2020 at 08:24:41PM -0700, David Ahern wrote: > On 11/9/20 12:07 AM, Hangbin Liu wrote: > > diff --git a/lib/bpf_glue.c b/lib/bpf_glue.c > > new file mode 100644 > > index ..7626a893 > > --- /dev/null > > +++ b/lib/bpf_glue.c > > ... > > > + > > +int bpf_program_load(enum b

[PATCH net-next] netfilter: nf_reject: bridge: fix build errors due to code movement

2020-11-15 Thread Randy Dunlap
Fix build errors in net/bridge/netfilter/nft_reject_bridge.ko by selecting NF_REJECT_IPV4, which provides the missing symbols. ERROR: modpost: "nf_reject_skb_v4_tcp_reset" [net/bridge/netfilter/nft_reject_bridge.ko] undefined! ERROR: modpost: "nf_reject_skb_v4_unreach" [net/bridge/netfilter/nft_

[PATCH v2] net: ftgmac100: Fix crash when removing driver

2020-11-15 Thread Joel Stanley
When removing the driver we would hit BUG_ON(!list_empty(&dev->ptype_specific)) in net/core/dev.c due to still having the NC-SI packet handler registered. # echo 1e66.ethernet > /sys/bus/platform/drivers/ftgmac100/unbind [ cut here ] kernel BUG at net/core/dev.c:10

Re: [PATCH] net: ftgmac100: Fix crash when removing driver

2020-11-15 Thread Joel Stanley
On Thu, 12 Nov 2020 at 23:22, Jakub Kicinski wrote: > > On Thu, 12 Nov 2020 11:01:45 +1030 Joel Stanley wrote: > > When removing the driver we would hit > > BUG_ON(!list_empty(&dev->ptype_specific)) > > in net/core/dev.c due to still having the NC-SI packet handler > > registered. > > > Fixes: bd

[PATCH net-next v4] net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling

2020-11-15 Thread Randy Dunlap
The previous Kconfig patch led to some other build errors as reported by the 0day bot and my own overnight build testing. These are all in when KCOV is enabled but SKB_EXTENSIONS is not enabled, so fix those by combining those conditions in the header file. Also, add stubs for skb_ext_add() and

[PATCH] brcmsmac: ampdu: Check BA window size before checking block ack

2020-11-15 Thread Dmitry Safonov
bindex can be out of BA window (64): tid 0 seq 2983, start_seq 2915, bindex 68, index 39 tid 0 seq 2984, start_seq 2915, bindex 69, index 40 tid 0 seq 2985, start_seq 2915, bindex 70, index 41 tid 0 seq 2986, start_seq 2915, bindex 71, index 42 tid 0 seq 2879, start_seq 2915, bindex 4060,

Re: [PATCH v2] net: lantiq: Wait for the GPHY firmware to be ready

2020-11-15 Thread Florian Fainelli
On 11/15/2020 8:57 AM, Martin Blumenstingl wrote: > A user reports (slightly shortened from the original message): > libphy: lantiq,xrx200-mdio: probed > mdio_bus 1e108000.switch-mii: MDIO device at address 17 is missing. > gswip 1e108000.switch lan: no phy at 2 > gswip 1e108000.switch l

[PATCH] cxbgb4: Fix build failure when CHELSIO_TLS_DEVICE=n

2020-11-15 Thread Tom Seewald
After commit 9d2e5e9eeb59 ("cxgb4/ch_ktls: decrypted bit is not enough") building the kernel with CHELSIO_T4=y and CHELSIO_TLS_DEVICE=n results in the following error: ld: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.o: in function `cxgb_select_queue': cxgb4_main.c:(.text+0x2dac): undefined refer

Re: [PATCH net-next 1/2] nfc: s3fwrn82: Add driver for Samsung S3FWRN82 NFC Chip

2020-11-15 Thread Bongsu Jeon
On Fri, Nov 13, 2020, 4:26 PM Krzysztof Kozlowski wrote: > On Fri, 13 Nov 2020 at 06:09, Bongsu Jeon wrote: > > > > > > Add driver for Samsung S3FWRN82 NFC controller. > > S3FWRN82 is using NCI protocol and I2C communication interface. > > > > Signed-off-by: Bongsu Jeon > > --- > > drivers/nfc

[PATCH net-next 3/3] nfc: s3fwrn5: Change the error code

2020-11-15 Thread Bongsu Jeon
ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP. Signed-off-by: Bongsu Jeon --- drivers/nfc/s3fwrn5/s3fwrn5.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nfc/s3fwrn5/s3fwrn5.h b/drivers/nfc/s3fwrn5/s3fwrn5.h index 9d5f34759225..bb8f936d13a2 100644 --

[PATCH net-next 2/3] nfc: s3fwrn5: Fix the misspelling in a comment

2020-11-15 Thread Bongsu Jeon
stucture should be replaced by structure. Signed-off-by: Bongsu Jeon --- drivers/nfc/s3fwrn5/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/s3fwrn5/firmware.c b/drivers/nfc/s3fwrn5/firmware.c index ec930ee2c847..4cde6dd5c019 100644 --- a/drivers/nfc/s3

[PATCH net-next 1/3] nfc: s3fwrn5: Remove the max_payload

2020-11-15 Thread Bongsu Jeon
max_payload is unused. Signed-off-by: Bongsu Jeon --- drivers/nfc/s3fwrn5/core.c| 3 +-- drivers/nfc/s3fwrn5/i2c.c | 4 +--- drivers/nfc/s3fwrn5/s3fwrn5.h | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/nfc/s3fwrn5/core.c b/drivers/nfc/s3fwrn5/core.c index

Re: [PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-15 Thread wenxu
On 11/16/2020 12:26 AM, Jamal Hadi Salim wrote: > This nagged me: > What happens if all the frags dont make it out? > Should you at least return an error code(from tcf_fragment?) > and get the action err counters incremented? Thanks, Will do. > > cheers, > jamal > > On 2020-11-15 8:05 a.m., wenxu

Re: [kbuild-all] Re: [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces

2020-11-15 Thread Rong Chen
6_64-randconfig-a005-20201115 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9a85643cd357e412cff69067bb5c4840e228c2ab) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cro

[PATCH net 4/4] bnxt_en: Avoid unnecessary NVM_GET_DEV_INFO cmd error log on VFs.

2020-11-15 Thread Michael Chan
From: Vasundhara Volam VFs do not have access permissions to issue NVM_GET_DEV_INFO firmware command. Fixes: 4933f6753b50 ("bnxt_en: Add bnxt_hwrm_nvm_get_dev_info() to query NVM info.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_e

[PATCH net 2/4] bnxt_en: Free port stats during firmware reset.

2020-11-15 Thread Michael Chan
Firmware is unable to retain the port counters during any kind of fatal or non-fatal resets, so we must clear the port counters to avoid false detection of port counter overflow. Fixes: fea6b3335527 ("bnxt_en: Accumulate all counters.") Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signe

[PATCH net 3/4] bnxt_en: Fix counter overflow logic.

2020-11-15 Thread Michael Chan
bnxt_add_one_ctr() adds a hardware counter to a software counter and adjusts for the hardware counter wraparound against the mask. The logic assumes that the hardware counter is always smaller than or equal to the mask. This assumption is mostly correct. But in some cases if the firmware is olde

[PATCH net 0/4] bnxt_en: Bug fixes.

2020-11-15 Thread Michael Chan
This first patch fixes a module eeprom A2h addressing issue. The next 2 patches fix counter related issues. The last one skips an unsupported firmware call on the VF to avoid the error log. Please queue the 1st 3 patches for -stable. Thanks. Edwin Peer (1): bnxt_en: read EEPROM A2h address u

[PATCH net 1/4] bnxt_en: read EEPROM A2h address using page 0

2020-11-15 Thread Michael Chan
From: Edwin Peer The module eeprom address range returned by bnxt_get_module_eeprom() should be 256 bytes of A0h address space, the lower half of the A2h address space, and page 0 for the upper half of the A2h address space. Fix the firmware call by passing page_number 0 for the A2h slave addres

[PATCH] ipv4: use IS_ENABLED instead of ifdef

2020-11-15 Thread Florian Klink
Checking for ifdef CONFIG_x fails if CONFIG_x=m. Use IS_ENABLED instead, which is true for both built-ins and modules. Otherwise, a > ip -4 route add 1.2.3.4/32 via inet6 fe80::2 dev eth1 fails with the message "Error: IPv6 support not enabled in kernel." if CONFIG_IPV6 is `m`. In the spirit of

[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/ethernet/realtek/r8169_

Re: [PATCH RESEND net-next 06/18] net: phy: marvell: remove the use of .ack_interrupt()

2020-11-15 Thread Andrew Lunn
On Fri, Nov 13, 2020 at 06:52:14PM +0200, Ioana Ciornei wrote: > From: Ioana Ciornei > > In preparation of removing the .ack_interrupt() callback, we must replace > its occurrences (aka phy_clear_interrupt), from the 2 places where it is > called from (phy_enable_interrupts and phy_disable_interr

[PATCH v3 1/1] page_frag: Recover from memory pressure

2020-11-15 Thread Dongli Zhang
The ethernet driver may allocate skb (and skb->data) via napi_alloc_skb(). This ends up to page_frag_alloc() to allocate skb->data from page_frag_cache->va. During the memory pressure, page_frag_cache->va may be allocated as pfmemalloc page. As a result, the skb->pfmemalloc is always true as skb->

Re: [PATCH v2 1/1] page_frag: Recover from memory pressure

2020-11-15 Thread Dongli Zhang
On 11/15/20 4:18 AM, Matthew Wilcox wrote: > On Sat, Nov 14, 2020 at 10:51:06PM -0800, Dongli Zhang wrote: >> +if (nc->pfmemalloc) { > > You missed the unlikely() change that Eric recommended. > Thank you very much. I missed that email. I will send v3. Dongli Zhang

Re: general protection fault in wext_handle_ioctl

2020-11-15 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:e28c0d7c Merge branch 'akpm' (patches from Andrew) git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15cd1cc250 kernel config: https://syzkaller.appspot.com/x/.config?x=37bf5609aacce0b6

[PATCH RFC v2 3/5] net: stmmac: dwmac-meson8b: use picoseconds for the RGMII RX delay

2020-11-15 Thread Martin Blumenstingl
Amlogic Meson G12A, G12B and SM1 SoCs have a more advanced RGMII RX delay register which allows picoseconds precision. Parse the new "amlogic,rgmii-rx-delay-ps" property or fall back to the old "amlogic,rx-delay-ns". Signed-off-by: Martin Blumenstingl --- .../ethernet/stmicro/stmmac/dwmac-meson8

Re: [PATCH v6] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces

2020-11-15 Thread Marc Kleine-Budde
On 11/14/20 4:22 PM, Vincent Mailhol wrote: > This driver supports the ES581.4, ES582.1 and ES584.1 interfaces from > ETAS GmbH (https://www.etas.com/en/products/es58x.php). > > Co-developed-by: Arunachalam Santhanam > Signed-off-by: Arunachalam Santhanam > Signed-off-by: Vincent Mailhol The d

[PATCH RFC v2 1/5] dt-bindings: net: dwmac-meson: use picoseconds for the RGMII RX delay

2020-11-15 Thread Martin Blumenstingl
Amlogic Meson G12A, G12B and SM1 SoCs have a more advanced RGMII RX delay register which allows picoseconds precision. Deprecate the old "amlogic,rx-delay-ns" in favour of a new "amlogic,rgmii-rx-delay-ps" property. For older SoCs the only known supported values were 0ns and 2ns. The new SoCs have

[PATCH RFC v2 5/5] net: stmmac: dwmac-meson8b: add support for the RGMII RX delay on G12A

2020-11-15 Thread Martin Blumenstingl
Amlogic Meson G12A (and newer: G12B, SM1) SoCs have a more advanced RX delay logic. Instead of fine-tuning the delay in the nanoseconds range it now allows tuning in 200 picosecond steps. This support comes with new bits in the PRG_ETH1[19:16] register. Add support for validating the RGMII RX dela

[PATCH RFC v2 0/5] dwmac-meson8b: picosecond precision RX delay support

2020-11-15 Thread Martin Blumenstingl
Hello, with the help of Jianxin Pan (many thanks!) the meaning of the "new" PRG_ETH1[19:16] register bits on Amlogic Meson G12A, G12B and SM1 SoCs are finally known. These SoCs allow fine-tuning the RGMII RX delay in 200ps steps (contrary to what I have thought in the past [0] these are not some "

[PATCH RFC v2 2/5] net: stmmac: dwmac-meson8b: fix enabling the timing-adjustment clock

2020-11-15 Thread Martin Blumenstingl
The timing-adjustment clock only has to be enabled when a) there is a 2ns RX delay configured using device-tree and b) the phy-mode indicates that the RX delay should be enabled. Only enable the RX delay if both are true, instead of (by accident) also enabling it when there's the 2ns RX delay conf

[PATCH RFC v2 4/5] net: stmmac: dwmac-meson8b: move RGMII delays into a separate function

2020-11-15 Thread Martin Blumenstingl
Newer SoCs starting with the Amlogic Meson G12A have more a precise RGMII RX delay configuration register. This means more complexity in the code. Extract the existing RGMII delay configuration code into a separate function to make it easier to read/understand even when adding more logic in the fut

Re: pull-request: can 2020-11-14

2020-11-15 Thread Marc Kleine-Budde
e new date tag of today (15th). It's linux-can-fixes-for-5.10-20201115, for the pull request see: https://lore.kernel.org/r/20201115174131.2089251-1-...@pengutronix.de regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www

[net 14/15] can: m_can: Fix freeing of can device from peripherials

2020-11-15 Thread Marc Kleine-Budde
From: Dan Murphy Fix leaking netdev device from peripherial devices. The call to allocate the netdev device is made from and managed by the peripherial. Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework") Reported-by: Marc Kleine-Budde Signed-off-by: Dan Murphy Link: http://l

[net 09/15] can: tcan4x5x: replace depends on REGMAP_SPI with depends on SPI

2020-11-15 Thread Marc Kleine-Budde
From: Enric Balletbo i Serra regmap is a library function that gets selected by drivers that need it. No driver modules should depend on it. Instead depends on SPI and select REGMAP_SPI. Depending on REGMAP_SPI makes this driver only build if another driver already selected REGMAP_SPI, as the sym

[net 08/15] can: flexcan: fix failure handling of pm_runtime_get_sync()

2020-11-15 Thread Marc Kleine-Budde
From: Zhang Qilong pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it wil

[net 03/15] can: dev: can_restart(): post buffer from the right context

2020-11-15 Thread Marc Kleine-Budde
From: Alejandro Concepcion Rodriguez netif_rx() is meant to be called from interrupt contexts. can_restart() may be called by can_restart_work(), which is called from a worqueue, so it may run in process context. Use netif_rx_ni() instead. Fixes: 39549eef3587 ("can: CAN Network device driver and

[net 10/15] can: tcan4x5x: tcan4x5x_can_probe(): add missing error checking for devm_regmap_init()

2020-11-15 Thread Marc Kleine-Budde
This patch adds the missing error checking when initializing the regmap interface fails. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Cc: Dan Murphy Link: http://lore.kernel.org/r/20201019154233.1262589-7-...@pengutronix.de Signed-off-by: Marc Kleine-Budde --- driver

[net 02/15] can: af_can: prevent potential access of uninitialized member in canfd_rcv()

2020-11-15 Thread Marc Kleine-Budde
From: Anant Thazhemadam In canfd_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once(). Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CANFD_MAX_DLEN) separately after the skb->l

[net 01/15] can: af_can: prevent potential access of uninitialized member in can_rcv()

2020-11-15 Thread Marc Kleine-Budde
From: Anant Thazhemadam In can_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once(). Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CAN_MAX_DLEN) separately after the skb->len's

[net 12/15] can: m_can: m_can_handle_state_change(): fix state change

2020-11-15 Thread Marc Kleine-Budde
From: Wu Bo m_can_handle_state_change() is called with the new_state as an argument. In the switch statements for CAN_STATE_ERROR_ACTIVE, the comment and the following code indicate that a CAN_STATE_ERROR_WARNING is handled. This patch fixes this problem by changing the case to CAN_STATE_ERROR_

[net 11/15] can: tcan4x5x: tcan4x5x_can_remove(): fix order of deregistration

2020-11-15 Thread Marc Kleine-Budde
Change the order in tcan4x5x_can_remove() to be the exact inverse of tcan4x5x_can_probe(). First m_can_class_unregister(), then power down the device. Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel") Cc: Dan Murphy Link: http://lore.kernel.org/r/20201019154233.1262589-10-.

[net 05/15] can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb()

2020-11-15 Thread Marc Kleine-Budde
The driver has to first fill the skb with data and then handle it to can_put_echo_skb(). This patch moves the can_put_echo_skb() down, right before sending the skb out via USB. Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analyzer") Cc: Remigiusz Kołłątaj Link: https://

[net 04/15] can: ti_hecc: Fix memleak in ti_hecc_probe

2020-11-15 Thread Marc Kleine-Budde
From: Zhang Qilong In the error handling, we should goto the probe_exit_candev to free ndev to prevent memory leak. Fixes: dabf54dd1c63 ("can: ti_hecc: Convert TI HECC driver to DT only driver") Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201114111708.3465543-1-zhangqilo...@hu

[net 07/15] can: flexcan: flexcan_setup_stop_mode(): add missing "req_bit" to stop mode property comment

2020-11-15 Thread Marc Kleine-Budde
In the patch d9b081e3fc4b ("can: flexcan: remove ack_grp and ack_bit handling from driver") the unused ack_grp and ack_bit were removed from the driver. However in the comment, the "req_bit" was accidentally removed, too. This patch adds back the "req_bit" bit. Fixes: d9b081e3fc4b ("can: f

pull-request: can 2020-11-15

2020-11-15 Thread Marc Kleine-Budde
rds, Marc --- The following changes since commit ceb736e1d45c253f5e86b185ca9b497cdd43063f: ipv6: Fix error path to cancel the meseage (2020-11-13 18:20:00 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git tags/linux-can-fixes-for-5.10-20201115 for you to fetch chan

[net 15/15] can: m_can: m_can_stop(): set device to software init mode before closing

2020-11-15 Thread Marc Kleine-Budde
From: Faiz Abbas There might be some requests pending in the buffer when the interface close sequence occurs. In some devices, these pending requests might lead to the module not shutting down properly when m_can_clk_stop() is called. Therefore, move the device to init state before potentially p

[net 13/15] can: m_can: m_can_class_free_dev(): introduce new function

2020-11-15 Thread Marc Kleine-Budde
From: Dan Murphy This patch creates a common function that peripherials can call to free the netdev device when failures occur. Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework") Reported-by: Marc Kleine-Budde Signed-off-by: Dan Murphy Link: http://lore.kernel.org/r/20200227

[net 06/15] can: peak_usb: fix potential integer overflow on shift of a int

2020-11-15 Thread Marc Kleine-Budde
From: Colin Ian King The left shift of int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to a signed 64 bit variable. In the case where time_ref->adapter->ts_used_bits is 32 or more this can lead to an oveflow. Avoid this by shifting using the BIT_ULL macro inst

Re: dsa: mv88e6xxx not receiving IPv6 multicast packets

2020-11-15 Thread Andrew Lunn
> Using tcpdump I *think* enp2s0 (wired link direct into lan1 on 'good') > always showed the laptop sending multicast listener report v2 packets on > a regular cadence of about 60-100 seconds as well as the DHCPv6 > solicit/renews and that cadence matched when the timers on the output of > "bridge

Re: dsa: mv88e6xxx not receiving IPv6 multicast packets

2020-11-15 Thread Tj (Elloe Linux)
[On 15/11/2020 16:02, Andrew Lunn wrote: > What might be interesting is running > > ip monitor > > and > > bridge monitor > > Look for neighbours being timed out do to inactivity. Funny you write that! This afternoon I've narrowed it down although I still don't understand the 'why'. Watching

[RESEND,net-next,PATCH v5 1/3] Fix unefficient call to memset before memcpu in nla_strlcpy.

2020-11-15 Thread laniel_francis
From: Francis Laniel Before this commit, nla_strlcpy first memseted dst to 0 then wrote src into it. This is inefficient because bytes whom number is less than src length are written twice. This patch solves this issue by first writing src into dst then fill dst with 0's. Note that, in the case

[RESEND,net-next,PATCH v5 2/3] Modify return value of nla_strlcpy to match that of strscpy.

2020-11-15 Thread laniel_francis
From: Francis Laniel nla_strlcpy now returns -E2BIG if src was truncated when written to dst. It also returns this error value if dstsize is 0 or higher than INT_MAX. For example, if src is "foo\0" and dst is 3 bytes long, the result will be: 1. "foG" after memcpy (G means garbage). 2. "fo\0" af

[RESEND,net-next,PATCH v5 3/3] treewide: rename nla_strlcpy to nla_strscpy.

2020-11-15 Thread laniel_francis
From: Francis Laniel Calls to nla_strlcpy are now replaced by calls to nla_strscpy which is the new name of this function. Signed-off-by: Francis Laniel Reviewed-by: Kees Cook --- drivers/infiniband/core/nldev.c| 10 +- drivers/net/can/vxcan.c| 4 ++--

[RESEND,net-next,PATCH v5 0/3] Fix inefficiences and rename nla_strlcpy

2020-11-15 Thread laniel_francis
From: Francis Laniel Hi. I hope you are all fine and the same for your relatives. This patch set answers to first three issues listed in: https://github.com/KSPP/linux/issues/110 To sum up, the patch contributions are the following: 1. the first patch fixes an inefficiency where some bytes in

Re: [PATCH v2] net: lantiq: Wait for the GPHY firmware to be ready

2020-11-15 Thread Hauke Mehrtens
On 11/15/20 5:57 PM, Martin Blumenstingl wrote: A user reports (slightly shortened from the original message): libphy: lantiq,xrx200-mdio: probed mdio_bus 1e108000.switch-mii: MDIO device at address 17 is missing. gswip 1e108000.switch lan: no phy at 2 gswip 1e108000.switch lan: faile

Re: [PATCH v5 0/3] Fix inefficiences and rename nla_strlcpy

2020-11-15 Thread Francis Laniel
Le dimanche 15 novembre 2020, 01:18:37 CET Jakub Kicinski a écrit : > On Fri, 13 Nov 2020 10:56:26 -0800 Kees Cook wrote: > > Thanks! This looks good to me. > > > > Jakub, does this look ready to you? > > Yup, looks good, sorry! > > But it didn't get into patchwork cleanly :/ > > One more resen

Re: pull-request: can 2020-11-14

2020-11-15 Thread Marc Kleine-Budde
On 11/15/20 2:39 AM, Jakub Kicinski wrote: > On Sat, 14 Nov 2020 17:35:01 -0800 Jakub Kicinski wrote: >> Two invalid fixes tags here, do you want to respin or should I pull? Let me respin this. It'll have the new date tag of today (15th). > Just realized you probably have these objects in your tr

Re: [PATCH] net: lantiq: Wait for the GPHY firmware to be ready

2020-11-15 Thread Martin Blumenstingl
Hi Andrew, On Sun, Nov 15, 2020 at 4:57 PM Andrew Lunn wrote: > > > Add a 300ms delay after initializing all GPHYs to ensure that the GPHY > > firmware had enough time to initialize and to appear on the MDIO bus. > > Unfortunately there is no (known) documentation on what the minimum time > > to

[PATCH v2] net: lantiq: Wait for the GPHY firmware to be ready

2020-11-15 Thread Martin Blumenstingl
A user reports (slightly shortened from the original message): libphy: lantiq,xrx200-mdio: probed mdio_bus 1e108000.switch-mii: MDIO device at address 17 is missing. gswip 1e108000.switch lan: no phy at 2 gswip 1e108000.switch lan: failed to connect to port 2: -19 lantiq,xrx200-net 1e10b3

Re: [RFC PATCH 1/2] ppp: add PPPIOCBRIDGECHAN ioctl

2020-11-15 Thread Guillaume Nault
On Tue, Nov 10, 2020 at 12:04:29PM +, Tom Parkin wrote: > On Tue, Nov 10, 2020 at 00:24:01 +0100, Guillaume Nault wrote: > > On Fri, Nov 06, 2020 at 06:16:46PM +, Tom Parkin wrote: > > > + err = 0; > > > + } > > > + spin_unlock_bh(&pn

Re: [PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-15 Thread Jamal Hadi Salim
This nagged me: What happens if all the frags dont make it out? Should you at least return an error code(from tcf_fragment?) and get the action err counters incremented? cheers, jamal On 2020-11-15 8:05 a.m., wenxu wrote: 在 2020/11/15 2:05, Cong Wang 写道: On Wed, Nov 11, 2020 at 9:44 PM wrote

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

2020-11-15 Thread Heiner Kallweit
Currently we print the driver name twice in phy_attached_print(): - phy_dev_info() prints it as part of the device info - and we print it as part of the info string This is a little bit ugly, it makes the info harder to read, especially if the driver name is a little bit longer. Therefore omit the

Re: dsa: mv88e6xxx not receiving IPv6 multicast packets

2020-11-15 Thread Andrew Lunn
> At some point, with absolutely nothing showing in any Mox log in the > meantime, additional renewals will fail. What might be interesting is running ip monitor and bridge monitor Look for neighbours being timed out do to inactivity. Andrew

Re: [PATCH] net: lantiq: Wait for the GPHY firmware to be ready

2020-11-15 Thread Andrew Lunn
> Add a 300ms delay after initializing all GPHYs to ensure that the GPHY > firmware had enough time to initialize and to appear on the MDIO bus. > Unfortunately there is no (known) documentation on what the minimum time > to wait after releasing the reset on an internal PHY so play safe and > take

Re: [PATCH net-next v2 00/13] mptcp: improve multiple xmit streams support

2020-11-15 Thread Paolo Abeni
On Sat, 2020-11-14 at 13:05 -0800, Jakub Kicinski wrote: > On Thu, 12 Nov 2020 18:45:20 +0100 Paolo Abeni wrote: > > This series improves MPTCP handling of multiple concurrent > > xmit streams. > > Umpf, looks like it no longer applies after the net->net-next merge. > Please respin. Strange: I ju

Re: [PATCH v1 net-next] net: dsa: qca: ar9331: add ethtool stats support

2020-11-15 Thread Andrew Lunn
On Sun, Nov 15, 2020 at 08:35:33AM +0100, Oleksij Rempel wrote: > Add stats support for the ar9331 switch. > > Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Andrew

[PATCH net-next 0/2] TLS TX HW offload for Bond

2020-11-15 Thread Tariq Toukan
Hi, This series opens TLS TX HW offload for bond interfaces. This allows bond interfaces to benefit from capable slave devices. The first patch adds real_dev field in TLS context structure, and aligns usages in TLS module and supporting drivers. The second patch opens the offload for bond interfa

[PATCH net-next 2/2] bond: Add TLS TX offload support

2020-11-15 Thread Tariq Toukan
Implement TLS TX device offload for bonding interfaces. This allows kTLS sockets running on a bond to benefit from the device offload on capable slaves. To allow a simple and fast maintenance of the TLS context in SW and slaves devices, we bind the TLS socket to a specific slave in the tls_dev_add

[PATCH net-next 1/2] net/tls: Add real_dev field to TLS context

2020-11-15 Thread Tariq Toukan
Save the real device for the TLS context. Upper devices that support TLS offload should init real_dev to point to the slave dev in tls_dev_add(). Lower device drivers should work only against real_dev. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Reviewed-by: Boris Pismenny ---

[PATCH net V2] net/tls: Fix wrong record sn in async mode of device resync

2020-11-15 Thread Tariq Toukan
In async_resync mode, we log the TCP seq of records until the async request is completed. Later, in case one of the logged seqs matches the resync request, we return it, together with its record serial number. Before this fix, we mistakenly returned the serial number of the current record instead

Re: [PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-15 Thread wenxu
在 2020/11/15 2:05, Cong Wang 写道: > On Wed, Nov 11, 2020 at 9:44 PM wrote: >> diff --git a/net/sched/act_frag.c b/net/sched/act_frag.c >> new file mode 100644 >> index 000..3a7ab92 >> --- /dev/null >> +++ b/net/sched/act_frag.c > It is kinda confusing to see this is a module. It provides some

Re: [PATCH RFC v3] ipvs: add genetlink cmd to dump all services and destinations

2020-11-15 Thread Julian Anastasov
Hello, On Tue, 10 Nov 2020, Cezar Sa Espinola wrote: > A common operation for userspace applications managing ipvs is to dump all > services and all destinations and then sort out what needs to be done. > Previously this could only be accomplished by issuing 1 netlink > IPVS_CMD_GET_SER

Re: [PATCH] phy: phylink: Fix CuSFP issue in phylink

2020-11-15 Thread Russell King - ARM Linux admin
On Wed, Nov 11, 2020 at 09:52:18AM +0100, Bjarni Jonasson wrote: > > Russell King - ARM Linux admin writes: > > > On Tue, Nov 10, 2020 at 03:16:34PM +0100, Bjarni Jonasson wrote: > >> > >> Russell King - ARM Linux admin writes: > >> > >> > On Tue, Nov 10, 2020 at 11:06:42AM +0100, Bjarni Jonasson

Re: [PATCH v2 1/1] page_frag: Recover from memory pressure

2020-11-15 Thread Matthew Wilcox
On Sat, Nov 14, 2020 at 10:51:06PM -0800, Dongli Zhang wrote: > + if (nc->pfmemalloc) { You missed the unlikely() change that Eric recommended.

Re: [RFC PATCH 0/2] add ppp_generic ioctl to bridge channels

2020-11-15 Thread Guillaume Nault
On Tue, Nov 10, 2020 at 11:54:07AM +, Tom Parkin wrote: > On Mon, Nov 09, 2020 at 23:51:53 +0100, Guillaume Nault wrote: > > BTW, shouldn't we have an "UNBRIDGE" command to remove the bridge > > between two channels? > > I'm not sure of the usecase for it to be honest. Do you have > somethin

[net] net/tls: missing received data after fast remote close

2020-11-15 Thread Vadim Fedorenko
In case when tcp socket received FIN after some data and the parser haven't started before reading data caller will receive an empty buffer. This behavior differs from plain TCP socket and leads to special treating in user-space. Patch unpauses parser directly if we have unparsed data in tcp receiv

  1   2   >