[PATCH] pinctrl: xway: fix copy/paste error in xrx200_grps

2017-05-28 Thread Martin Schiller
Signed-off-by: Martin Schiller <m...@dev.tdt.de> --- drivers/pinctrl/pinctrl-xway.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index d4167e2..f9e98a7 100644 --- a/drivers/pinctrl/pinctrl-xway.c +++ b/d

[PATCH] MIPS: Lantiq: Fix ASC0/ASC1 clocks

2017-05-29 Thread Martin Schiller
ASC1 is available on every Lantiq SoC (also AmazonSE) and should be enabled like the other generic xway clocks instead of ASC0, which is only available for AR9 and Danube. Signed-off-by: Martin Schiller <m...@dev.tdt.de> --- arch/mips/lantiq/xway/sysctrl.c | 3 +-- 1 file changed, 1 ins

Re: [PATCH net v5] net: lapb: Add locking to the lapb module

2021-01-22 Thread Martin Schiller
;, "lapb_start_t2timer". 3. Let lapb_unregister wait for other API functions and running timers to stop. 4. The lapb_device_event function calls lapb_disconnect_request. In order to avoid trying to hold the lock twice, add a new function named "__lapb_disconnect_request" wh

Re: [PATCH net v4] net: lapb: Add locking to the lapb module

2021-01-20 Thread Martin Schiller
disconnect_request" which assumes the lock is held, and make it called by lapb_disconnect_request and lapb_device_event. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Martin Schiller Signed-off-by: Xie He Can you please add a Changelog. What was changed in v4? --- include/n

Re: [PATCH net v2] net: lapb: Add locking to the lapb module

2021-01-19 Thread Martin Schiller
should move the actual functionality from lapb_disconnect_request() to a __lapb_disconnect_request(), and in lapb_disconnect_request() call this function including locking around it and also in lapb_device_event (without locking). Calling lapb_start_t1timer() on a "NETDEV_GOING_DOWN" event doe

Re: [PATCH AUTOSEL 5.4 075/130] net/lapb: fix t1 timer handling for LAPB_STATE_0

2021-01-05 Thread Martin Schiller
On 2020-12-24 10:49, Xie He wrote: On Wed, Dec 23, 2020 at 9:01 AM Xie He wrote: I don't think this patch is suitable for stable branches. This patch is part of a patch series that changes the lapb module from "establishing the L2 connection only when needed by L3", to "establishing the L2

Re: [PATCH net] net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event

2021-01-05 Thread Martin Schiller
he pointer. This patch fixes this problem. Fixes: a4989fa91110 ("net/lapb: support netdev events") Cc: Martin Schiller Signed-off-by: Xie He --- net/lapb/lapb_iface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index 213ea7abc9ab.

Re: [PATCH net v5] net: lapb: Add locking to the lapb module

2021-01-24 Thread Martin Schiller
On 2021-01-24 05:45, Jakub Kicinski wrote: On Fri, 22 Jan 2021 10:07:05 +0100 Martin Schiller wrote: On 2021-01-21 01:21, Xie He wrote: > In the lapb module, the timers may run concurrently with other code in > this module, and there is currently no locking to prevent the code from &g

[PATCH v2] net/x25: Fix null-ptr-deref in x25_connect

2020-10-05 Thread Martin Schiller
onnection_establishment(). Therefore x25->neighbour must not be accessed here again and x25->state is also already set to X25_STATE_0 by x25_disconnect(). Fixes: 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect") Signed-off-by: Martin Schiller --- Change from v1: als

Re: [PATCH v2] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-04 Thread Martin Schiller
On 2020-07-30 10:02, Xie He wrote: Hi Martin, I'm currently working on a plan to make all X.25 drivers (lapbether.c, x25_asy.c, hdlc_x25.c) to set dev->hard_header_len / dev->needed_headroom correctly. So that upper layers no longer need to guess how much headroom a X.25 device needs with a

Re: [net v3] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-04 Thread Martin Schiller
On 2020-08-02 21:50, Xie He wrote: In net/packet/af_packet.c, the function packet_snd first reserves a headroom of length (dev->hard_header_len + dev->needed_headroom). Then if the socket is a SOCK_DGRAM socket, it calls dev_hard_header, which calls dev->header_ops->create, to create the link

