Commit 557c670b authored by Jeff Garzik's avatar Jeff Garzik

Merge redhat.com:/spare/repo/netdev-2.6/remove-comx

into redhat.com:/spare/repo/net-drivers-2.6
parents 1cda7f59 db4830e5
......@@ -57,119 +57,6 @@ config COSA
The driver will be compiled as a module: the
module will be called cosa.
#
# COMX drivers
#
# Not updated to 2.6.
config COMX
tristate "MultiGate (COMX) synchronous serial boards support"
depends on WAN && (ISA || PCI) && BROKEN
---help---
Drivers for the PC synchronous serial adapters by
ITConsult-Pro Co, Hungary.
Read <file:Documentation/networking/comx.txt> for help on configuring
and using COMX interfaces. Further info on these cards can be found
at <http://www.itc.hu/> or <info@itc.hu>.
Say Y if you want to use any board from the MultiGate (COMX)
family, you must also say Y to "/proc file system support"
(CONFIG_PROC_FS) in order to use these drivers.
To compile this driver as a module, choose M here: the
module will be called comx.
config COMX_HW_COMX
tristate "Support for COMX/CMX/HiCOMX boards"
depends on COMX
help
Driver for the 'CMX', 'COMX' and 'HiCOMX' boards.
You will need additional firmware to use these cards, which are
downloadable from <ftp://ftp.itc.hu/>.
Say Y if you have a board like this.
To compile this driver as a module, choose M here: the
module will be called comx-hw-comx.
config COMX_HW_LOCOMX
tristate "Support for LoCOMX board"
depends on COMX
help
Driver for the 'LoCOMX' board.
Say Y if you have a board like this.
To compile this driver as a module, choose M here: the
module will be called comx-hw-locomx.
config COMX_HW_MIXCOM
tristate "Support for MixCOM board"
depends on COMX
---help---
Driver for the 'MixCOM' board.
If you want to use the watchdog device on this card, you should
select it in the Watchdog Cards section of the Character Devices
configuration. The ISDN interface of this card is Teles 16.3
compatible, you should enable it in the ISDN configuration menu. The
driver for the flash ROM of this card is available separately on
<ftp://ftp.itc.hu/>.
Say Y if you have a board like this.
To compile this driver as a module, choose M here: the
module will be called comx-hw-mixcom.
config COMX_HW_MUNICH
tristate "Support for MUNICH based boards: SliceCOM, PCICOM (WelCOM)"
depends on COMX
---help---
Driver for the 'SliceCOM' (channelized E1) and 'PciCOM' (X21) boards.
Read <file:Documentation/networking/slicecom.txt> for help on
configuring and using SliceCOM interfaces. Further info on these
cards can be found at <http://www.itc.hu> or <info@itc.hu>.
Say Y if you have a board like this.
To compile this driver as a module, choose M here: the
module will be called comx-hw-munich.
config COMX_PROTO_PPP
tristate "Support for HDLC and syncPPP protocols on MultiGate boards"
depends on COMX
help
Cisco-HDLC and synchronous PPP protocol driver.
Say Y if you want to use either protocol.
To compile this as a module, choose M here: the
module will be called comx-proto-ppp.
config COMX_PROTO_LAPB
tristate "Support for LAPB protocol on MultiGate boards"
depends on WAN && (COMX!=n && LAPB=m && LAPB || LAPB=y && COMX)
help
LAPB protocol driver.
Say Y if you want to use this protocol.
To compile this as a module, choose M here: the
module will be called comx-proto-lapb.
config COMX_PROTO_FR
tristate "Support for Frame Relay on MultiGate boards"
depends on COMX
help
Frame Relay protocol driver.
Say Y if you want to use this protocol.
To compile this as a module, choose M here: the
module will be called comx-proto-fr.
config DSCC4
tristate "Etinc PCISYNC serial board support"
depends on WAN && PCI && m
......
......@@ -32,14 +32,6 @@ pc300-objs := $(pc300-y)
obj-$(CONFIG_HOSTESS_SV11) += z85230.o syncppp.o hostess_sv11.o
obj-$(CONFIG_SEALEVEL_4021) += z85230.o syncppp.o sealevel.o
obj-$(CONFIG_COMX) += comx.o
obj-$(CONFIG_COMX_HW_COMX) += comx-hw-comx.o
obj-$(CONFIG_COMX_HW_LOCOMX) += z85230.o syncppp.o comx-hw-locomx.o
obj-$(CONFIG_COMX_HW_MIXCOM) += comx-hw-mixcom.o
obj-$(CONFIG_COMX_HW_MUNICH) += comx-hw-munich.o
obj-$(CONFIG_COMX_PROTO_PPP) += syncppp.o comx-proto-ppp.o
obj-$(CONFIG_COMX_PROTO_LAPB) += comx-proto-lapb.o
obj-$(CONFIG_COMX_PROTO_FR) += comx-proto-fr.o
obj-$(CONFIG_COSA) += syncppp.o cosa.o
obj-$(CONFIG_FARSYNC) += syncppp.o farsync.o
obj-$(CONFIG_DSCC4) += dscc4.o
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Synchronous PPP / Cisco-HDLC driver for the COMX boards
*
* Author: Gergely Madarasz <gorgo@itc.hu>
*
* based on skeleton code by Tivadar Szemethy <tiv@itc.hu>
*
* Copyright (C) 1999 ITConsult-Pro Co. <info@itc.hu>
*
* 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.
*
*
* Version 0.10 (99/06/10):
* - written the first code :)
*
* Version 0.20 (99/06/16):
* - added hdlc protocol
* - protocol up is IFF_RUNNING
*
* Version 0.21 (99/07/15):
* - some small fixes with the line status
*
* Version 0.22 (99/08/05):
* - don't test IFF_RUNNING but the pp_link_state of the sppp
*
* Version 0.23 (99/12/02):
* - tbusy fixes
*
*/
#define VERSION "0.23"
#include <linux/module.h>
#include <linux/types.h>
#include <linux/jiffies.h>
#include <linux/netdevice.h>
#include <linux/proc_fs.h>
#include <linux/if_arp.h>
#include <linux/inetdevice.h>
#include <asm/uaccess.h>
#include <linux/init.h>
#include <net/syncppp.h>
#include "comx.h"
MODULE_AUTHOR("Author: Gergely Madarasz <gorgo@itc.hu>");
MODULE_DESCRIPTION("Cisco-HDLC / Synchronous PPP driver for the COMX sync serial boards");
MODULE_LICENSE("GPL");
static struct comx_protocol syncppp_protocol;
static struct comx_protocol hdlc_protocol;
struct syncppp_data {
struct timer_list status_timer;
};
static void syncppp_status_timerfun(unsigned long d) {
struct net_device *dev=(struct net_device *)d;
struct comx_channel *ch=dev->priv;
struct syncppp_data *spch=ch->LINE_privdata;
struct sppp *sp = (struct sppp *)sppp_of(dev);
if(!(ch->line_status & PROTO_UP) &&
(sp->pp_link_state==SPPP_LINK_UP)) {
comx_status(dev, ch->line_status | PROTO_UP);
}
if((ch->line_status & PROTO_UP) &&
(sp->pp_link_state==SPPP_LINK_DOWN)) {
comx_status(dev, ch->line_status & ~PROTO_UP);
}
mod_timer(&spch->status_timer,jiffies + HZ*3);
}
static int syncppp_tx(struct net_device *dev)
{
struct comx_channel *ch=dev->priv;
if(ch->line_status & LINE_UP) {
netif_wake_queue(dev);
}
return 0;
}
static void syncppp_status(struct net_device *dev, unsigned short status)
{
status &= ~(PROTO_UP | PROTO_LOOP);
if(status & LINE_UP) {
netif_wake_queue(dev);
sppp_open(dev);
} else {
/* Line went down */
netif_stop_queue(dev);
sppp_close(dev);
}
comx_status(dev, status);
}
static int syncppp_open(struct net_device *dev)
{
struct comx_channel *ch = dev->priv;
struct syncppp_data *spch = ch->LINE_privdata;
if (!(ch->init_status & HW_OPEN)) return -ENODEV;
ch->init_status |= LINE_OPEN;
ch->line_status &= ~(PROTO_UP | PROTO_LOOP);
if(ch->line_status & LINE_UP) {
sppp_open(dev);
}
init_timer(&spch->status_timer);
spch->status_timer.function=syncppp_status_timerfun;
spch->status_timer.data=(unsigned long)dev;
spch->status_timer.expires=jiffies + HZ*3;
add_timer(&spch->status_timer);
return 0;
}
static int syncppp_close(struct net_device *dev)
{
struct comx_channel *ch = dev->priv;
struct syncppp_data *spch = ch->LINE_privdata;
if (!(ch->init_status & HW_OPEN)) return -ENODEV;
del_timer(&spch->status_timer);
sppp_close(dev);
ch->init_status &= ~LINE_OPEN;
ch->line_status &= ~(PROTO_UP | PROTO_LOOP);
return 0;
}
static int syncppp_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct comx_channel *ch = dev->priv;
netif_stop_queue(dev);
switch(ch->HW_send_packet(dev, skb)) {
case FRAME_QUEUED:
netif_wake_queue(dev);
break;
case FRAME_ACCEPTED:
case FRAME_DROPPED:
break;
case FRAME_ERROR:
printk(KERN_ERR "%s: Transmit frame error (len %d)\n",
dev->name, skb->len);
break;
}
return 0;
}
static int syncppp_statistics(struct net_device *dev, char *page)
{
int len = 0;
len += sprintf(page + len, " ");
return len;
}
static int syncppp_exit(struct net_device *dev)
{
struct comx_channel *ch = dev->priv;
sppp_detach(dev);
dev->flags = 0;
dev->type = 0;
dev->mtu = 0;
ch->LINE_rx = NULL;
ch->LINE_tx = NULL;
ch->LINE_status = NULL;
ch->LINE_open = NULL;
ch->LINE_close = NULL;
ch->LINE_xmit = NULL;
ch->LINE_header = NULL;
ch->LINE_rebuild_header = NULL;
ch->LINE_statistics = NULL;
kfree(ch->LINE_privdata);
ch->LINE_privdata = NULL;
MOD_DEC_USE_COUNT;
return 0;
}
static int syncppp_init(struct net_device *dev)
{
struct comx_channel *ch = dev->priv;
struct ppp_device *pppdev = (struct ppp_device *)ch->if_ptr;
ch->LINE_privdata = kmalloc(sizeof(struct syncppp_data), GFP_KERNEL);
if (!ch->LINE_privdata)
return -ENOMEM;
pppdev->dev = dev;
sppp_attach(pppdev);
if(ch->protocol == &hdlc_protocol) {
pppdev->sppp.pp_flags |= PP_CISCO;
dev->type = ARPHRD_HDLC;
} else {
pppdev->sppp.pp_flags &= ~PP_CISCO;
dev->type = ARPHRD_PPP;
}
ch->LINE_rx = sppp_input;
ch->LINE_tx = syncppp_tx;
ch->LINE_status = syncppp_status;
ch->LINE_open = syncppp_open;
ch->LINE_close = syncppp_close;
ch->LINE_xmit = syncppp_xmit;
ch->LINE_header = NULL;
ch->LINE_statistics = syncppp_statistics;
MOD_INC_USE_COUNT;
return 0;
}
static struct comx_protocol syncppp_protocol = {
"ppp",
VERSION,
ARPHRD_PPP,
syncppp_init,
syncppp_exit,
NULL
};
static struct comx_protocol hdlc_protocol = {
"hdlc",
VERSION,
ARPHRD_PPP,
syncppp_init,
syncppp_exit,
NULL
};
static int __init comx_proto_ppp_init(void)
{
int ret;
ret = comx_register_protocol(&hdlc_protocol);
if (!ret) {
ret = comx_register_protocol(&syncppp_protocol);
if (ret)
comx_unregister_protocol(hdlc_protocol.name);
}
return ret;
}
static void __exit comx_proto_ppp_exit(void)
{
comx_unregister_protocol(syncppp_protocol.name);
comx_unregister_protocol(hdlc_protocol.name);
}
module_init(comx_proto_ppp_init);
module_exit(comx_proto_ppp_exit);
This diff is collapsed.
This diff is collapsed.
/*
* Defines for comxhw.c
*
* Original authors: Arpad Bakay <bakay.arpad@synergon.hu>,
* Peter Bajan <bajan.peter@synergon.hu>,
* Previous maintainer: Tivadar Szemethy <tiv@itc.hu>
* Current maintainer: Gergely Madarasz <gorgo@itc.hu>
*
* Copyright (C) 1995-1999 ITConsult-Pro Co. <info@itc.hu>
*
* 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.
*
*/
#define LOCOMX_IO_EXTENT 8
#define COMX_IO_EXTENT 4
#define HICOMX_IO_EXTENT 16
#define COMX_MAX_TX_SIZE 1600
#define COMX_MAX_RX_SIZE 2048
#define COMX_JAIL_OFFSET 0xffff
#define COMX_JAIL_VALUE 0xfe
#define COMX_MEMORY_SIZE 65536
#define HICOMX_MEMORY_SIZE 16384
#define COMX_MEM_MIN 0xa0000
#define COMX_MEM_MAX 0xf0000
#define COMX_DEFAULT_IO 0x360
#define COMX_DEFAULT_IRQ 10
#define COMX_DEFAULT_MEMADDR 0xd0000
#define HICOMX_DEFAULT_IO 0x320
#define HICOMX_DEFAULT_IRQ 10
#define HICOMX_DEFAULT_MEMADDR 0xd0000
#define LOCOMX_DEFAULT_IO 0x368
#define LOCOMX_DEFAULT_IRQ 7
#define MAX_CHANNELNO 2
#define COMX_CHANNEL_OFFSET 0x2000
#define COMX_ENABLE_BOARD_IT 0x40
#define COMX_BOARD_RESET 0x20
#define COMX_ENABLE_BOARD_MEM 0x10
#define COMX_DISABLE_BOARD_MEM 0
#define COMX_DISABLE_ALL 0x00
#define HICOMX_DISABLE_ALL 0x00
#define HICOMX_ENABLE_BOARD_MEM 0x02
#define HICOMX_DISABLE_BOARD_MEM 0x0
#define HICOMX_BOARD_RESET 0x01
#define HICOMX_PRG_MEM 4
#define HICOMX_DATA_MEM 0
#define HICOMX_ID_BYTE 0x55
#define CMX_ID_BYTE 0x31
#define COMX_CLOCK_CONST 8000
#define LINKUP_READY 3
#define OFF_FW_L1_ID 0x01e /* ID bytes */
#define OFF_FW_L2_ID 0x1006
#define FW_L1_ID_1 0xab
#define FW_L1_ID_2_COMX 0xc0
#define FW_L1_ID_2_HICOMX 0xc1
#define FW_L2_ID_1 0xab
#define OFF_A_L2_CMD 0x130 /* command register for L2 */
#define OFF_A_L2_CMDPAR 0x131 /* command parameter byte */
#define OFF_A_L1_STATB 0x122 /* stat. block for L1 */
#define OFF_A_L1_ABOREC 0x122 /* receive ABORT counter */
#define OFF_A_L1_OVERRUN 0x123 /* receive overrun counter */
#define OFF_A_L1_CRCREC 0x124 /* CRC error counter */
#define OFF_A_L1_BUFFOVR 0x125 /* buffer overrun counter */
#define OFF_A_L1_PBUFOVR 0x126 /* priority buffer overrun counter */
#define OFF_A_L1_MODSTAT 0x127 /* current state of modem ctrl lines */
#define OFF_A_L1_STATE 0x127 /* end of stat. block for L1 */
#define OFF_A_L1_TXPC 0x128 /* Tx counter for the PC */
#define OFF_A_L1_TXZ80 0x129 /* Tx counter for the Z80 */
#define OFF_A_L1_RXPC 0x12a /* Rx counter for the PC */
#define OFF_A_L1_RXZ80 0x12b /* Rx counter for the Z80 */
#define OFF_A_L1_REPENA 0x12c /* IT rep disable */
#define OFF_A_L1_CHNR 0x12d /* L1 channel logical number */
#define OFF_A_L1_CLKINI 0x12e /* Timer Const */
#define OFF_A_L2_LINKUP 0x132 /* Linkup byte */
#define OFF_A_L2_DAV 0x134 /* Rx DAV */
#define OFF_A_L2_RxBUFP 0x136 /* Rx buff relative to membase */
#define OFF_A_L2_TxEMPTY 0x138 /* Tx Empty */
#define OFF_A_L2_TxBUFP 0x13a /* Tx Buf */
#define OFF_A_L2_NBUFFS 0x144 /* Number of buffers to fetch */
#define OFF_A_L2_SABMREC 0x164 /* LAPB no. of SABMs received */
#define OFF_A_L2_SABMSENT 0x165 /* LAPB no. of SABMs sent */
#define OFF_A_L2_REJREC 0x166 /* LAPB no. of REJs received */
#define OFF_A_L2_REJSENT 0x167 /* LAPB no. of REJs sent */
#define OFF_A_L2_FRMRREC 0x168 /* LAPB no. of FRMRs received */
#define OFF_A_L2_FRMRSENT 0x169 /* LAPB no. of FRMRs sent */
#define OFF_A_L2_PROTERR 0x16A /* LAPB no. of protocol errors rec'd */
#define OFF_A_L2_LONGREC 0x16B /* LAPB no. of long frames */
#define OFF_A_L2_INVNR 0x16C /* LAPB no. of invalid N(R)s rec'd */
#define OFF_A_L2_UNDEFFR 0x16D /* LAPB no. of invalid frames */
#define OFF_A_L2_T1 0x174 /* T1 timer */
#define OFF_A_L2_ADDR 0x176 /* DCE = 1, DTE = 3 */
#define COMX_CMD_INIT 1
#define COMX_CMD_EXIT 2
#define COMX_CMD_OPEN 16
#define COMX_CMD_CLOSE 17
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