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

net: wan: Delete the DLCI / SDLA drivers

The DLCI driver (dlci.c) implements the Frame Relay protocol. However,
we already have another newer and better implementation of Frame Relay
provided by the HDLC_FR driver (hdlc_fr.c).

The DLCI driver's implementation of Frame Relay is used by only one
hardware driver in the kernel - the SDLA driver (sdla.c).

The SDLA driver provides Frame Relay support for the Sangoma S50x devices.
However, the vendor provides their own driver (along with their own
multi-WAN-protocol implementations including Frame Relay), called WANPIPE.
I believe most users of the hardware would use the vendor-provided WANPIPE
driver instead.

(The WANPIPE driver was even once in the kernel, but was deleted in
commit 8db60bcf ("[WAN]: Remove broken and unmaintained Sangoma
drivers.") because the vendor no longer updated the in-kernel WANPIPE
driver.)

Cc: Mike McLagan <mike.mclagan@linux.org>
Signed-off-by: default avatarXie He <xie.he.0141@gmail.com>
Link: https://lore.kernel.org/r/20201114150921.685594-1-xie.he.0141@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fccf111e
......@@ -2499,15 +2499,6 @@ W: http://www.rdrop.com/users/paulmck/
D: RCU and variants
D: rcutorture module
N: Mike McLagan
E: mike.mclagan@linux.org
W: http://www.invlogic.com/~mmclagan
D: DLCI/FRAD drivers for Sangoma SDLAs
S: Innovative Logic Corp
S: Post Office Box 1068
S: Laurel, Maryland 20732
S: USA
N: Bradley McLean
E: brad@bradpc.gaylord.com
D: Device driver hacker
......
.. SPDX-License-Identifier: GPL-2.0
================
Frame Relay (FR)
================
Frame Relay (FR) support for linux is built into a two tiered system of device
drivers. The upper layer implements RFC1490 FR specification, and uses the
Data Link Connection Identifier (DLCI) as its hardware address. Usually these
are assigned by your network supplier, they give you the number/numbers of
the Virtual Connections (VC) assigned to you.
Each DLCI is a point-to-point link between your machine and a remote one.
As such, a separate device is needed to accommodate the routing. Within the
net-tools archives is 'dlcicfg'. This program will communicate with the
base "DLCI" device, and create new net devices named 'dlci00', 'dlci01'...
The configuration script will ask you how many DLCIs you need, as well as
how many DLCIs you want to assign to each Frame Relay Access Device (FRAD).
The DLCI uses a number of function calls to communicate with the FRAD, all
of which are stored in the FRAD's private data area. assoc/deassoc,
activate/deactivate and dlci_config. The DLCI supplies a receive function
to the FRAD to accept incoming packets.
With this initial offering, only 1 FRAD driver is available. With many thanks
to Sangoma Technologies, David Mandelstam & Gene Kozin, the S502A, S502E &
S508 are supported. This driver is currently set up for only FR, but as
Sangoma makes more firmware modules available, it can be updated to provide
them as well.
Configuration of the FRAD makes use of another net-tools program, 'fradcfg'.
This program makes use of a configuration file (which dlcicfg can also read)
to specify the types of boards to be configured as FRADs, as well as perform
any board specific configuration. The Sangoma module of fradcfg loads the
FR firmware into the card, sets the irq/port/memory information, and provides
an initial configuration.
Additional FRAD device drivers can be added as hardware is available.
At this time, the dlcicfg and fradcfg programs have not been incorporated into
the net-tools distribution. They can be found at ftp.invlogic.com, in
/pub/linux. Note that with OS/2 FTPD, you end up in /pub by default, so just
use 'cd linux'. v0.10 is for use on pre-2.0.3 and earlier, v0.15 is for
pre-2.0.4 and later.
......@@ -6905,12 +6905,6 @@ S: Maintained
W: http://floatingpoint.sourceforge.net/emulator/index.html
F: arch/x86/math-emu/
FRAME RELAY DLCI/FRAD (Sangoma drivers too)
L: netdev@vger.kernel.org
S: Orphan
F: drivers/net/wan/dlci.c
F: drivers/net/wan/sdla.c
FRAMEBUFFER LAYER
M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
L: dri-devel@lists.freedesktop.org
......
......@@ -141,7 +141,6 @@ CONFIG_HDLC_CISCO=m
CONFIG_HDLC_FR=m
CONFIG_HDLC_PPP=m
CONFIG_HDLC_X25=m
CONFIG_DLCI=m
CONFIG_WAN_ROUTER_DRIVERS=m
CONFIG_ATM_TCP=m
# CONFIG_INPUT_KEYBOARD is not set
......
......@@ -228,7 +228,6 @@ CONFIG_FARSYNC=m
CONFIG_DSCC4=m
CONFIG_DSCC4_PCISYNC=y
CONFIG_DSCC4_PCI_RST=y
CONFIG_DLCI=m
CONFIG_LAPBETHER=m
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
......
......@@ -378,7 +378,6 @@ CONFIG_FARSYNC=m
CONFIG_DSCC4=m
CONFIG_DSCC4_PCISYNC=y
CONFIG_DSCC4_PCI_RST=y
CONFIG_DLCI=m
CONFIG_LAPBETHER=m
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=y
......
......@@ -321,51 +321,6 @@ config IXP4XX_HSS
Say Y here if you want to use built-in HSS ports
on IXP4xx processor.
config DLCI
tristate "Frame Relay DLCI support"
help
Support for the Frame Relay protocol.
Frame Relay is a fast low-cost way to connect to a remote Internet
access provider or to form a private wide area network. The one
physical line from your box to the local "switch" (i.e. the entry
point to the Frame Relay network, usually at the phone company) can
carry several logical point-to-point connections to other computers
connected to the Frame Relay network. For a general explanation of
the protocol, check out <http://www.mplsforum.org/>.
To use frame relay, you need supporting hardware (called FRAD) and
certain programs from the net-tools package as explained in
<file:Documentation/networking/framerelay.rst>.
To compile this driver as a module, choose M here: the
module will be called dlci.
config DLCI_MAX
int "Max DLCI per device"
depends on DLCI
default "8"
help
How many logical point-to-point frame relay connections (the
identifiers of which are called DCLIs) should be handled by each
of your hardware frame relay access devices.
Go with the default.
config SDLA
tristate "SDLA (Sangoma S502/S508) support"
depends on DLCI && ISA
help
Driver for the Sangoma S502A, S502E, and S508 Frame Relay Access
Devices.
These are multi-protocol cards, but only Frame Relay is supported
by the driver at this time. Please read
<file:Documentation/networking/framerelay.rst>.
To compile this driver as a module, choose M here: the
module will be called sdla.
# X.25 network drivers
config LAPBETHER
tristate "LAPB over Ethernet driver"
......
......@@ -21,8 +21,6 @@ obj-$(CONFIG_FARSYNC) += farsync.o
obj-$(CONFIG_LANMEDIA) += lmc/
obj-$(CONFIG_DLCI) += dlci.o
obj-$(CONFIG_SDLA) += sdla.o
obj-$(CONFIG_LAPBETHER) += lapbether.o
obj-$(CONFIG_SBNI) += sbni.o
obj-$(CONFIG_N2) += n2.o
......
This diff is collapsed.
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* DLCI/FRAD Definitions for Frame Relay Access Devices. DLCI devices are
* created for each DLCI associated with a FRAD. The FRAD driver
* is not truly a network device, but the lower level device
* handler. This allows other FRAD manufacturers to use the DLCI
* code, including its RFC1490 encapsulation alongside the current
* implementation for the Sangoma cards.
*
* Version: @(#)if_ifrad.h 0.15 31 Mar 96
*
* Author: Mike McLagan <mike.mclagan@linux.org>
*
* Changes:
* 0.15 Mike McLagan changed structure defs (packed)
* re-arranged flags
* added DLCI_RET vars
*/
#ifndef _FRAD_H_
#define _FRAD_H_
#include <uapi/linux/if_frad.h>
#if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
/* these are the fields of an RFC 1490 header */
struct frhdr
{
unsigned char control;
/* for IP packets, this can be the NLPID */
unsigned char pad;
unsigned char NLPID;
unsigned char OUI[3];
__be16 PID;
#define IP_NLPID pad
} __packed;
/* see RFC 1490 for the definition of the following */
#define FRAD_I_UI 0x03
#define FRAD_P_PADDING 0x00
#define FRAD_P_Q933 0x08
#define FRAD_P_SNAP 0x80
#define FRAD_P_CLNP 0x81
#define FRAD_P_IP 0xCC
struct dlci_local
{
struct net_device *master;
struct net_device *slave;
struct dlci_conf config;
int configured;
struct list_head list;
/* callback function */
void (*receive)(struct sk_buff *skb, struct net_device *);
};
struct frad_local
{
/* devices which this FRAD is slaved to */
struct net_device *master[CONFIG_DLCI_MAX];
short dlci[CONFIG_DLCI_MAX];
struct frad_conf config;
int configured; /* has this device been configured */
int initialized; /* mem_start, port, irq set ? */
/* callback functions */
int (*activate)(struct net_device *, struct net_device *);
int (*deactivate)(struct net_device *, struct net_device *);
int (*assoc)(struct net_device *, struct net_device *);
int (*deassoc)(struct net_device *, struct net_device *);
int (*dlci_conf)(struct net_device *, struct net_device *, int get);
/* fields that are used by the Sangoma SDLA cards */
struct timer_list timer;
struct net_device *dev;
int type; /* adapter type */
int state; /* state of the S502/8 control latch */
int buffer; /* current buffer for S508 firmware */
};
#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
#endif
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* INET An implementation of the TCP/IP protocol suite for the LINUX
* operating system. INET is implemented using the BSD Socket
* interface as the means of communication with the user level.
*
* Global definitions for the Frame relay interface.
*
* Version: @(#)if_ifrad.h 0.20 13 Apr 96
*
* Author: Mike McLagan <mike.mclagan@linux.org>
*
* Changes:
* 0.15 Mike McLagan Structure packing
*
* 0.20 Mike McLagan New flags for S508 buffer handling
*/
#ifndef SDLA_H
#define SDLA_H
#include <uapi/linux/sdla.h>
/* important Z80 window addresses */
#define SDLA_CONTROL_WND 0xE000
#define SDLA_502_CMD_BUF 0xEF60
#define SDLA_502_RCV_BUF 0xA900
#define SDLA_502_TXN_AVAIL 0xFFF1
#define SDLA_502_RCV_AVAIL 0xFFF2
#define SDLA_502_EVENT_FLAGS 0xFFF3
#define SDLA_502_MDM_STATUS 0xFFF4
#define SDLA_502_IRQ_INTERFACE 0xFFFD
#define SDLA_502_IRQ_PERMISSION 0xFFFE
#define SDLA_502_DATA_OFS 0x0010
#define SDLA_508_CMD_BUF 0xE000
#define SDLA_508_TXBUF_INFO 0xF100
#define SDLA_508_RXBUF_INFO 0xF120
#define SDLA_508_EVENT_FLAGS 0xF003
#define SDLA_508_MDM_STATUS 0xF004
#define SDLA_508_IRQ_INTERFACE 0xF010
#define SDLA_508_IRQ_PERMISSION 0xF011
#define SDLA_508_TSE_OFFSET 0xF012
/* Event flags */
#define SDLA_EVENT_STATUS 0x01
#define SDLA_EVENT_DLCI_STATUS 0x02
#define SDLA_EVENT_BAD_DLCI 0x04
#define SDLA_EVENT_LINK_DOWN 0x40
/* IRQ Trigger flags */
#define SDLA_INTR_RX 0x01
#define SDLA_INTR_TX 0x02
#define SDLA_INTR_MODEM 0x04
#define SDLA_INTR_COMPLETE 0x08
#define SDLA_INTR_STATUS 0x10
#define SDLA_INTR_TIMER 0x20
/* DLCI status bits */
#define SDLA_DLCI_DELETED 0x01
#define SDLA_DLCI_ACTIVE 0x02
#define SDLA_DLCI_WAITING 0x04
#define SDLA_DLCI_NEW 0x08
#define SDLA_DLCI_INCLUDED 0x40
/* valid command codes */
#define SDLA_INFORMATION_WRITE 0x01
#define SDLA_INFORMATION_READ 0x02
#define SDLA_ISSUE_IN_CHANNEL_SIGNAL 0x03
#define SDLA_SET_DLCI_CONFIGURATION 0x10
#define SDLA_READ_DLCI_CONFIGURATION 0x11
#define SDLA_DISABLE_COMMUNICATIONS 0x12
#define SDLA_ENABLE_COMMUNICATIONS 0x13
#define SDLA_READ_DLC_STATUS 0x14
#define SDLA_READ_DLC_STATISTICS 0x15
#define SDLA_FLUSH_DLC_STATISTICS 0x16
#define SDLA_LIST_ACTIVE_DLCI 0x17
#define SDLA_FLUSH_INFORMATION_BUFFERS 0x18
#define SDLA_ADD_DLCI 0x20
#define SDLA_DELETE_DLCI 0x21
#define SDLA_ACTIVATE_DLCI 0x22
#define SDLA_DEACTIVATE_DLCI 0x23
#define SDLA_READ_MODEM_STATUS 0x30
#define SDLA_SET_MODEM_STATUS 0x31
#define SDLA_READ_COMMS_ERR_STATS 0x32
#define SDLA_FLUSH_COMMS_ERR_STATS 0x33
#define SDLA_READ_CODE_VERSION 0x40
#define SDLA_SET_IRQ_TRIGGER 0x50
#define SDLA_GET_IRQ_TRIGGER 0x51
/* In channel signal types */
#define SDLA_ICS_LINK_VERIFY 0x02
#define SDLA_ICS_STATUS_ENQ 0x03
/* modem status flags */
#define SDLA_MODEM_DTR_HIGH 0x01
#define SDLA_MODEM_RTS_HIGH 0x02
#define SDLA_MODEM_DCD_HIGH 0x08
#define SDLA_MODEM_CTS_HIGH 0x20
/* used for RET_MODEM interpretation */
#define SDLA_MODEM_DCD_LOW 0x01
#define SDLA_MODEM_CTS_LOW 0x02
/* return codes */
#define SDLA_RET_OK 0x00
#define SDLA_RET_COMMUNICATIONS 0x01
#define SDLA_RET_CHANNEL_INACTIVE 0x02
#define SDLA_RET_DLCI_INACTIVE 0x03
#define SDLA_RET_DLCI_CONFIG 0x04
#define SDLA_RET_BUF_TOO_BIG 0x05
#define SDLA_RET_NO_DATA 0x05
#define SDLA_RET_BUF_OVERSIZE 0x06
#define SDLA_RET_CIR_OVERFLOW 0x07
#define SDLA_RET_NO_BUFS 0x08
#define SDLA_RET_TIMEOUT 0x0A
#define SDLA_RET_MODEM 0x10
#define SDLA_RET_CHANNEL_OFF 0x11
#define SDLA_RET_CHANNEL_ON 0x12
#define SDLA_RET_DLCI_STATUS 0x13
#define SDLA_RET_DLCI_UNKNOWN 0x14
#define SDLA_RET_COMMAND_INVALID 0x1F
/* Configuration flags */
#define SDLA_DIRECT_RECV 0x0080
#define SDLA_TX_NO_EXCEPT 0x0020
#define SDLA_NO_ICF_MSGS 0x1000
#define SDLA_TX50_RX50 0x0000
#define SDLA_TX70_RX30 0x2000
#define SDLA_TX30_RX70 0x4000
/* IRQ selection flags */
#define SDLA_IRQ_RECEIVE 0x01
#define SDLA_IRQ_TRANSMIT 0x02
#define SDLA_IRQ_MODEM_STAT 0x04
#define SDLA_IRQ_COMMAND 0x08
#define SDLA_IRQ_CHANNEL 0x10
#define SDLA_IRQ_TIMER 0x20
/* definitions for PC memory mapping */
#define SDLA_8K_WINDOW 0x01
#define SDLA_S502_SEG_A 0x10
#define SDLA_S502_SEG_C 0x20
#define SDLA_S502_SEG_D 0x00
#define SDLA_S502_SEG_E 0x30
#define SDLA_S507_SEG_A 0x00
#define SDLA_S507_SEG_B 0x40
#define SDLA_S507_SEG_C 0x80
#define SDLA_S507_SEG_E 0xC0
#define SDLA_S508_SEG_A 0x00
#define SDLA_S508_SEG_C 0x10
#define SDLA_S508_SEG_D 0x08
#define SDLA_S508_SEG_E 0x18
/* SDLA adapter port constants */
#define SDLA_IO_EXTENTS 0x04
#define SDLA_REG_CONTROL 0x00
#define SDLA_REG_PC_WINDOW 0x01 /* offset for PC window select latch */
#define SDLA_REG_Z80_WINDOW 0x02 /* offset for Z80 window select latch */
#define SDLA_REG_Z80_CONTROL 0x03 /* offset for Z80 control latch */
#define SDLA_S502_STS 0x00 /* status reg for 502, 502E, 507 */
#define SDLA_S508_GNRL 0x00 /* general purp. reg for 508 */
#define SDLA_S508_STS 0x01 /* status reg for 508 */
#define SDLA_S508_IDR 0x02 /* ID reg for 508 */
/* control register flags */
#define SDLA_S502A_START 0x00 /* start the CPU */
#define SDLA_S502A_INTREQ 0x02
#define SDLA_S502A_INTEN 0x04
#define SDLA_S502A_HALT 0x08 /* halt the CPU */
#define SDLA_S502A_NMI 0x10 /* issue an NMI to the CPU */
#define SDLA_S502E_CPUEN 0x01
#define SDLA_S502E_ENABLE 0x02
#define SDLA_S502E_INTACK 0x04
#define SDLA_S507_ENABLE 0x01
#define SDLA_S507_IRQ3 0x00
#define SDLA_S507_IRQ4 0x20
#define SDLA_S507_IRQ5 0x40
#define SDLA_S507_IRQ7 0x60
#define SDLA_S507_IRQ10 0x80
#define SDLA_S507_IRQ11 0xA0
#define SDLA_S507_IRQ12 0xC0
#define SDLA_S507_IRQ15 0xE0
#define SDLA_HALT 0x00
#define SDLA_CPUEN 0x02
#define SDLA_MEMEN 0x04
#define SDLA_S507_EPROMWR 0x08
#define SDLA_S507_EPROMCLK 0x10
#define SDLA_S508_INTRQ 0x08
#define SDLA_S508_INTEN 0x10
struct sdla_cmd {
char opp_flag;
char cmd;
short length;
char retval;
short dlci;
char flags;
short rxlost_int;
long rxlost_app;
char reserve[2];
char data[SDLA_MAX_DATA]; /* transfer data buffer */
} __attribute__((packed));
struct intr_info {
char flags;
short txlen;
char irq;
char flags2;
short timeout;
} __attribute__((packed));
/* found in the 508's control window at RXBUF_INFO */
struct buf_info {
unsigned short rse_num;
unsigned long rse_base;
unsigned long rse_next;
unsigned long buf_base;
unsigned short reserved;
unsigned long buf_top;
} __attribute__((packed));
/* structure pointed to by rse_base in RXBUF_INFO struct */
struct buf_entry {
char opp_flag;
short length;
short dlci;
char flags;
short timestamp;
short reserved[2];
long buf_addr;
} __attribute__((packed));
#endif
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
* DLCI/FRAD Definitions for Frame Relay Access Devices. DLCI devices are
* created for each DLCI associated with a FRAD. The FRAD driver
* is not truly a network device, but the lower level device
* handler. This allows other FRAD manufacturers to use the DLCI
* code, including its RFC1490 encapsulation alongside the current
* implementation for the Sangoma cards.
*
* Version: @(#)if_ifrad.h 0.15 31 Mar 96
*
* Author: Mike McLagan <mike.mclagan@linux.org>
*
* Changes:
* 0.15 Mike McLagan changed structure defs (packed)
* re-arranged flags
* added DLCI_RET vars
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _UAPI_FRAD_H_
#define _UAPI_FRAD_H_
#include <linux/if.h>
/* Structures and constants associated with the DLCI device driver */
struct dlci_add
{
char devname[IFNAMSIZ];
short dlci;
};
#define DLCI_GET_CONF (SIOCDEVPRIVATE + 2)
#define DLCI_SET_CONF (SIOCDEVPRIVATE + 3)
/*
* These are related to the Sangoma SDLA and should remain in order.
* Code within the SDLA module is based on the specifics of this
* structure. Change at your own peril.
*/
struct dlci_conf {
short flags;
short CIR_fwd;
short Bc_fwd;
short Be_fwd;
short CIR_bwd;
short Bc_bwd;
short Be_bwd;
/* these are part of the status read */
short Tc_fwd;
short Tc_bwd;
short Tf_max;
short Tb_max;
/* add any new fields here above is a mirror of sdla_dlci_conf */
};
#define DLCI_GET_SLAVE (SIOCDEVPRIVATE + 4)
/* configuration flags for DLCI */
#define DLCI_IGNORE_CIR_OUT 0x0001
#define DLCI_ACCOUNT_CIR_IN 0x0002
#define DLCI_BUFFER_IF 0x0008
#define DLCI_VALID_FLAGS 0x000B
/* defines for the actual Frame Relay hardware */
#define FRAD_GET_CONF (SIOCDEVPRIVATE)
#define FRAD_SET_CONF (SIOCDEVPRIVATE + 1)
#define FRAD_LAST_IOCTL FRAD_SET_CONF
/*
* Based on the setup for the Sangoma SDLA. If changes are
* necessary to this structure, a routine will need to be
* added to that module to copy fields.
*/
struct frad_conf
{
short station;
short flags;
short kbaud;
short clocking;
short mtu;
short T391;
short T392;
short N391;
short N392;
short N393;
short CIR_fwd;
short Bc_fwd;
short Be_fwd;
short CIR_bwd;
short Bc_bwd;
short Be_bwd;
/* Add new fields here, above is a mirror of the sdla_conf */
};
#define FRAD_STATION_CPE 0x0000
#define FRAD_STATION_NODE 0x0001
#define FRAD_TX_IGNORE_CIR 0x0001
#define FRAD_RX_ACCOUNT_CIR 0x0002
#define FRAD_DROP_ABORTED 0x0004
#define FRAD_BUFFERIF 0x0008
#define FRAD_STATS 0x0010
#define FRAD_MCI 0x0100
#define FRAD_AUTODLCI 0x8000
#define FRAD_VALID_FLAGS 0x811F
#define FRAD_CLOCK_INT 0x0001
#define FRAD_CLOCK_EXT 0x0000
#endif /* _UAPI_FRAD_H_ */
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
* INET An implementation of the TCP/IP protocol suite for the LINUX
* operating system. INET is implemented using the BSD Socket
* interface as the means of communication with the user level.
*
* Global definitions for the Frame relay interface.
*
* Version: @(#)if_ifrad.h 0.20 13 Apr 96
*
* Author: Mike McLagan <mike.mclagan@linux.org>
*
* Changes:
* 0.15 Mike McLagan Structure packing
*
* 0.20 Mike McLagan New flags for S508 buffer handling
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _UAPISDLA_H
#define _UAPISDLA_H
/* adapter type */
#define SDLA_TYPES
#define SDLA_S502A 5020
#define SDLA_S502E 5021
#define SDLA_S503 5030
#define SDLA_S507 5070
#define SDLA_S508 5080
#define SDLA_S509 5090
#define SDLA_UNKNOWN -1
/* port selection flags for the S508 */
#define SDLA_S508_PORT_V35 0x00
#define SDLA_S508_PORT_RS232 0x02
/* Z80 CPU speeds */
#define SDLA_CPU_3M 0x00
#define SDLA_CPU_5M 0x01
#define SDLA_CPU_7M 0x02
#define SDLA_CPU_8M 0x03
#define SDLA_CPU_10M 0x04
#define SDLA_CPU_16M 0x05
#define SDLA_CPU_12M 0x06
/* some private IOCTLs */
#define SDLA_IDENTIFY (FRAD_LAST_IOCTL + 1)
#define SDLA_CPUSPEED (FRAD_LAST_IOCTL + 2)
#define SDLA_PROTOCOL (FRAD_LAST_IOCTL + 3)
#define SDLA_CLEARMEM (FRAD_LAST_IOCTL + 4)
#define SDLA_WRITEMEM (FRAD_LAST_IOCTL + 5)
#define SDLA_READMEM (FRAD_LAST_IOCTL + 6)
struct sdla_mem {
int addr;
int len;
void __user *data;
};
#define SDLA_START (FRAD_LAST_IOCTL + 7)
#define SDLA_STOP (FRAD_LAST_IOCTL + 8)
/* some offsets in the Z80's memory space */
#define SDLA_NMIADDR 0x0000
#define SDLA_CONF_ADDR 0x0010
#define SDLA_S502A_NMIADDR 0x0066
#define SDLA_CODE_BASEADDR 0x0100
#define SDLA_WINDOW_SIZE 0x2000
#define SDLA_ADDR_MASK 0x1FFF
/* largest handleable block of data */
#define SDLA_MAX_DATA 4080
#define SDLA_MAX_MTU 4072 /* MAX_DATA - sizeof(fradhdr) */
#define SDLA_MAX_DLCI 24
/* this should be the same as frad_conf */
struct sdla_conf {
short station;
short config;
short kbaud;
short clocking;
short max_frm;
short T391;
short T392;
short N391;
short N392;
short N393;
short CIR_fwd;
short Bc_fwd;
short Be_fwd;
short CIR_bwd;
short Bc_bwd;
short Be_bwd;
};
/* this should be the same as dlci_conf */
struct sdla_dlci_conf {
short config;
short CIR_fwd;
short Bc_fwd;
short Be_fwd;
short CIR_bwd;
short Bc_bwd;
short Be_bwd;
short Tc_fwd;
short Tc_bwd;
short Tf_max;
short Tb_max;
};
#endif /* _UAPISDLA_H */
......@@ -64,7 +64,6 @@
#include <linux/seq_file.h>
#include <linux/mutex.h>
#include <linux/if_bridge.h>
#include <linux/if_frad.h>
#include <linux/if_vlan.h>
#include <linux/ptp_classify.h>
#include <linux/init.h>
......@@ -1027,17 +1026,6 @@ void vlan_ioctl_set(int (*hook) (struct net *, void __user *))
}
EXPORT_SYMBOL(vlan_ioctl_set);
static DEFINE_MUTEX(dlci_ioctl_mutex);
static int (*dlci_ioctl_hook) (unsigned int, void __user *);
void dlci_ioctl_set(int (*hook) (unsigned int, void __user *))
{
mutex_lock(&dlci_ioctl_mutex);
dlci_ioctl_hook = hook;
mutex_unlock(&dlci_ioctl_mutex);
}
EXPORT_SYMBOL(dlci_ioctl_set);
static long sock_do_ioctl(struct net *net, struct socket *sock,
unsigned int cmd, unsigned long arg)
{
......@@ -1156,17 +1144,6 @@ static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)
err = vlan_ioctl_hook(net, argp);
mutex_unlock(&vlan_ioctl_mutex);
break;
case SIOCADDDLCI:
case SIOCDELDLCI:
err = -ENOPKG;
if (!dlci_ioctl_hook)
request_module("dlci");
mutex_lock(&dlci_ioctl_mutex);
if (dlci_ioctl_hook)
err = dlci_ioctl_hook(cmd, argp);
mutex_unlock(&dlci_ioctl_mutex);
break;
case SIOCGSKNS:
err = -EPERM;
if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
......@@ -3427,8 +3404,6 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
case SIOCBRDELBR:
case SIOCGIFVLAN:
case SIOCSIFVLAN:
case SIOCADDDLCI:
case SIOCDELDLCI:
case SIOCGSKNS:
case SIOCGSTAMP_NEW:
case SIOCGSTAMPNS_NEW:
......
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