Re: [net v3] drivers/net/wan/lapbether: Use needed_headroom instead of hard_header_len

2020-08-04 Thread Martin Schiller
On 2020-08-04 21:20, Xie He wrote: On Tue, Aug 4, 2020 at 5:43 AM Martin Schiller wrote: I'm not an expert in the field, but after reading the commit message and the previous comments, I'd say that makes sense. Thanks! Shouldn't this kernel panic be intercepted by a skb_cow() before

Re: [PATCH net-next] drivers/net/wan/x25_asy: Remove an unnecessary x25_type_trans call

2020-09-13 Thread Martin Schiller
- lapbether and hdlc_x25. x25_type_trans is only called before netif_rx and not before lapb_data_received. Cc: Martin Schiller Signed-off-by: Xie He --- drivers/net/wan/x25_asy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan

Re: [PATCH net-next v7 4/5] net/x25: fix restart request/confirm handling

2020-12-09 Thread Martin Schiller
On 2020-12-09 10:17, Xie He wrote: On Wed, Dec 9, 2020 at 1:01 AM Xie He wrote: On Wed, Nov 25, 2020 at 10:36 PM Martin Schiller wrote: > > switch (nb->state) { > case X25_LINK_STATE_0: > - nb->state = X25_LINK_STATE_2; > -

Re: [PATCH net-next] net: x25: Fix handling of Restart Request and Restart Confirmation

2020-12-09 Thread Martin Schiller
are in State 2. So we don't need to check x25_t20timer_pending again. Yeah, you're right, we can actually leave that out. Acked-by: Martin Schiller

Re: [PATCH net-next] net: x25: Fix handling of Restart Request and Restart Confirmation

2020-12-09 Thread Martin Schiller
On 2020-12-09 10:52, Martin Schiller wrote: On 2020-12-09 09:16, Xie He wrote: 1. When the x25 module gets loaded, layer 2 may already be running and connected. In this case, although we are in X25_LINK_STATE_0, we still need to handle the Restart Request received, rather than ignore it. Hmm

Re: [PATCH net-next v7 4/5] net/x25: fix restart request/confirm handling

2020-12-09 Thread Martin Schiller
On 2020-12-09 23:11, Xie He wrote: On Wed, Dec 9, 2020 at 1:47 AM Xie He wrote: On Wed, Dec 9, 2020 at 1:41 AM Martin Schiller wrote: > > Right. > By the way: A "Restart Collision" is in practice a very common event to > establish the Layer 3. Oh, I see. Thanks!

Re: [PATCH net-next] net: x25: Fix handling of Restart Request and Restart Confirmation

2020-12-09 Thread Martin Schiller
On 2020-12-09 21:16, Xie He wrote: On Wed, Dec 9, 2020 at 2:31 AM Martin Schiller wrote: >> 1. When the x25 module gets loaded, layer 2 may already be running and >> connected. In this case, although we are in X25_LINK_STATE_0, we still >> need to handle the Restart Reques

Re: [PATCH net-next] net: lapbether: Consider it successful if (dis)connecting when already (dis)connected

2020-12-09 Thread Martin Schiller
driver do this, too. Looks good to me. Acked-by: Martin Schiller Cc: Martin Schiller Signed-off-by: Xie He --- drivers/net/wan/lapbether.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index b6

Re: [PATCH net] net: x25: Fix kernel crashes due to x25_disconnect releasing x25_neigh

2020-11-11 Thread Martin Schiller
disconnect") Cc: Martin Schiller Signed-off-by: Xie He --- net/x25/af_x25.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 0bbb283f23c9..8e59f9ecbeab 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -826,1

Re: [PATCH net-next RFC] MAINTAINERS: Add Martin Schiller as a maintainer for the X.25 stack

2020-11-11 Thread Martin Schiller
On 2020-11-11 22:36, Xie He wrote: Hi Martin Schiller, would you like to be a maintainer for the X.25 stack? As we know the linux-x25 mail list has stopped working for a long time. Adding you as a maintainer may make you be Cc'd for new patches so that you can review them. About 1 year ago I

Re: [PATCH net-next v3 0/6] net/x25: netdev event handling

2020-11-18 Thread Martin Schiller
On 2020-11-18 15:47, Xie He wrote: On Wed, Nov 18, 2020 at 5:59 AM Martin Schiller wrote: --- Changes to v2: o restructure complete patch-set o keep netdev event handling in layer3 (X.25) But... Won't it be better to handle L2 connections in L2 code? For example, if we are running X.25

[PATCH net-next v4 0/5] net/x25: netdev event handling

2020-11-19 Thread Martin Schiller
carrier loss correctly in lapb o drop patch for x25_neighbour param handling this may need fixes/cleanup and will be resubmitted later. Changes to v1: o fix 'subject_prefix' and 'checkpatch' warnings --- Martin Schiller (5): net/x25: handle additional netdev events net/lapb: support netdev events

[PATCH net-next v4 1/5] net/x25: handle additional netdev events

2020-11-19 Thread Martin Schiller
, as these will be handled in layer 2 (LAPB) and layer3 (X.25) will be informed by layer2 when layer2 link is established and layer3 link should be initiated. Signed-off-by: Martin Schiller --- net/x25/af_x25.c| 22 -- net/x25/x25_link.c | 6 +++--- net/x25

[PATCH net-next v4 2/5] net/lapb: support netdev events

2020-11-19 Thread Martin Schiller
sending SABM(E). Signed-off-by: Martin Schiller --- net/lapb/lapb_iface.c | 72 +++ 1 file changed, 72 insertions(+) diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index 3c03f6512c5f..52d59984fbe6 100644 --- a/net/lapb/lapb_iface.c +++ b/net

[PATCH net-next v4 4/5] net/x25: fix restart request/confirm handling

2020-11-19 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 41 + 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/net/x25/x25_link.c b/net/x25

[PATCH net-next v4 5/5] net/x25: remove x25_kill_by_device()

2020-11-19 Thread Martin Schiller
Remove obsolete function x25_kill_by_device(). It's not used any more. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 16 1 file changed, 16 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 313a6222ded9..1432a05805ab 100644 --- a/net/x25/af_x25.c

[PATCH net-next v4 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-19 Thread Martin Schiller
1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. 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 | 11 +-- 1 file changed, 9

Re: linux-x25 mail list not working

2020-11-12 Thread Martin Schiller
it seems to work again. - Martin On 11/12/2020 10:27 AM, Xie He wrote: Hi Linux maintainers, The linux-x25 mail list doesn't seem to be working. We sent a lot of emails to linux-x25 but Martin Schiller as a subscriber hasn't received a single email from the mail list. Looking at the mail list

[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

[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

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

2020-11-15 Thread Martin Schiller
handling to select the next lc (DCE=from bottom / DTE=from top) o DTE/DCE handling to set correct clear/reset/restart cause o take default facilities from neighbour settings Signed-off-by: Martin Schiller --- include/net/x25.h| 7 ++- include/uapi/linux/x25.h | 54

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

2020-11-15 Thread Martin Schiller
will get configurable through ioctls. Signed-off-by: Martin Schiller --- include/net/x25.h | 2 ++ net/x25/af_x25.c | 19 + net/x25/x25_link.c | 51 -- 3 files changed, 66 insertions(+), 6 deletions(-) diff --git a/include/net/x25.h b

[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

[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

[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

Re: [PATCH net-next v3] net/tun: Call netdev notifiers

2020-11-17 Thread Martin Schiller
On 2020-11-18 01:32, Jakub Kicinski wrote: On Mon, 16 Nov 2020 11:41:21 +0100 Martin Schiller wrote: Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Change from v2: use subject_prefix 'net-next' to fix 'fixes_present' issue Change from v1

[PATCH net-next v4] net/tun: Call netdev notifiers

2020-11-17 Thread Martin Schiller
Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Changes to v3: * Handle return value of call_netdevice_notifiers() Changes to v2: * Use subject_prefix 'net-next' to fix 'fixes_present' issue Changes to v1: * Fix 'subject_prefix

[PATCH net-next v5] net/tun: Call netdev notifiers

2020-11-17 Thread Martin Schiller
Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Changes to v4: * Fix copy'n'paste error Changes to v3: * Handle return value of call_netdevice_notifiers() Changes to v2: * Use subject_prefix 'net-next' to fix 'fixes_present' issue Changes

Re: [PATCH net-next v2 3/6] net/x25: replace x25_kill_by_device with x25_kill_by_neigh

2020-11-18 Thread Martin Schiller
On 2020-11-17 20:50, Xie He wrote: On Mon, Nov 16, 2020 at 6:00 AM Martin Schiller wrote: Remove unnecessary function x25_kill_by_device. -/* - * Kill all bound sockets on a dropped device. - */ -static void x25_kill_by_device(struct net_device *dev) -{ - struct sock *s

Re: [PATCH net-next v2 5/6] net/lapb: support netdev events

2020-11-18 Thread Martin Schiller
On 2020-11-17 19:28, Xie He wrote: On Tue, Nov 17, 2020 at 5:26 AM Martin Schiller wrote: On 2020-11-17 12:32, Xie He wrote: > > I think for a DCE, it doesn't need to initiate the L2 > connection on device-up. It just needs to wait for a connection to > come. But L3 seems

Re: [PATCH net-next v2 5/6] net/lapb: support netdev events

2020-11-18 Thread Martin Schiller
On 2020-11-18 14:46, Xie He wrote: On Wed, Nov 18, 2020 at 5:03 AM Xie He wrote: On Wed, Nov 18, 2020 at 12:49 AM Martin Schiller wrote: > > I also have a patch here that implements an "on demand" link feature, > which we used for ISDN dialing connections. > As

[PATCH net-next v3 0/6] net/x25: netdev event handling

2020-11-18 Thread Martin Schiller
and will be resubmitted later. Changes to v1: o fix 'subject_prefix' and 'checkpatch' warnings --- Martin Schiller (6): net/x25: handle additional netdev events net/lapb: fix lapb_connect_request() for DCE net/lapb: handle carrier loss correctly net/lapb: fix t1 timer handling for DCE net/x25: fix restart

[PATCH net-next v3 1/6] net/x25: handle additional netdev events

2020-11-18 Thread Martin Schiller
in an upcomming commit, where x25 params of an neighbour will get configurable through ioctls. Additionally the NETDEV_CHANGE event makes it possible to handle carrier loss and detection. Signed-off-by: Martin Schiller --- include/net/x25.h | 2 ++ net/x25/af_x25.c | 44

[PATCH net-next v3 2/6] net/lapb: fix lapb_connect_request() for DCE

2020-11-18 Thread Martin Schiller
For a DTE interface we should change to state LAPB_STATE_1 and start sending SABM(E). But for DCE interfaces, we simply should start the timer t1. Signed-off-by: Martin Schiller --- net/lapb/lapb_iface.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net/lapb

[PATCH net-next v3 3/6] net/lapb: handle carrier loss correctly

2020-11-18 Thread Martin Schiller
In case of carrier loss, clear all queues, enter state LABB_STATE_0 and stop all timers. By setting rc = LAPB_NOTCONNECTED, the upper layer is informed about the disconnect. Signed-off-by: Martin Schiller --- net/lapb/lapb_iface.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH net-next v3 4/6] net/lapb: fix t1 timer handling for DCE

2020-11-18 Thread Martin Schiller
fix t1 timer handling for DCE 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

[PATCH net-next v3 6/6] net/x25: remove x25_kill_by_device()

2020-11-18 Thread Martin Schiller
Remove unnecessary function x25_kill_by_device(). Replace the call to x25_kill_by_device() by x25_kill_by_neigh(). Therefore, also remove the call to x25_clear_forward_by_dev() in x25_route_device_down(), as this is already called by x25_kill_by_neigh(). Signed-off-by: Martin Schiller --- net

[PATCH net-next v3 5/6] net/x25: fix restart request/confirm handling

2020-11-18 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Also, the T20 timer needs to be stopped, if the link is terminated. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 45 + 1 file changed, 37

Re: [PATCH net-next] MAINTAINERS: Add Martin Schiller as a maintainer for the X.25 stack

2020-11-16 Thread Martin Schiller
On 2020-11-14 12:10, Xie He wrote: Martin Schiller is an active developer and reviewer for the X.25 code. His company is providing products based on the Linux X.25 stack. So he is a good candidate for maintainers of the X.25 code. The original maintainer of the X.25 network layer (Andrew Hendry

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

2020-11-16 Thread Martin Schiller
On 2020-11-16 09:45, Xie He wrote: Hi Martin, Thanks for the series. To get the series applied faster, could you address the warnings and failures shown on this page? https://patchwork.kernel.org/project/netdevbpf/list/?submitter=174539 Thanks! To let the netdev robot know which tree this

[PATCH net v2] net/tun: Call netdev notifiers

2020-11-16 Thread Martin Schiller
Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Change from v1: fix 'subject_prefix' and 'checkpatch' warnings --- drivers/net/tun.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index

[PATCH net-next v3] net/tun: Call netdev notifiers

2020-11-16 Thread Martin Schiller
Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller --- Change from v2: use subject_prefix 'net-next' to fix 'fixes_present' issue Change from v1: fix 'subject_prefix' and 'checkpatch' warnings --- drivers/net/tun.c | 4 1 file changed, 4

[PATCH net-next v2 0/6] netdev event handling + neighbour config

2020-11-16 Thread Martin Schiller
Martin Schiller (6): net/x25: handle additional netdev events net/x25: make neighbour params configurable net/x25: replace x25_kill_by_device with x25_kill_by_neigh net/x25: support NETDEV_CHANGE notifier net/lapb: support netdev events net/lapb: fix t1 timer handling include/net/x25

[PATCH net-next v2 1/6] net/x25: handle additional netdev events

2020-11-16 Thread Martin Schiller
in the next commit, where x25 params of an neighbour will get configurable through ioctls. Signed-off-by: Martin Schiller --- Change from v1: fix 'subject_prefix' and 'checkpatch' warnings --- include/net/x25.h | 2 ++ net/x25/af_x25.c | 26 ++ net/x25/x25_link.c

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

2020-11-16 Thread Martin Schiller
Remove unnecessary function x25_kill_by_device. Signed-off-by: Martin Schiller --- Change from v1: fix 'subject_prefix' warning --- 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

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

2020-11-16 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 --- Change from v1: fix 'subject_prefix' and 'checkpatch' warnings --- net/x25/af_x25.c | 13 + 1 file changed, 13

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

2020-11-16 Thread Martin Schiller
handling to select the next lc (DCE=from bottom / DTE=from top) o DTE/DCE handling to set correct clear/reset/restart cause o take default facilities from neighbour settings Signed-off-by: Martin Schiller --- Change from v1: o fix 'subject_prefix' and 'checkpatch' warnings o fix

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

2020-11-16 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

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

2020-11-16 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 --- Change from v1: fix

Re: [PATCH net-next v2 5/6] net/lapb: support netdev events

2020-11-17 Thread Martin Schiller
On 2020-11-16 21:16, Xie He wrote: Do you mean we will now automatically establish LAPB connections without upper layers instructing us to do so? Yes, as soon as the physical link is established, the L2 and also the L3 layer (restart handshake) is established. In this context I also noticed

Re: [PATCH net-next v2 4/6] net/x25: support NETDEV_CHANGE notifier

2020-11-17 Thread Martin Schiller
On 2020-11-17 12:41, Xie He wrote: On Mon, Nov 16, 2020 at 6:00 AM Martin Schiller wrote: This makes it possible to handle carrier lost and detection. In case of carrier lost, we shutdown layer 3 and flush all sessions. @@ -275,6 +275,19 @@ static int x25_device_event(struct notifier_block

Re: [PATCH net-next v2 5/6] net/lapb: support netdev events

2020-11-17 Thread Martin Schiller
On 2020-11-17 12:32, Xie He wrote: On Tue, Nov 17, 2020 at 1:53 AM Martin Schiller wrote: On 2020-11-16 21:16, Xie He wrote: > Do you mean we will now automatically establish LAPB connections > without upper layers instructing us to do so? Yes, as soon as the physical link is estab

Re: [PATCH net-next v5] net/tun: Call netdev notifiers

2020-11-22 Thread Martin Schiller
On 2020-11-20 19:28, Jakub Kicinski wrote: On Wed, 18 Nov 2020 07:39:19 +0100 Martin Schiller wrote: Call netdev notifiers before and after changing the device type. Signed-off-by: Martin Schiller This is a fix, right? Can you give an example of something that goes wrong without this patch

Re: [PATCH net-next v4 2/5] net/lapb: support netdev events

2020-11-22 Thread Martin Schiller
On 2020-11-21 00:50, Xie He wrote: On Fri, Nov 20, 2020 at 3:11 PM Xie He wrote: Should we also handle the NETDEV_UP event here? In previous versions of this patch series you seemed to want to establish the L2 connection on device-up. But in this patch, you didn't handle NETDEV_UP. Maybe on

Re: [PATCH net-next v4 2/5] net/lapb: support netdev events

2020-11-23 Thread Martin Schiller
On 2020-11-23 09:31, Xie He wrote: On Sun, Nov 22, 2020 at 10:55 PM Martin Schiller wrote: No, they aren't independent. The carrier can only be up if the device / interface is UP. And as far as I can see a NETDEV_CHANGE event will also only be generated on interfaces that are UP. So you

Re: [PATCH net-next v4 2/5] net/lapb: support netdev events

2020-11-23 Thread Martin Schiller
On 2020-11-23 11:08, Xie He wrote: On Mon, Nov 23, 2020 at 1:36 AM Xie He wrote: Some drivers don't support carrier status and will never change it. Their carrier status will always be UP. There will not be a NETDEV_CHANGE event. Well, one could argue that we would have to repair these

Re: [PATCH net-next v4 2/5] net/lapb: support netdev events

2020-11-23 Thread Martin Schiller
On 2020-11-23 23:09, Xie He wrote: On Mon, Nov 23, 2020 at 11:36 AM Jakub Kicinski wrote: > > From this point of view it will be the best to handle the NETDEV_UP in > > the lapb event handler and establish the link analog to the > > NETDEV_CHANGE event if the carrier is UP. > > Thanks! This

[PATCH net-next v5 0/5] net/x25: netdev event handling

2020-11-24 Thread Martin Schiller
--- Martin Schiller (5): net/x25: handle additional netdev events net/lapb: support netdev events net/lapb: fix t1 timer handling for LAPB_STATE_0 net/x25: fix restart request/confirm handling net/x25: remove x25_kill_by_device() net/lapb/lapb_iface.c | 94

[PATCH net-next v5 1/5] net/x25: handle additional netdev events

2020-11-24 Thread Martin Schiller
, as these will be handled in layer 2 (LAPB) and layer3 (X.25) will be informed by layer2 when layer2 link is established and layer3 link should be initiated. Signed-off-by: Martin Schiller --- net/x25/af_x25.c| 22 -- net/x25/x25_link.c | 6 +++--- net/x25

[PATCH net-next v5 2/5] net/lapb: support netdev events

2020-11-24 Thread Martin Schiller
and stop all timers. 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/lapb/lapb_iface.c | 94 +++ 1 file

[PATCH net-next v5 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-24 Thread Martin Schiller
1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. 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 | 11 +-- 1 file changed, 9

[PATCH net-next v5 4/5] net/x25: fix restart request/confirm handling

2020-11-24 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 41 + 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/net/x25/x25_link.c b/net/x25

[PATCH net-next v5 5/5] net/x25: remove x25_kill_by_device()

2020-11-24 Thread Martin Schiller
Remove obsolete function x25_kill_by_device(). It's not used any more. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 16 1 file changed, 16 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 313a6222ded9..1432a05805ab 100644 --- a/net/x25/af_x25.c

[PATCH net-next v6 0/5] net/x25: netdev event handling

2020-11-24 Thread Martin Schiller
. Changes to v1: o fix 'subject_prefix' and 'checkpatch' warnings --- Martin Schiller (5): net/x25: handle additional netdev events net/lapb: support netdev events net/lapb: fix t1 timer handling for LAPB_STATE_0 net/x25: fix restart request/confirm handling net/x25: remove x25_kill_by_device

[PATCH net-next v6 1/5] net/x25: handle additional netdev events

2020-11-24 Thread Martin Schiller
, as these will be handled in layer 2 (LAPB) and layer3 (X.25) will be informed by layer2 when layer2 link is established and layer3 link should be initiated. Signed-off-by: Martin Schiller --- net/x25/af_x25.c| 22 -- net/x25/x25_link.c | 6 +++--- net/x25

[PATCH net-next v6 2/5] net/lapb: support netdev events

2020-11-24 Thread Martin Schiller
and stop all timers. 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/lapb/lapb_iface.c | 94 +++ 1 file

[PATCH net-next v6 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-24 Thread Martin Schiller
1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. 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 | 11 +-- 1 file changed, 9

[PATCH net-next v6 4/5] net/x25: fix restart request/confirm handling

2020-11-24 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 41 + 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/net/x25/x25_link.c b/net/x25

[PATCH net-next v6 5/5] net/x25: remove x25_kill_by_device()

2020-11-24 Thread Martin Schiller
Remove obsolete function x25_kill_by_device(). It's not used any more. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 16 1 file changed, 16 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 313a6222ded9..1432a05805ab 100644 --- a/net/x25/af_x25.c

Re: [PATCH net-next v5 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-24 Thread Martin Schiller
On 2020-11-24 12:43, David Laight wrote: From: Martin Schiller Sent: 24 November 2020 09:36 1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. DCE interface sends N2-times DM and changes to LAPB_STATE_1 afterwards if there is no response in the meantime

Re: [PATCH net-next v6 2/5] net/lapb: support netdev events

2020-11-25 Thread Martin Schiller
On 2020-11-25 22:49, Jakub Kicinski wrote: On Tue, 24 Nov 2020 10:39:35 +0100 Martin Schiller wrote: This patch allows layer2 (LAPB) to react to netdev events itself and avoids the detour via layer3 (X.25). 1. Establish layer2 on NETDEV_UP events, if the carrier is already up. 2. Call

Re: [PATCH net-next v6 2/5] net/lapb: support netdev events

2020-11-25 Thread Martin Schiller
On 2020-11-26 01:08, Xie He wrote: Hi Martin, Since we are going to assume lapb->state would remain in LAPB_STATE_0 when the carrier is down (as understood by me. Right?), could we add a check in lapb_connect_request to reject the upper layer's "connect" instruction when the carrier is

[PATCH net-next v7 0/5] net/x25: netdev event handling

2020-11-25 Thread Martin Schiller
handling this may need fixes/cleanup and will be resubmitted later. Changes to v1: o fix 'subject_prefix' and 'checkpatch' warnings --- Martin Schiller (5): net/x25: handle additional netdev events net/lapb: support netdev events net/lapb: fix t1 timer handling for LAPB_STATE_0 net/x25: fix

[PATCH net-next v7 1/5] net/x25: handle additional netdev events

2020-11-25 Thread Martin Schiller
, as these will be handled in layer 2 (LAPB) and layer3 (X.25) will be informed by layer2 when layer2 link is established and layer3 link should be initiated. Signed-off-by: Martin Schiller --- net/x25/af_x25.c| 22 -- net/x25/x25_link.c | 6 +++--- net/x25

[PATCH net-next v7 3/5] net/lapb: fix t1 timer handling for LAPB_STATE_0

2020-11-25 Thread Martin Schiller
1. DTE interface changes immediately to LAPB_STATE_1 and start sending SABM(E). 2. 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 | 11 +-- 1 file changed, 9

[PATCH net-next v7 5/5] net/x25: remove x25_kill_by_device()

2020-11-25 Thread Martin Schiller
Remove obsolete function x25_kill_by_device(). It's not used any more. Signed-off-by: Martin Schiller --- net/x25/af_x25.c | 16 1 file changed, 16 deletions(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 313a6222ded9..1432a05805ab 100644 --- a/net/x25/af_x25.c

[PATCH net-next v7 2/5] net/lapb: support netdev events

2020-11-25 Thread Martin Schiller
and stop all timers. 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/lapb/lapb_iface.c | 82 ++- 1 file

[PATCH net-next v7 4/5] net/x25: fix restart request/confirm handling

2020-11-25 Thread Martin Schiller
We have to take the actual link state into account to handle restart requests/confirms well. Signed-off-by: Martin Schiller --- net/x25/x25_link.c | 41 + 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/net/x25/x25_link.c b/net/x25

Re: [PATCH net-next] net: x25_asy: Delete the x25_asy driver

2020-11-05 Thread Martin Schiller
On 2020-11-05 16:06, Arnd Bergmann wrote: ... Adding Martin Schiller and Andrew Hendry, plus the linux-x25 mailing list to Cc. When I last looked at the wan drivers, I think I concluded that this should still be kept around, but I do not remember why. OTOH if it was broken for a long time

Re: [PATCH v2] net/x25: Fix null-ptr-deref in x25_connect

2020-11-05 Thread Martin Schiller
On 2020-10-06 07:45, Martin Schiller wrote: This fixes a regression for blocking connects introduced by commit 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect"). The x25->neighbour is already set to "NULL" by x25_disconnect() now, while a bloc

[RESEND PATCH v2] net/x25: Fix null-ptr-deref in x25_connect

2020-11-08 Thread Martin Schiller
onnection_establishment(). Therefore x25->neighbour must not be accessed here again and x25->state is also already set to X25_STATE_0 by x25_disconnect(). Fixes: 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect") Signed-off-by: Martin Schiller --- Change from v1: als

[PATCH] net/x25: Fix null-ptr-deref in x25_connect

2020-09-28 Thread Martin Schiller
onnection_establishment(). Therefore x25->neighbour must not be accessed here again and x25->state is also already set to X25_STATE_0 by x25_disconnect(). Fixes: 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect") Signed-off-by: Martin Schiller --- net/x25/af_x25.c |

Re: [PATCH] net/x25: Fix null-ptr-deref in x25_connect

2020-09-28 Thread Martin Schiller
On 2020-09-29 03:43, David Miller wrote: From: Martin Schiller Date: Mon, 28 Sep 2020 11:23:27 +0200 diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 0bbb283f23c9..0524a5530b91 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -820,7 +820,7 @@ static int x25_connect(struct socket

Re: [PATCH net] net: hdlc_x25: Use qdisc to queue outgoing LAPB frames

2021-02-01 Thread Martin Schiller
On 2021-01-31 04:16, Xie He wrote: On Sat, Jan 30, 2021 at 11:16 AM Jakub Kicinski wrote: Sounds like too much afford for a sub-optimal workaround. The qdisc semantics are borken in the proposed scheme (double counting packets) - both in term of statistics and if user decides to add a

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Martin Schiller
ied before removing the pseudo header (as I did in my patch)? Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Martin Schiller Signed-off-by: Xie He --- net/lapb/lapb_out.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/lapb/lapb_out.c b/net/lapb/lapb_out.c

Re: [PATCH net] net: lapb: Copy the skb before sending a packet

2021-02-01 Thread Martin Schiller
On 2021-02-01 11:49, Xie He wrote: On Mon, Feb 1, 2021 at 2:05 AM Martin Schiller wrote: What kind of packages do you mean are corrupted? ETH_P_X25 or ETH_P_HDLC? I mean ETH_P_X25. I was using "lapbether.c" to test so there was no ETH_P_HDLC. I have also sent a patch here i

Re: [PATCH net] net: hdlc_x25: Use qdisc to queue outgoing LAPB frames

2021-02-01 Thread Martin Schiller
On 2021-02-01 12:38, Xie He wrote: On Mon, Feb 1, 2021 at 1:18 AM Martin Schiller wrote: I have thought about this issue again. I also have to say that I have never noticed any problems in this area before. So again for (my) understanding: When a hardware driver calls netif_stop_queue

Re: [PATCH net] net: hdlc_x25: Return meaningful error code in x25_open

2021-02-03 Thread Martin Schiller
rable") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Martin Schiller Signed-off-by: Xie He --- drivers/net/wan/hdlc_x25.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index bb164805804e.

Re: [PATCH net] net: hdlc_x25: Use qdisc to queue outgoing LAPB frames

2021-01-27 Thread Martin Schiller
On 2021-01-27 21:29, Xie He wrote: On Wed, Jan 27, 2021 at 2:14 AM David Laight wrote: If I read this correctly it adds a (potentially big) queue between the LAPB code that adds the sequence numbers to the frames and the hardware that actually sends them. Yes. The actual number of

  1   2   >