mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 18:14:22 -04:00
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 8db60bcf30 ("[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: Xie He <xie.he.0141@gmail.com>
Link: https://lore.kernel.org/r/20201114150921.685594-1-xie.he.0141@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -1,92 +0,0 @@
|
||||
/* 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
|
||||
@@ -1,240 +0,0 @@
|
||||
/* 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
|
||||
Reference in New Issue
Block a user