Changed and added debug stuff.
Better data sending. (still problems with tty's flip buffer)
This commit is contained in:
parent
0e93112b81
commit
298105698f
|
@ -21,6 +21,10 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.2 1999/01/10 18:46:04 armin
|
||||||
|
* Bug with wrong values in HLC fixed.
|
||||||
|
* Bytes to send are counted and limited now.
|
||||||
|
*
|
||||||
* Revision 1.1 1999/01/01 18:09:41 armin
|
* Revision 1.1 1999/01/01 18:09:41 armin
|
||||||
* First checkin of new eicon driver.
|
* First checkin of new eicon driver.
|
||||||
* DIVA-Server BRI/PCI and PRI/PCI are supported.
|
* DIVA-Server BRI/PCI and PRI/PCI are supported.
|
||||||
|
@ -44,6 +48,7 @@
|
||||||
|
|
||||||
#define DIEHL_IOCTL_MANIF 90
|
#define DIEHL_IOCTL_MANIF 90
|
||||||
|
|
||||||
|
#define DIEHL_IOCTL_FREEIT 97
|
||||||
#define DIEHL_IOCTL_TEST 98
|
#define DIEHL_IOCTL_TEST 98
|
||||||
#define DIEHL_IOCTL_DEBUGVAR 99
|
#define DIEHL_IOCTL_DEBUGVAR 99
|
||||||
|
|
||||||
|
@ -65,6 +70,7 @@
|
||||||
#define DIEHL_CTYPE_MASK 0x0f
|
#define DIEHL_CTYPE_MASK 0x0f
|
||||||
#define DIEHL_CTYPE_QUADRO_NR(n) (n<<4)
|
#define DIEHL_CTYPE_QUADRO_NR(n) (n<<4)
|
||||||
|
|
||||||
|
#define MAX_HEADER_LEN 10
|
||||||
|
|
||||||
/* Struct for adding new cards */
|
/* Struct for adding new cards */
|
||||||
typedef struct diehl_cdef {
|
typedef struct diehl_cdef {
|
||||||
|
@ -174,7 +180,13 @@ typedef struct {
|
||||||
#include <linux/isdnif.h>
|
#include <linux/isdnif.h>
|
||||||
#include "eicon_isa.h"
|
#include "eicon_isa.h"
|
||||||
|
|
||||||
#endif
|
/* Macro for delay via schedule() */
|
||||||
|
#define SLEEP(j) { \
|
||||||
|
current->state = TASK_INTERRUPTIBLE; \
|
||||||
|
schedule_timeout(j); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* KERNEL */
|
||||||
|
|
||||||
|
|
||||||
#define DSP_COMBIFILE_FORMAT_IDENTIFICATION_SIZE 48
|
#define DSP_COMBIFILE_FORMAT_IDENTIFICATION_SIZE 48
|
||||||
|
@ -308,6 +320,7 @@ typedef struct {
|
||||||
unsigned short eazmask; /* EAZ-Mask for this Channel */
|
unsigned short eazmask; /* EAZ-Mask for this Channel */
|
||||||
unsigned int queued; /* User-Data Bytes in TX queue */
|
unsigned int queued; /* User-Data Bytes in TX queue */
|
||||||
unsigned int waitq; /* User-Data Bytes in wait queue */
|
unsigned int waitq; /* User-Data Bytes in wait queue */
|
||||||
|
unsigned int waitpq; /* User-Data Bytes in packet queue */
|
||||||
unsigned short plci;
|
unsigned short plci;
|
||||||
unsigned short ncci;
|
unsigned short ncci;
|
||||||
unsigned char l2prot; /* Layer 2 protocol */
|
unsigned char l2prot; /* Layer 2 protocol */
|
||||||
|
@ -352,7 +365,7 @@ typedef struct {
|
||||||
#define DIEHL_STATE_ICALLW 14
|
#define DIEHL_STATE_ICALLW 14
|
||||||
#define DIEHL_STATE_LISTEN 15
|
#define DIEHL_STATE_LISTEN 15
|
||||||
|
|
||||||
#define DIEHL_MAX_QUEUED 8000 /* 2 * maxbuff */
|
#define EICON_MAX_QUEUED 8000 /* 2 * maxbuff */
|
||||||
|
|
||||||
#define DIEHL_LOCK_TX 0
|
#define DIEHL_LOCK_TX 0
|
||||||
#define DIEHL_LOCK_RX 1
|
#define DIEHL_LOCK_RX 1
|
||||||
|
@ -453,6 +466,7 @@ extern __inline__ void diehl_schedule_ack(diehl_card *card)
|
||||||
|
|
||||||
extern char *diehl_find_eaz(diehl_card *, char);
|
extern char *diehl_find_eaz(diehl_card *, char);
|
||||||
extern int diehl_addcard(int, int, int, char *);
|
extern int diehl_addcard(int, int, int, char *);
|
||||||
|
extern ulong DebugVar;
|
||||||
|
|
||||||
#endif /* __KERNEL__ */
|
#endif /* __KERNEL__ */
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,6 +21,11 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.1 1999/01/01 18:09:42 armin
|
||||||
|
* First checkin of new eicon driver.
|
||||||
|
* DIVA-Server BRI/PCI and PRI/PCI are supported.
|
||||||
|
* Old diehl code is obsolete.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -55,6 +60,7 @@
|
||||||
#define FAC_REG_ACK 19 /* fac registration acknowledge */
|
#define FAC_REG_ACK 19 /* fac registration acknowledge */
|
||||||
#define FAC_REG_REJ 20 /* fac registration reject */
|
#define FAC_REG_REJ 20 /* fac registration reject */
|
||||||
#define CALL_COMPLETE 21/* send a CALL_PROC for incoming call */
|
#define CALL_COMPLETE 21/* send a CALL_PROC for incoming call */
|
||||||
|
#define AOC_IND 26/* Advice of Charge */
|
||||||
|
|
||||||
#define IDI_N_MDATA (0x01)
|
#define IDI_N_MDATA (0x01)
|
||||||
#define IDI_N_CONNECT (0x02)
|
#define IDI_N_CONNECT (0x02)
|
||||||
|
@ -89,8 +95,8 @@
|
||||||
#define LLI 0x19 /* logical link id */
|
#define LLI 0x19 /* logical link id */
|
||||||
#define CHA 0x1a /* charge advice */
|
#define CHA 0x1a /* charge advice */
|
||||||
#define FTY 0x1c
|
#define FTY 0x1c
|
||||||
#define PI 0x1e
|
#define PI 0x1e /* Progress Indicator */
|
||||||
#define NI 0x27
|
#define NI 0x27 /* Notification Indicator */
|
||||||
#define DT 0x29 /* ETSI date/time */
|
#define DT 0x29 /* ETSI date/time */
|
||||||
#define KEY 0x2c /* keypad information element */
|
#define KEY 0x2c /* keypad information element */
|
||||||
#define DSP 0x28 /* display */
|
#define DSP 0x28 /* display */
|
||||||
|
@ -98,6 +104,7 @@
|
||||||
#define OSA 0x6d /* origination sub-address */
|
#define OSA 0x6d /* origination sub-address */
|
||||||
#define CPN 0x70 /* called party number */
|
#define CPN 0x70 /* called party number */
|
||||||
#define DSA 0x71 /* destination sub-address */
|
#define DSA 0x71 /* destination sub-address */
|
||||||
|
#define RDN 0x74 /* redirecting number */
|
||||||
#define LLC 0x7c /* low layer compatibility */
|
#define LLC 0x7c /* low layer compatibility */
|
||||||
#define HLC 0x7d /* high layer compatibility */
|
#define HLC 0x7d /* high layer compatibility */
|
||||||
#define UUI 0x7e /* user user information */
|
#define UUI 0x7e /* user user information */
|
||||||
|
@ -132,6 +139,8 @@
|
||||||
#define TIMER_INT 0xfe /* timer interrupt */
|
#define TIMER_INT 0xfe /* timer interrupt */
|
||||||
#define OK 0xff /* command accepted */
|
#define OK 0xff /* command accepted */
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char cpn[32];
|
char cpn[32];
|
||||||
char oad[32];
|
char oad[32];
|
||||||
|
@ -142,14 +151,17 @@ typedef struct {
|
||||||
__u8 sin[4];
|
__u8 sin[4];
|
||||||
__u8 chi[4];
|
__u8 chi[4];
|
||||||
__u8 e_chi[4];
|
__u8 e_chi[4];
|
||||||
__u8 bc[32];
|
__u8 bc[12];
|
||||||
__u8 e_bc[8];
|
__u8 e_bc[12];
|
||||||
__u8 llc[5];
|
__u8 llc[18];
|
||||||
__u8 hlc[5];
|
__u8 hlc[5];
|
||||||
__u8 cau[4];
|
__u8 cau[4];
|
||||||
__u8 e_cau[2];
|
__u8 e_cau[2];
|
||||||
__u8 e_mt;
|
__u8 e_mt;
|
||||||
char dt[32];
|
__u8 dt[6];
|
||||||
|
char display[83];
|
||||||
|
char keypad[35];
|
||||||
|
char rdn[32];
|
||||||
} idi_ind_message;
|
} idi_ind_message;
|
||||||
|
|
||||||
extern int idi_do_req(diehl_card *card, diehl_chan *chan, int cmd, int layer);
|
extern int idi_do_req(diehl_card *card, diehl_chan *chan, int cmd, int layer);
|
||||||
|
|
|
@ -21,22 +21,17 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.1 1999/01/01 18:09:43 armin
|
||||||
|
* First checkin of new eicon driver.
|
||||||
|
* DIVA-Server BRI/PCI and PRI/PCI are supported.
|
||||||
|
* Old diehl code is obsolete.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "eicon.h"
|
#include "eicon.h"
|
||||||
#include "eicon_isa.h"
|
#include "eicon_isa.h"
|
||||||
|
|
||||||
/* Macro for delay via schedule() */
|
|
||||||
#define SLEEP(j) { \
|
|
||||||
current->state = TASK_INTERRUPTIBLE; \
|
|
||||||
schedule_timeout(j); \
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Hopefully, a separate resource-registration-scheme for shared-memory
|
|
||||||
* will be introduced into the kernel. Until then, we use the normal
|
|
||||||
* routines, designed for port-registration.
|
|
||||||
*/
|
|
||||||
#define check_shmem check_region
|
#define check_shmem check_region
|
||||||
#define release_shmem release_region
|
#define release_shmem release_region
|
||||||
#define request_shmem request_region
|
#define request_shmem request_region
|
||||||
|
@ -101,8 +96,8 @@ diehl_isa_irq(int irq, void *dev_id, struct pt_regs *regs) {
|
||||||
}
|
}
|
||||||
if ((tmp = readb(&com->Rc)) != 0) {
|
if ((tmp = readb(&com->Rc)) != 0) {
|
||||||
diehl_ack *ack;
|
diehl_ack *ack;
|
||||||
|
if (DebugVar & 64)
|
||||||
printk("diehl_int: Rc=%d\n", tmp);
|
printk("diehl_int: Rc=%d\n", tmp);
|
||||||
skb = alloc_skb(sizeof(diehl_ack), GFP_ATOMIC);
|
skb = alloc_skb(sizeof(diehl_ack), GFP_ATOMIC);
|
||||||
ack = (diehl_ack *)skb_put(skb, sizeof(diehl_ack));
|
ack = (diehl_ack *)skb_put(skb, sizeof(diehl_ack));
|
||||||
ack->ret = tmp;
|
ack->ret = tmp;
|
||||||
|
@ -118,7 +113,8 @@ diehl_isa_irq(int irq, void *dev_id, struct pt_regs *regs) {
|
||||||
int len = readw(&com->RBuffer.len);
|
int len = readw(&com->RBuffer.len);
|
||||||
diehl_indhdr *ind;
|
diehl_indhdr *ind;
|
||||||
|
|
||||||
printk(KERN_DEBUG "eicon_ind Ind=%d\n", tmp);
|
if (DebugVar & 16)
|
||||||
|
printk(KERN_DEBUG "eicon_ind Ind=%d\n", tmp);
|
||||||
skb = alloc_skb(len+sizeof(diehl_indhdr), GFP_ATOMIC);
|
skb = alloc_skb(len+sizeof(diehl_indhdr), GFP_ATOMIC);
|
||||||
skb_reserve(skb, sizeof(diehl_indhdr));
|
skb_reserve(skb, sizeof(diehl_indhdr));
|
||||||
ind = (diehl_indhdr *)skb_push(skb, sizeof(diehl_indhdr));
|
ind = (diehl_indhdr *)skb_push(skb, sizeof(diehl_indhdr));
|
||||||
|
@ -200,7 +196,8 @@ diehl_isa_transmit(diehl_isa_card *card) {
|
||||||
reqbuf = (diehl_req *)skb->data;
|
reqbuf = (diehl_req *)skb->data;
|
||||||
skb_pull(skb, sizeof(diehl_req));
|
skb_pull(skb, sizeof(diehl_req));
|
||||||
if (skb->len > 269) {
|
if (skb->len > 269) {
|
||||||
printk(KERN_WARNING "eicon_isa_transmit: skb > 269 bytes!!!\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_WARNING "eicon_isa_transmit: skb > 269 bytes!!!\n");
|
||||||
writeb(0, &com->XLock);
|
writeb(0, &com->XLock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,11 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.1 1999/01/01 18:09:44 armin
|
||||||
|
* First checkin of new eicon driver.
|
||||||
|
* DIVA-Server BRI/PCI and PRI/PCI are supported.
|
||||||
|
* Old diehl code is obsolete.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -42,6 +47,12 @@ extern char *diehl_pci_revision;
|
||||||
extern char *diehl_isa_revision;
|
extern char *diehl_isa_revision;
|
||||||
extern char *diehl_idi_revision;
|
extern char *diehl_idi_revision;
|
||||||
|
|
||||||
|
#ifdef MODULE
|
||||||
|
#define MOD_USE_COUNT (GET_USE_COUNT (&__this_module))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ulong DebugVar;
|
||||||
|
|
||||||
/* Parameters to be set by insmod */
|
/* Parameters to be set by insmod */
|
||||||
static int type = -1;
|
static int type = -1;
|
||||||
static int membase = -1;
|
static int membase = -1;
|
||||||
|
@ -49,7 +60,7 @@ static int irq = -1;
|
||||||
static char *id = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
static char *id = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||||
|
|
||||||
MODULE_DESCRIPTION( "Driver for Eicon.Diehl active ISDN cards");
|
MODULE_DESCRIPTION( "Driver for Eicon.Diehl active ISDN cards");
|
||||||
MODULE_AUTHOR( "Armin Schindler / Fritz Elfert");
|
MODULE_AUTHOR( "Armin Schindler");
|
||||||
MODULE_SUPPORTED_DEVICE( "ISDN subsystem");
|
MODULE_SUPPORTED_DEVICE( "ISDN subsystem");
|
||||||
MODULE_PARM_DESC(type, "Type of first card");
|
MODULE_PARM_DESC(type, "Type of first card");
|
||||||
MODULE_PARM_DESC(membase, "Base address, if ISA card");
|
MODULE_PARM_DESC(membase, "Base address, if ISA card");
|
||||||
|
@ -92,7 +103,8 @@ find_channel(diehl_card *card, int channel)
|
||||||
{
|
{
|
||||||
if ((channel >= 0) && (channel < card->nchannels))
|
if ((channel >= 0) && (channel < card->nchannels))
|
||||||
return &(card->bch[channel]);
|
return &(card->bch[channel]);
|
||||||
printk(KERN_WARNING "eicon: Invalid channel %d\n", channel);
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_WARNING "eicon: Invalid channel %d\n", channel);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,9 +204,10 @@ diehl_set_msn(diehl_card *card, char *eazmsn)
|
||||||
card->msn_list = p->next;
|
card->msn_list = p->next;
|
||||||
restore_flags(flags);
|
restore_flags(flags);
|
||||||
kfree(p);
|
kfree(p);
|
||||||
printk(KERN_DEBUG
|
if (DebugVar & 8)
|
||||||
"Mapping for EAZ %c deleted\n",
|
printk(KERN_DEBUG
|
||||||
eazmsn[0]);
|
"Mapping for EAZ %c deleted\n",
|
||||||
|
eazmsn[0]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
q = p;
|
q = p;
|
||||||
|
@ -210,10 +223,11 @@ diehl_set_msn(diehl_card *card, char *eazmsn)
|
||||||
cli();
|
cli();
|
||||||
strcpy(p->msn, &eazmsn[1]);
|
strcpy(p->msn, &eazmsn[1]);
|
||||||
restore_flags(flags);
|
restore_flags(flags);
|
||||||
printk(KERN_DEBUG
|
if (DebugVar & 8)
|
||||||
"Mapping for EAZ %c changed to %s\n",
|
printk(KERN_DEBUG
|
||||||
eazmsn[0],
|
"Mapping for EAZ %c changed to %s\n",
|
||||||
&eazmsn[1]);
|
eazmsn[0],
|
||||||
|
&eazmsn[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
p = p->next;
|
p = p->next;
|
||||||
|
@ -229,10 +243,11 @@ diehl_set_msn(diehl_card *card, char *eazmsn)
|
||||||
cli();
|
cli();
|
||||||
card->msn_list = p;
|
card->msn_list = p;
|
||||||
restore_flags(flags);
|
restore_flags(flags);
|
||||||
printk(KERN_DEBUG
|
if (DebugVar & 8)
|
||||||
"Mapping %c -> %s added\n",
|
printk(KERN_DEBUG
|
||||||
eazmsn[0],
|
"Mapping %c -> %s added\n",
|
||||||
&eazmsn[1]);
|
eazmsn[0],
|
||||||
|
&eazmsn[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -250,8 +265,9 @@ diehl_rcv_dispatch(struct diehl_card *card)
|
||||||
#endif
|
#endif
|
||||||
case DIEHL_BUS_MCA:
|
case DIEHL_BUS_MCA:
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING
|
if (DebugVar & 1)
|
||||||
"eicon_ack_dispatch: Illegal bustype %d\n", card->bus);
|
printk(KERN_WARNING
|
||||||
|
"eicon_ack_dispatch: Illegal bustype %d\n", card->bus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,8 +284,9 @@ diehl_ack_dispatch(struct diehl_card *card)
|
||||||
#endif
|
#endif
|
||||||
case DIEHL_BUS_MCA:
|
case DIEHL_BUS_MCA:
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING
|
if (DebugVar & 1)
|
||||||
"eicon_ack_dispatch: Illegal bustype %d\n", card->bus);
|
printk(KERN_WARNING
|
||||||
|
"eicon_ack_dispatch: Illegal bustype %d\n", card->bus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,29 +304,12 @@ diehl_transmit(struct diehl_card *card)
|
||||||
#endif
|
#endif
|
||||||
case DIEHL_BUS_MCA:
|
case DIEHL_BUS_MCA:
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING
|
if (DebugVar & 1)
|
||||||
"eicon_transmit: Illegal bustype %d\n", card->bus);
|
printk(KERN_WARNING
|
||||||
|
"eicon_transmit: Illegal bustype %d\n", card->bus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void
|
|
||||||
diehl_receive(struct diehl_card *card)
|
|
||||||
{
|
|
||||||
switch (card->bus) {
|
|
||||||
case DIEHL_BUS_ISA:
|
|
||||||
break;
|
|
||||||
case DIEHL_BUS_PCI:
|
|
||||||
#if CONFIG_PCI
|
|
||||||
#endif
|
|
||||||
case DIEHL_BUS_MCA:
|
|
||||||
default:
|
|
||||||
printk(KERN_WARNING
|
|
||||||
"eicon_receive: Illegal bustype %d\n", card->bus);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
diehl_command(diehl_card * card, isdn_ctrl * c)
|
diehl_command(diehl_card * card, isdn_ctrl * c)
|
||||||
{
|
{
|
||||||
|
@ -336,8 +336,9 @@ diehl_command(diehl_card * card, isdn_ctrl * c)
|
||||||
return card->hwif.pci.irq;
|
return card->hwif.pci.irq;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING
|
if (DebugVar & 1)
|
||||||
"eicon: Illegal BUS type %d\n",
|
printk(KERN_WARNING
|
||||||
|
"eicon: Illegal BUS type %d\n",
|
||||||
card->bus);
|
card->bus);
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
}
|
}
|
||||||
|
@ -349,8 +350,9 @@ diehl_command(diehl_card * card, isdn_ctrl * c)
|
||||||
card->hwif.isa.irq = a;
|
card->hwif.isa.irq = a;
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING
|
if (DebugVar & 1)
|
||||||
"eicon: Illegal BUS type %d\n",
|
printk(KERN_WARNING
|
||||||
|
"eicon: Illegal BUS type %d\n",
|
||||||
card->bus);
|
card->bus);
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
}
|
}
|
||||||
|
@ -364,8 +366,9 @@ diehl_command(diehl_card * card, isdn_ctrl * c)
|
||||||
card->flags |= DIEHL_FLAGS_LOADED;
|
card->flags |= DIEHL_FLAGS_LOADED;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING
|
if (DebugVar & 1)
|
||||||
"eicon: Illegal BUS type %d\n",
|
printk(KERN_WARNING
|
||||||
|
"eicon: Illegal BUS type %d\n",
|
||||||
card->bus);
|
card->bus);
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
}
|
}
|
||||||
|
@ -423,6 +426,16 @@ diehl_command(diehl_card * card, isdn_ctrl * c)
|
||||||
if (diehl_addcard(cdef.type, cdef.membase, cdef.irq, cdef.id))
|
if (diehl_addcard(cdef.type, cdef.membase, cdef.irq, cdef.id))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
return 0;
|
return 0;
|
||||||
|
case DIEHL_IOCTL_DEBUGVAR:
|
||||||
|
DebugVar = a;
|
||||||
|
printk(KERN_DEBUG"eicon: Debug Value set to %ld\n", DebugVar);
|
||||||
|
return 0;
|
||||||
|
#ifdef MODULE
|
||||||
|
case DIEHL_IOCTL_FREEIT:
|
||||||
|
while (MOD_USE_COUNT > 0) MOD_DEC_USE_COUNT;
|
||||||
|
MOD_INC_USE_COUNT;
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -436,8 +449,9 @@ diehl_command(diehl_card * card, isdn_ctrl * c)
|
||||||
cli();
|
cli();
|
||||||
if ((chan->fsm_state != DIEHL_STATE_NULL) && (chan->fsm_state != DIEHL_STATE_LISTEN)) {
|
if ((chan->fsm_state != DIEHL_STATE_NULL) && (chan->fsm_state != DIEHL_STATE_LISTEN)) {
|
||||||
restore_flags(flags);
|
restore_flags(flags);
|
||||||
printk(KERN_WARNING "Dial on channel with state %d\n",
|
if (DebugVar & 1)
|
||||||
chan->fsm_state);
|
printk(KERN_WARNING "Dial on channel %d with state %d\n",
|
||||||
|
chan->No, chan->fsm_state);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
if (card->ptype == ISDN_PTYPE_EURO)
|
if (card->ptype == ISDN_PTYPE_EURO)
|
||||||
|
@ -524,7 +538,8 @@ diehl_command(diehl_card * card, isdn_ctrl * c)
|
||||||
if (!card->flags & DIEHL_FLAGS_RUNNING)
|
if (!card->flags & DIEHL_FLAGS_RUNNING)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
if ((c->arg >> 8) != ISDN_PROTO_L3_TRANS) {
|
if ((c->arg >> 8) != ISDN_PROTO_L3_TRANS) {
|
||||||
printk(KERN_WARNING "L3 protocol unknown\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_WARNING "L3 protocol unknown\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!(chan = find_channel(card, c->arg & 0x1f)))
|
if (!(chan = find_channel(card, c->arg & 0x1f)))
|
||||||
|
@ -540,17 +555,20 @@ diehl_command(diehl_card * card, isdn_ctrl * c)
|
||||||
case ISDN_CMD_GETEAZ:
|
case ISDN_CMD_GETEAZ:
|
||||||
if (!card->flags & DIEHL_FLAGS_RUNNING)
|
if (!card->flags & DIEHL_FLAGS_RUNNING)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
printk(KERN_DEBUG "eicon CMD_GETEAZ not implemented\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_DEBUG "eicon CMD_GETEAZ not implemented\n");
|
||||||
return 0;
|
return 0;
|
||||||
case ISDN_CMD_SETSIL:
|
case ISDN_CMD_SETSIL:
|
||||||
if (!card->flags & DIEHL_FLAGS_RUNNING)
|
if (!card->flags & DIEHL_FLAGS_RUNNING)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
printk(KERN_DEBUG "eicon CMD_SETSIL not implemented\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_DEBUG "eicon CMD_SETSIL not implemented\n");
|
||||||
return 0;
|
return 0;
|
||||||
case ISDN_CMD_GETSIL:
|
case ISDN_CMD_GETSIL:
|
||||||
if (!card->flags & DIEHL_FLAGS_RUNNING)
|
if (!card->flags & DIEHL_FLAGS_RUNNING)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
printk(KERN_DEBUG "eicon CMD_GETSIL not implemented\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_DEBUG "eicon CMD_GETSIL not implemented\n");
|
||||||
return 0;
|
return 0;
|
||||||
case ISDN_CMD_LOCK:
|
case ISDN_CMD_LOCK:
|
||||||
MOD_INC_USE_COUNT;
|
MOD_INC_USE_COUNT;
|
||||||
|
@ -760,7 +778,8 @@ diehl_alloccard(int type, int membase, int irq, char *id)
|
||||||
card->interface.features |=
|
card->interface.features |=
|
||||||
ISDN_FEATURE_L2_V11096 |
|
ISDN_FEATURE_L2_V11096 |
|
||||||
ISDN_FEATURE_L2_V11019 |
|
ISDN_FEATURE_L2_V11019 |
|
||||||
ISDN_FEATURE_L2_V11038;
|
ISDN_FEATURE_L2_V11038 |
|
||||||
|
ISDN_FEATURE_L2_MODEM;
|
||||||
card->hwif.pci.card = (void *)card;
|
card->hwif.pci.card = (void *)card;
|
||||||
card->hwif.pci.PCIreg = pcic->PCIreg;
|
card->hwif.pci.PCIreg = pcic->PCIreg;
|
||||||
card->hwif.pci.PCIcfg = pcic->PCIcfg;
|
card->hwif.pci.PCIcfg = pcic->PCIcfg;
|
||||||
|
@ -779,7 +798,8 @@ diehl_alloccard(int type, int membase, int irq, char *id)
|
||||||
card->interface.features |=
|
card->interface.features |=
|
||||||
ISDN_FEATURE_L2_V11096 |
|
ISDN_FEATURE_L2_V11096 |
|
||||||
ISDN_FEATURE_L2_V11019 |
|
ISDN_FEATURE_L2_V11019 |
|
||||||
ISDN_FEATURE_L2_V11038;
|
ISDN_FEATURE_L2_V11038 |
|
||||||
|
ISDN_FEATURE_L2_MODEM;
|
||||||
card->hwif.pci.card = (void *)card;
|
card->hwif.pci.card = (void *)card;
|
||||||
card->hwif.pci.shmem = (diehl_pci_shmem *)pcic->shmem;
|
card->hwif.pci.shmem = (diehl_pci_shmem *)pcic->shmem;
|
||||||
card->hwif.pci.PCIreg = pcic->PCIreg;
|
card->hwif.pci.PCIreg = pcic->PCIreg;
|
||||||
|
@ -842,8 +862,9 @@ diehl_registercard(diehl_card * card)
|
||||||
#endif
|
#endif
|
||||||
case DIEHL_BUS_MCA:
|
case DIEHL_BUS_MCA:
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING
|
if (DebugVar & 1)
|
||||||
"eicon_registercard: Illegal BUS type %d\n",
|
printk(KERN_WARNING
|
||||||
|
"eicon_registercard: Illegal BUS type %d\n",
|
||||||
card->bus);
|
card->bus);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -858,6 +879,7 @@ diehl_registercard(diehl_card * card)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MODULE
|
||||||
static void
|
static void
|
||||||
unregister_card(diehl_card * card)
|
unregister_card(diehl_card * card)
|
||||||
{
|
{
|
||||||
|
@ -877,12 +899,14 @@ unregister_card(diehl_card * card)
|
||||||
#endif
|
#endif
|
||||||
case DIEHL_BUS_MCA:
|
case DIEHL_BUS_MCA:
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING
|
if (DebugVar & 1)
|
||||||
"eicon: Invalid BUS type %d\n",
|
printk(KERN_WARNING
|
||||||
|
"eicon: Invalid BUS type %d\n",
|
||||||
card->bus);
|
card->bus);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* MODULE */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
diehl_freecard(diehl_card *card) {
|
diehl_freecard(diehl_card *card) {
|
||||||
|
@ -924,8 +948,9 @@ diehl_addcard(int type, int membase, int irq, char *id)
|
||||||
#endif
|
#endif
|
||||||
case DIEHL_BUS_MCA:
|
case DIEHL_BUS_MCA:
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING
|
if (DebugVar & 1)
|
||||||
"eicon: addcard: Invalid BUS type %d\n",
|
printk(KERN_WARNING
|
||||||
|
"eicon: addcard: Invalid BUS type %d\n",
|
||||||
p->bus);
|
p->bus);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
@ -958,15 +983,17 @@ diehl_addcard(int type, int membase, int irq, char *id)
|
||||||
#define DRIVERNAME "Eicon active ISDN driver"
|
#define DRIVERNAME "Eicon active ISDN driver"
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
#define diehl_init init_module
|
#define eicon_init init_module
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
diehl_init(void)
|
eicon_init(void)
|
||||||
{
|
{
|
||||||
int tmp = 0;
|
int tmp = 0;
|
||||||
char tmprev[50];
|
char tmprev[50];
|
||||||
|
|
||||||
|
DebugVar = 1;
|
||||||
|
|
||||||
printk(KERN_INFO "%s Rev: ", DRIVERNAME);
|
printk(KERN_INFO "%s Rev: ", DRIVERNAME);
|
||||||
strcpy(tmprev, diehl_revision);
|
strcpy(tmprev, diehl_revision);
|
||||||
printk("%s/", diehl_getrev(tmprev));
|
printk("%s/", diehl_getrev(tmprev));
|
||||||
|
@ -987,7 +1014,9 @@ diehl_init(void)
|
||||||
else
|
else
|
||||||
printk(KERN_INFO "eicon: %d card%s added\n", tmp, (tmp>1)?"s":"");
|
printk(KERN_INFO "eicon: %d card%s added\n", tmp, (tmp>1)?"s":"");
|
||||||
/* No symbols to export, hide all symbols */
|
/* No symbols to export, hide all symbols */
|
||||||
|
|
||||||
EXPORT_NO_SYMBOLS;
|
EXPORT_NO_SYMBOLS;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1012,9 +1041,9 @@ cleanup_module(void)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
void
|
void
|
||||||
diehl_setup(char *str, int *ints)
|
eicon_setup(char *str, int *ints)
|
||||||
{
|
{
|
||||||
int i, j, argc, membase, irq, type;
|
int i, argc, membase, irq, type;
|
||||||
|
|
||||||
argc = ints[0];
|
argc = ints[0];
|
||||||
i = 1;
|
i = 1;
|
||||||
|
|
|
@ -26,6 +26,10 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
|
* Revision 1.2 1999/01/10 18:46:06 armin
|
||||||
|
* Bug with wrong values in HLC fixed.
|
||||||
|
* Bytes to send are counted and limited now.
|
||||||
|
*
|
||||||
* Revision 1.1 1999/01/01 18:09:45 armin
|
* Revision 1.1 1999/01/01 18:09:45 armin
|
||||||
* First checkin of new eicon driver.
|
* First checkin of new eicon driver.
|
||||||
* DIVA-Server BRI/PCI and PRI/PCI are supported.
|
* DIVA-Server BRI/PCI and PRI/PCI are supported.
|
||||||
|
@ -39,28 +43,18 @@
|
||||||
#include "eicon.h"
|
#include "eicon.h"
|
||||||
#include "eicon_pci.h"
|
#include "eicon_pci.h"
|
||||||
|
|
||||||
/* Macro for delay via schedule() */
|
|
||||||
#define SLEEP(j) { \
|
|
||||||
current->state = TASK_INTERRUPTIBLE; \
|
|
||||||
schedule_timeout(j); \
|
|
||||||
}
|
|
||||||
|
|
||||||
char *diehl_pci_revision = "$Revision$";
|
char *diehl_pci_revision = "$Revision$";
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_PCI /* intire stuff is only for PCI */
|
#if CONFIG_PCI /* intire stuff is only for PCI */
|
||||||
|
|
||||||
|
#undef DIEHL_PCI_DEBUG
|
||||||
|
|
||||||
|
|
||||||
#undef DIEHL_PCI_DEBUG /* if you want diehl_pci more verbose */
|
|
||||||
|
|
||||||
|
|
||||||
int diehl_pci_find_card(char *ID)
|
int diehl_pci_find_card(char *ID)
|
||||||
{
|
{
|
||||||
|
if (pci_present()) {
|
||||||
if (pci_present()) {
|
struct pci_dev *pdev = NULL;
|
||||||
struct pci_dev *pdev = NULL;
|
|
||||||
|
|
||||||
int pci_nextindex=0, pci_cards=0, pci_akt=0;
|
int pci_nextindex=0, pci_cards=0, pci_akt=0;
|
||||||
int pci_type = PCI_MAESTRA;
|
int pci_type = PCI_MAESTRA;
|
||||||
int NoMorePCICards = FALSE;
|
int NoMorePCICards = FALSE;
|
||||||
|
@ -78,7 +72,10 @@ int diehl_pci_find_card(char *ID)
|
||||||
for (pci_cards = 0; pci_cards < 0x0f; pci_cards++)
|
for (pci_cards = 0; pci_cards < 0x0f; pci_cards++)
|
||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
if ((pdev = pci_find_device(PCI_VENDOR_EICON, pci_type, pdev))) {
|
if ((pdev = pci_find_device(PCI_VENDOR_EICON,
|
||||||
|
pci_type,
|
||||||
|
pdev)))
|
||||||
|
{
|
||||||
pci_nextindex++;
|
pci_nextindex++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -121,6 +118,7 @@ int diehl_pci_find_card(char *ID)
|
||||||
case PCI_MAESTRA:
|
case PCI_MAESTRA:
|
||||||
printk(KERN_INFO "eicon_pci: DIVA Server BRI/PCI detected !\n");
|
printk(KERN_INFO "eicon_pci: DIVA Server BRI/PCI detected !\n");
|
||||||
aparms->type = DIEHL_CTYPE_MAESTRA;
|
aparms->type = DIEHL_CTYPE_MAESTRA;
|
||||||
|
|
||||||
aparms->irq = pdev->irq;
|
aparms->irq = pdev->irq;
|
||||||
preg = pdev->base_address[2] & 0xfffffffc;
|
preg = pdev->base_address[2] & 0xfffffffc;
|
||||||
pcfg = pdev->base_address[1] & 0xffffff80;
|
pcfg = pdev->base_address[1] & 0xffffff80;
|
||||||
|
@ -355,7 +353,8 @@ diehl_pci_rcv_dispatch(diehl_pci_card *card) {
|
||||||
diehl_chan *chan;
|
diehl_chan *chan;
|
||||||
|
|
||||||
if (!card) {
|
if (!card) {
|
||||||
printk(KERN_WARNING "eicon_pci_rcv_dispatch: NULL card!\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_WARNING "eicon_pci_rcv_dispatch: NULL card!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,7 +362,8 @@ diehl_pci_rcv_dispatch(diehl_pci_card *card) {
|
||||||
ind = (diehl_pci_IND *)skb->data;
|
ind = (diehl_pci_IND *)skb->data;
|
||||||
|
|
||||||
if ((chan = card->IdTable[ind->IndId]) == NULL) {
|
if ((chan = card->IdTable[ind->IndId]) == NULL) {
|
||||||
printk(KERN_ERR "eicon_pci: Indication for unknown channel\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_ERR "eicon_pci: Indication for unknown channel Ind=%d Id=%d\n", ind->Ind, ind->IndId);
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,8 @@ diehl_pci_rcv_dispatch(diehl_pci_card *card) {
|
||||||
else {
|
else {
|
||||||
if (!(skb2 = skb_dequeue(&chan->e.R))) {
|
if (!(skb2 = skb_dequeue(&chan->e.R))) {
|
||||||
chan->e.complete = 1;
|
chan->e.complete = 1;
|
||||||
printk(KERN_ERR "eicon_pci: buffer incomplete, but 0 in queue\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_ERR "eicon_pci: buffer incomplete, but 0 in queue\n");
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
dev_kfree_skb(skb2);
|
dev_kfree_skb(skb2);
|
||||||
continue;
|
continue;
|
||||||
|
@ -423,7 +424,8 @@ diehl_pci_ack_dispatch(diehl_pci_card *card) {
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
|
|
||||||
if (!card) {
|
if (!card) {
|
||||||
printk(KERN_WARNING "eicon_pci_ack_dispatch: NULL card!\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_WARNING "eicon_pci_ack_dispatch: NULL card!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
while((skb = skb_dequeue(&((diehl_card *)card->card)->rackq))) {
|
while((skb = skb_dequeue(&((diehl_card *)card->card)->rackq))) {
|
||||||
|
@ -615,7 +617,8 @@ diehl_pci_transmit(diehl_pci_card *card) {
|
||||||
int ReqCount;
|
int ReqCount;
|
||||||
|
|
||||||
if (!card) {
|
if (!card) {
|
||||||
printk(KERN_WARNING "eicon_pci_transmit: NULL card!\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_WARNING "eicon_pci_transmit: NULL card!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ram = (char *)card->PCIram;
|
ram = (char *)card->PCIram;
|
||||||
|
@ -638,9 +641,8 @@ diehl_pci_transmit(diehl_pci_card *card) {
|
||||||
if (!(ram_inb(card, &prram->ReqOutput) - ram_inb(card, &prram->ReqInput))) {
|
if (!(ram_inb(card, &prram->ReqOutput) - ram_inb(card, &prram->ReqInput))) {
|
||||||
restore_flags(flags);
|
restore_flags(flags);
|
||||||
skb_queue_head(&((diehl_card *)card->card)->sndq, skb2);
|
skb_queue_head(&((diehl_card *)card->card)->sndq, skb2);
|
||||||
#ifdef DIEHL_PCI_DEBUG
|
if (DebugVar & 32)
|
||||||
printk(KERN_INFO "eicon_pci: transmit: Not ready\n");
|
printk(KERN_INFO "eicon_pci: transmit: Card not ready\n");
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
restore_flags(flags);
|
restore_flags(flags);
|
||||||
|
@ -666,36 +668,37 @@ diehl_pci_transmit(diehl_pci_card *card) {
|
||||||
else {
|
else {
|
||||||
ram_outb(card, &ReqOut->ReqId, chan->e.B2Id);
|
ram_outb(card, &ReqOut->ReqId, chan->e.B2Id);
|
||||||
chan->e.ReqCh = 1;
|
chan->e.ReqCh = 1;
|
||||||
if ((reqbuf->Req & 0x0f) == 0x08) /* Send Data */
|
if (((reqbuf->Req & 0x0f) == 0x08) ||
|
||||||
|
((reqbuf->Req & 0x0f) == 0x01)) { /* Send Data */
|
||||||
chan->waitq = reqbuf->XBuffer.length;
|
chan->waitq = reqbuf->XBuffer.length;
|
||||||
|
chan->waitpq += reqbuf->XBuffer.length;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else { /* It is an ASSIGN */
|
} else { /* It is an ASSIGN */
|
||||||
ram_outb(card, &ReqOut->ReqId, reqbuf->ReqId);
|
ram_outb(card, &ReqOut->ReqId, reqbuf->ReqId);
|
||||||
chan->e.ref = ram_inw(card, &ReqOut->Reference);
|
|
||||||
if (!reqbuf->Reference)
|
if (!reqbuf->Reference)
|
||||||
chan->e.ReqCh = 0;
|
chan->e.ReqCh = 0;
|
||||||
else
|
else
|
||||||
chan->e.ReqCh = 1;
|
chan->e.ReqCh = 1;
|
||||||
}
|
}
|
||||||
|
chan->e.ref = ram_inw(card, &ReqOut->Reference);
|
||||||
chan->e.Req = reqbuf->Req;
|
chan->e.Req = reqbuf->Req;
|
||||||
ReqCount++;
|
ReqCount++;
|
||||||
ram_outw(card, &prram->NextReq, ram_inw(card, &ReqOut->next));
|
ram_outw(card, &prram->NextReq, ram_inw(card, &ReqOut->next));
|
||||||
chan->e.busy = 1;
|
chan->e.busy = 1;
|
||||||
restore_flags(flags);
|
restore_flags(flags);
|
||||||
#ifdef DIEHL_PCI_DEBUG
|
if (DebugVar & 32)
|
||||||
printk(KERN_DEBUG "eicon_pci: Req=%x,Id=%x,Ch=%x Len=%x\n", reqbuf->Req,
|
printk(KERN_DEBUG "eicon_pci: Req=%x,Id=%x,Ch=%x Len=%x\n", reqbuf->Req,
|
||||||
ram_inb(card, &ReqOut->ReqId),
|
ram_inb(card, &ReqOut->ReqId),
|
||||||
reqbuf->ReqCh, reqbuf->XBuffer.length);
|
reqbuf->ReqCh, reqbuf->XBuffer.length);
|
||||||
#endif
|
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
}
|
}
|
||||||
dev_kfree_skb(skb2);
|
dev_kfree_skb(skb2);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skb_queue_tail(&((diehl_card *)card->card)->sackq, skb2);
|
skb_queue_tail(&((diehl_card *)card->card)->sackq, skb2);
|
||||||
#ifdef DIEHL_PCI_DEBUG
|
if (DebugVar & 32)
|
||||||
printk(KERN_INFO "eicon_pci: transmit: busy chan %d\n", chan->No);
|
printk(KERN_INFO "eicon_pci: transmit: busy chan %d\n", chan->No);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ram_outb(card, &prram->ReqInput, (__u8)(ram_inb(card, &prram->ReqInput) + ReqCount));
|
ram_outb(card, &prram->ReqInput, (__u8)(ram_inb(card, &prram->ReqInput) + ReqCount));
|
||||||
|
@ -761,14 +764,16 @@ diehl_pci_irq(int irq, void *dev_id, struct pt_regs *regs) {
|
||||||
switch(card->type) {
|
switch(card->type) {
|
||||||
case DIEHL_CTYPE_MAESTRAP:
|
case DIEHL_CTYPE_MAESTRAP:
|
||||||
if (!(readb(&ram[0x3fe]))) { /* card did not interrupt */
|
if (!(readb(&ram[0x3fe]))) { /* card did not interrupt */
|
||||||
printk(KERN_DEBUG "eicon_pci: IRQ: card tells no interrupt!\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_DEBUG "eicon_pci: IRQ: card tells no interrupt!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIEHL_CTYPE_MAESTRA:
|
case DIEHL_CTYPE_MAESTRA:
|
||||||
outw(0x3fe, card->PCIreg + M_ADDR);
|
outw(0x3fe, card->PCIreg + M_ADDR);
|
||||||
if (!(inb(card->PCIreg + M_DATA))) { /* card did not interrupt */
|
if (!(inb(card->PCIreg + M_DATA))) { /* card did not interrupt */
|
||||||
printk(KERN_DEBUG "eicon_pci: IRQ: card tells no interrupt!\n");
|
if (DebugVar & 1)
|
||||||
|
printk(KERN_DEBUG "eicon_pci: IRQ: card tells no interrupt!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -789,10 +794,9 @@ diehl_pci_irq(int irq, void *dev_id, struct pt_regs *regs) {
|
||||||
ack->RcId = ram_inb(card, &RcIn->RcId);
|
ack->RcId = ram_inb(card, &RcIn->RcId);
|
||||||
ack->RcCh = ram_inb(card, &RcIn->RcCh);
|
ack->RcCh = ram_inb(card, &RcIn->RcCh);
|
||||||
ack->Reference = ram_inw(card, &RcIn->Reference);
|
ack->Reference = ram_inw(card, &RcIn->Reference);
|
||||||
#ifdef DIEHL_PCI_DEBUG
|
if (DebugVar & 64)
|
||||||
printk(KERN_INFO "eicon_pci: IRQ Rc=%d Id=%d Ch=%d Ref=%d\n",
|
printk(KERN_INFO "eicon_pci: IRQ Rc=%d Id=%d Ch=%d Ref=%d\n",
|
||||||
Rc,ack->RcId,ack->RcCh,ack->Reference);
|
Rc,ack->RcId,ack->RcCh,ack->Reference);
|
||||||
#endif
|
|
||||||
ram_outb(card, &RcIn->Rc, 0);
|
ram_outb(card, &RcIn->Rc, 0);
|
||||||
skb_queue_tail(&((diehl_card *)card->card)->rackq, skb);
|
skb_queue_tail(&((diehl_card *)card->card)->rackq, skb);
|
||||||
diehl_schedule_ack((diehl_card *)card->card);
|
diehl_schedule_ack((diehl_card *)card->card);
|
||||||
|
@ -821,10 +825,9 @@ diehl_pci_irq(int irq, void *dev_id, struct pt_regs *regs) {
|
||||||
ind->MInd = ram_inb(card, &IndIn->MInd);
|
ind->MInd = ram_inb(card, &IndIn->MInd);
|
||||||
ind->MLength = ram_inw(card, &IndIn->MLength);
|
ind->MLength = ram_inw(card, &IndIn->MLength);
|
||||||
ind->RBuffer.length = len;
|
ind->RBuffer.length = len;
|
||||||
#ifdef DIEHL_PCI_DEBUG
|
if (DebugVar & 64)
|
||||||
printk(KERN_INFO "eicon_pci: IRQ Ind=%d Id=%d Ch=%d MInd=%d MLen=%d Len=%d\n",
|
printk(KERN_INFO "eicon_pci: IRQ Ind=%d Id=%d Ch=%d MInd=%d MLen=%d Len=%d\n",
|
||||||
Ind,ind->IndId,ind->IndCh,ind->MInd,ind->MLength,len);
|
Ind,ind->IndId,ind->IndCh,ind->MInd,ind->MLength,len);
|
||||||
#endif
|
|
||||||
ram_copyfromcard(card, &ind->RBuffer.P, &IndIn->RBuffer.P, len);
|
ram_copyfromcard(card, &ind->RBuffer.P, &IndIn->RBuffer.P, len);
|
||||||
skb_queue_tail(&((diehl_card *)card->card)->rcvq, skb);
|
skb_queue_tail(&((diehl_card *)card->card)->rcvq, skb);
|
||||||
diehl_schedule_rx((diehl_card *)card->card);
|
diehl_schedule_rx((diehl_card *)card->card);
|
||||||
|
|
Loading…
Reference in New Issue