Commit f8ae7bbe authored by Xie He's avatar Xie He Committed by Jakub Kicinski

net: x25_asy: Delete the x25_asy driver

This driver transports LAPB (X.25 link layer) frames over TTY links.

I can safely say that this driver has no actual user because it was
not working at all until:
commit 8fdcabea ("drivers/net/wan/x25_asy: Fix to make it work")

The code in its current state still has problems:

1.
The uses of "struct x25_asy" in x25_asy_unesc (when receiving) and in
x25_asy_write_wakeup (when sending) are not protected by locks against
x25_asy_change_mtu's changing of the transmitting/receiving buffers.
Also, all "netif_running" checks in this driver are not protected by
locks against the ndo_stop function.

2.
The driver stops all TTY read/write when the netif is down.
I think this is not right because this may cause the last outgoing frame
before the netif goes down to be incompletely transmitted, and the first
incoming frame after the netif goes up to be incompletely received.

And there may also be other problems.

I was planning to fix these problems but after recent discussions about
deleting other old networking code, I think we may just delete this
driver, too.
Signed-off-by: default avatarXie He <xie.he.0141@gmail.com>
Acked-by: default avatarMartin Schiller <ms@dev.tdt.de>
Link: https://lore.kernel.org/r/20201105073434.429307-1-xie.he.0141@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0012eeb3
...@@ -84,7 +84,6 @@ PPP_MAGIC 0x5002 ppp ``include/linux/ ...@@ -84,7 +84,6 @@ PPP_MAGIC 0x5002 ppp ``include/linux/
SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h`` SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h``
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
STRIP_MAGIC 0x5303 strip ``drivers/net/strip.c`` STRIP_MAGIC 0x5303 strip ``drivers/net/strip.c``
X25_ASY_MAGIC 0x5303 x25_asy ``drivers/net/x25_asy.h``
SIXPACK_MAGIC 0x5304 sixpack ``drivers/net/hamradio/6pack.h`` SIXPACK_MAGIC 0x5304 sixpack ``drivers/net/hamradio/6pack.h``
AX25_MAGIC 0x5316 ax_disp ``drivers/net/mkiss.h`` AX25_MAGIC 0x5316 ax_disp ``drivers/net/mkiss.h``
TTY_MAGIC 0x5401 tty_struct ``include/linux/tty.h`` TTY_MAGIC 0x5401 tty_struct ``include/linux/tty.h``
......
...@@ -90,7 +90,6 @@ PPP_MAGIC 0x5002 ppp ``include/linux/ ...@@ -90,7 +90,6 @@ PPP_MAGIC 0x5002 ppp ``include/linux/
SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h`` SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h``
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
STRIP_MAGIC 0x5303 strip ``drivers/net/strip.c`` STRIP_MAGIC 0x5303 strip ``drivers/net/strip.c``
X25_ASY_MAGIC 0x5303 x25_asy ``drivers/net/x25_asy.h``
SIXPACK_MAGIC 0x5304 sixpack ``drivers/net/hamradio/6pack.h`` SIXPACK_MAGIC 0x5304 sixpack ``drivers/net/hamradio/6pack.h``
AX25_MAGIC 0x5316 ax_disp ``drivers/net/mkiss.h`` AX25_MAGIC 0x5316 ax_disp ``drivers/net/mkiss.h``
TTY_MAGIC 0x5401 tty_struct ``include/linux/tty.h`` TTY_MAGIC 0x5401 tty_struct ``include/linux/tty.h``
......
...@@ -73,7 +73,6 @@ PPP_MAGIC 0x5002 ppp ``include/linux/ ...@@ -73,7 +73,6 @@ PPP_MAGIC 0x5002 ppp ``include/linux/
SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h`` SSTATE_MAGIC 0x5302 serial_state ``include/linux/serial.h``
SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h``
STRIP_MAGIC 0x5303 strip ``drivers/net/strip.c`` STRIP_MAGIC 0x5303 strip ``drivers/net/strip.c``
X25_ASY_MAGIC 0x5303 x25_asy ``drivers/net/x25_asy.h``
SIXPACK_MAGIC 0x5304 sixpack ``drivers/net/hamradio/6pack.h`` SIXPACK_MAGIC 0x5304 sixpack ``drivers/net/hamradio/6pack.h``
AX25_MAGIC 0x5316 ax_disp ``drivers/net/mkiss.h`` AX25_MAGIC 0x5316 ax_disp ``drivers/net/mkiss.h``
TTY_MAGIC 0x5401 tty_struct ``include/linux/tty.h`` TTY_MAGIC 0x5401 tty_struct ``include/linux/tty.h``
......
...@@ -230,7 +230,6 @@ CONFIG_DSCC4_PCISYNC=y ...@@ -230,7 +230,6 @@ CONFIG_DSCC4_PCISYNC=y
CONFIG_DSCC4_PCI_RST=y CONFIG_DSCC4_PCI_RST=y
CONFIG_DLCI=m CONFIG_DLCI=m
CONFIG_LAPBETHER=m CONFIG_LAPBETHER=m
CONFIG_X25_ASY=m
# CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set # CONFIG_SERIO is not set
......
...@@ -380,7 +380,6 @@ CONFIG_DSCC4_PCISYNC=y ...@@ -380,7 +380,6 @@ CONFIG_DSCC4_PCISYNC=y
CONFIG_DSCC4_PCI_RST=y CONFIG_DSCC4_PCI_RST=y
CONFIG_DLCI=m CONFIG_DLCI=m
CONFIG_LAPBETHER=m CONFIG_LAPBETHER=m
CONFIG_X25_ASY=m
# CONFIG_KEYBOARD_ATKBD is not set # CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=y CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_MOUSE is not set
......
...@@ -383,21 +383,6 @@ config LAPBETHER ...@@ -383,21 +383,6 @@ config LAPBETHER
If unsure, say N. If unsure, say N.
config X25_ASY
tristate "X.25 async driver"
depends on LAPB && X25 && TTY
help
Send and receive X.25 frames over regular asynchronous serial
lines such as telephone lines equipped with ordinary modems.
Experts should note that this driver doesn't currently comply with
the asynchronous HDLS framing protocols in CCITT recommendation X.25.
To compile this driver as a module, choose M here: the
module will be called x25_asy.
If unsure, say N.
config SBNI config SBNI
tristate "Granch SBNI12 Leased Line adapter support" tristate "Granch SBNI12 Leased Line adapter support"
depends on X86 depends on X86
......
...@@ -18,7 +18,6 @@ obj-$(CONFIG_HOSTESS_SV11) += z85230.o hostess_sv11.o ...@@ -18,7 +18,6 @@ obj-$(CONFIG_HOSTESS_SV11) += z85230.o hostess_sv11.o
obj-$(CONFIG_SEALEVEL_4021) += z85230.o sealevel.o obj-$(CONFIG_SEALEVEL_4021) += z85230.o sealevel.o
obj-$(CONFIG_COSA) += cosa.o obj-$(CONFIG_COSA) += cosa.o
obj-$(CONFIG_FARSYNC) += farsync.o obj-$(CONFIG_FARSYNC) += farsync.o
obj-$(CONFIG_X25_ASY) += x25_asy.o
obj-$(CONFIG_LANMEDIA) += lmc/ obj-$(CONFIG_LANMEDIA) += lmc/
......
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_X25_ASY_H
#define _LINUX_X25_ASY_H
/* X.25 asy configuration. */
#define SL_NRUNIT 256 /* MAX number of X.25 channels;
This can be overridden with
insmod -ox25_asy_maxdev=nnn */
#define SL_MTU 256
/* X25 async protocol characters. */
#define X25_END 0x7E /* indicates end of frame */
#define X25_ESC 0x7D /* indicates byte stuffing */
#define X25_ESCAPE(x) ((x)^0x20)
#define X25_UNESCAPE(x) ((x)^0x20)
struct x25_asy {
int magic;
/* Various fields. */
spinlock_t lock;
struct tty_struct *tty; /* ptr to TTY structure */
struct net_device *dev; /* easy for intr handling */
/* These are pointers to the malloc()ed frame buffers. */
unsigned char *rbuff; /* receiver buffer */
int rcount; /* received chars counter */
unsigned char *xbuff; /* transmitter buffer */
unsigned char *xhead; /* pointer to next byte to XMIT */
int xleft; /* bytes left in XMIT queue */
int buffsize; /* Max buffers sizes */
unsigned long flags; /* Flag values/ mode etc */
#define SLF_INUSE 0 /* Channel in use */
#define SLF_ESCAPE 1 /* ESC received */
#define SLF_ERROR 2 /* Parity, etc. error */
};
#define X25_ASY_MAGIC 0x5303
int x25_asy_init(struct net_device *dev);
#endif /* _LINUX_X25_ASY.H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment