Commit ff7182ec authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: Hand merged.

parents 994b6e06 04d72911
......@@ -10,7 +10,7 @@
#undef N_DATA
#include <linux/kernel.h>
#include <linux/tqueue.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/ioport.h>
......@@ -25,6 +25,8 @@ MODULE_DESCRIPTION("ISDN4Linux: Driver for Eicon Diva Server cards");
MODULE_AUTHOR("Armin Schindler");
MODULE_LICENSE("GPL");
void DivasInitDpc(void);
#ifdef MODULE
#include "idi.h"
void DIVA_DIDD_Write(DESCRIPTOR *, int);
......@@ -47,6 +49,8 @@ divas_init(void)
return -ENODEV;
#endif
DivasInitDpc();
if (pci_present())
{
if (DivasCardsDiscover() < 0)
......
......@@ -176,8 +176,7 @@ extern void DivasLogAdd(void *buffer, int length);
/*------------------------------------------------------------------*/
int DivasDpcSchedule(void);
void DivasDoDpc(void *);
void DivasDoRequestDpc(void *pData);
void DivasDoDpc(unsigned long);
int DivasScheduleRequestDpc(void);
/* table of IDI request functions */
......
......@@ -801,7 +801,7 @@ void DivaDoCardDpc(card_t *card)
}
void DivasDoDpc(void *pData)
void DivasDoDpc(unsigned long dummy)
{
card_t *card = DivasCards;
int i = DivasCardNext;
......@@ -814,11 +814,6 @@ void DivasDoDpc(void *pData)
}
}
void DivasDoRequestDpc(void *pData)
{
DivasDoDpc(pData);
}
/*
* DivasGetNum
* Returns the number of active adapters
......
/* $Id: eicon.h,v 1.23.6.5 2001/09/23 22:24:37 kai Exp $
/* $Id: eicon.h,v 1.1.4.1.2.3 2002/10/01 11:29:13 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards.
*
......@@ -321,9 +321,9 @@ typedef struct eicon_card {
struct sk_buff_head sackq; /* Data-Ack-Message queue */
struct sk_buff_head statq; /* Status-Message queue */
int statq_entries;
struct work_struct snd_tq; /* Task struct for xmit bh */
struct work_struct rcv_tq; /* Task struct for rcv bh */
struct work_struct ack_tq; /* Task struct for ack bh */
struct tasklet_struct snd_tq; /* Task struct for xmit bh */
struct tasklet_struct rcv_tq; /* Task struct for rcv bh */
struct tasklet_struct ack_tq; /* Task struct for ack bh */
eicon_chan* IdTable[256]; /* Table to find entity */
__u16 ref_in;
__u16 ref_out;
......@@ -349,17 +349,17 @@ extern char *eicon_ctype_name[];
extern __inline__ void eicon_schedule_tx(eicon_card *card)
{
schedule_work(&card->snd_tq);
tasklet_schedule(&card->snd_tq);
}
extern __inline__ void eicon_schedule_rx(eicon_card *card)
{
schedule_work(&card->rcv_tq);
tasklet_schedule(&card->rcv_tq);
}
extern __inline__ void eicon_schedule_ack(eicon_card *card)
{
schedule_work(&card->ack_tq);
tasklet_schedule(&card->ack_tq);
}
extern int eicon_addcard(int, int, int, char *, int);
......
/* $Id: eicon_dsp.h,v 1.7.6.1 2001/09/23 22:24:37 kai Exp $
/* $Id: eicon_dsp.h,v 1.1.4.1.2.2 2002/10/01 11:29:13 armin Exp $
*
* ISDN lowlevel-module for Eicon active cards.
* DSP definitions
......
/* $Id: eicon_idi.c,v 1.41.6.4 2001/11/06 20:58:29 kai Exp $
/* $Id: eicon_idi.c,v 1.1.4.1.2.4 2002/10/01 11:29:13 armin Exp $
*
* ISDN lowlevel-module for Eicon active cards.
* IDI interface
......@@ -24,7 +24,7 @@
#undef EICON_FULL_SERVICE_OKTETT
char *eicon_idi_revision = "$Revision: 1.41.6.4 $";
char *eicon_idi_revision = "$Revision: 1.1.4.1.2.4 $";
eicon_manifbuf *manbuf;
......
/* $Id: eicon_idi.h,v 1.11.6.1 2001/09/23 22:24:37 kai Exp $
/* $Id: eicon_idi.h,v 1.1.4.1.2.2 2002/10/01 11:29:13 armin Exp $
*
* ISDN lowlevel-module for the Eicon active cards.
* IDI-Interface
......
/* $Id: eicon_io.c,v 1.13.6.2 2001/09/23 22:24:37 kai Exp $
/* $Id: eicon_io.c,v 1.1.4.1.2.2 2002/10/01 11:29:13 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards.
* Code for communicating with hardware.
......
/* $Id: eicon_isa.c,v 1.16.6.2 2001/11/06 20:58:29 kai Exp $
/* $Id: eicon_isa.c,v 1.1.4.1.2.3 2002/10/01 11:29:13 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards.
* Hardware-specific code for old ISA cards.
......@@ -20,7 +20,7 @@
#define release_shmem release_region
#define request_shmem request_region
char *eicon_isa_revision = "$Revision: 1.16.6.2 $";
char *eicon_isa_revision = "$Revision: 1.1.4.1.2.3 $";
#undef EICON_MCA_DEBUG
......
/* $Id: eicon_isa.h,v 1.10.6.1 2001/09/23 22:24:37 kai Exp $
/* $Id: eicon_isa.h,v 1.1.4.1.2.2 2002/10/01 11:29:13 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards.
*
......
/* $Id: eicon_mod.c,v 1.37.6.6 2001/09/23 22:24:37 kai Exp $
/* $Id: eicon_mod.c,v 1.1.4.1.2.4 2002/10/01 11:29:13 armin Exp $
*
* ISDN lowlevel-module for Eicon active cards.
*
......@@ -44,7 +44,7 @@
static eicon_card *cards = (eicon_card *) NULL; /* glob. var , contains
start of card-list */
static char *eicon_revision = "$Revision: 1.37.6.6 $";
static char *eicon_revision = "$Revision: 1.1.4.1.2.4 $";
extern char *eicon_pci_revision;
extern char *eicon_isa_revision;
......@@ -142,8 +142,10 @@ eicon_findnpcicard(int driverid)
#endif /* CONFIG_PCI */
static void
eicon_rcv_dispatch(struct eicon_card *card)
eicon_rcv_dispatch(unsigned long context)
{
struct eicon_card *card = (struct eicon_card *)context;
switch (card->bus) {
case EICON_BUS_ISA:
case EICON_BUS_MCA:
......@@ -152,13 +154,15 @@ eicon_rcv_dispatch(struct eicon_card *card)
break;
default:
eicon_log(card, 1,
"eicon_ack_dispatch: Illegal bustype %d\n", card->bus);
"eicon_rcv_dispatch: Illegal bustype %d\n", card->bus);
}
}
static void
eicon_ack_dispatch(struct eicon_card *card)
eicon_ack_dispatch(unsigned long context)
{
struct eicon_card *card = (struct eicon_card *)context;
switch (card->bus) {
case EICON_BUS_ISA:
case EICON_BUS_MCA:
......@@ -172,8 +176,10 @@ eicon_ack_dispatch(struct eicon_card *card)
}
static void
eicon_transmit(struct eicon_card *card)
eicon_transmit(unsigned long context)
{
struct eicon_card *card = (struct eicon_card *)context;
switch (card->bus) {
case EICON_BUS_ISA:
case EICON_BUS_MCA:
......@@ -868,12 +874,9 @@ eicon_alloccard(int Type, int membase, int irq, char *id, int card_id)
skb_queue_head_init(&card->sackq);
skb_queue_head_init(&card->statq);
card->statq_entries = 0;
card->snd_tq.routine = (void *) (void *) eicon_transmit;
card->snd_tq.data = card;
card->rcv_tq.routine = (void *) (void *) eicon_rcv_dispatch;
card->rcv_tq.data = card;
card->ack_tq.routine = (void *) (void *) eicon_ack_dispatch;
card->ack_tq.data = card;
tasklet_init(&card->snd_tq, eicon_transmit, (unsigned long)card);
tasklet_init(&card->rcv_tq, eicon_rcv_dispatch, (unsigned long)card);
tasklet_init(&card->ack_tq, eicon_ack_dispatch, (unsigned long)card);
card->interface.maxbufsize = 4000;
card->interface.command = if_command;
card->interface.writebuf_skb = if_sendbuf;
......
/* $Id: eicon_pci.c,v 1.15.6.3 2001/09/23 22:24:37 kai Exp $
/* $Id: eicon_pci.c,v 1.1.4.1.2.3 2002/10/01 11:29:13 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards.
* Hardware-specific code for PCI cards.
......@@ -24,7 +24,7 @@
#include "adapter.h"
#include "uxio.h"
char *eicon_pci_revision = "$Revision: 1.15.6.3 $";
char *eicon_pci_revision = "$Revision: 1.1.4.1.2.3 $";
#if CONFIG_PCI /* intire stuff is only for PCI */
#ifdef CONFIG_ISDN_DRV_EICON_PCI
......
/* $Id: eicon_pci.h,v 1.6.6.1 2001/09/23 22:24:37 kai Exp $
/* $Id: eicon_pci.h,v 1.1.4.1.2.2 2002/10/01 11:29:13 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards (PCI part).
*
......
......@@ -10,6 +10,10 @@
#define N_DATA
#include <linux/config.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/smp_lock.h>
#include <asm/io.h>
#include <asm/system.h>
#include <linux/slab.h>
......@@ -24,7 +28,7 @@ int log_on=0;
int Divasdevflag = 0;
//spinlock_t diva_lock = SPIN_LOCK_UNLOCKED;
spinlock_t diva_lock = SPIN_LOCK_UNLOCKED;
static
ux_diva_card_t card_pool[MAX_CARDS];
......@@ -673,20 +677,14 @@ long UxCardLock(ux_diva_card_t *card)
{
unsigned long flags;
//spin_lock_irqsave(&diva_lock, flags);
spin_lock_irqsave(&diva_lock, flags);
save_flags(flags);
cli();
return flags;
}
void UxCardUnlock(ux_diva_card_t *card, long ipl)
{
//spin_unlock_irqrestore(&diva_lock, ipl);
restore_flags(ipl);
spin_unlock_irqrestore(&diva_lock, ipl);
}
dword UxTimeGet(void)
......
......@@ -24,6 +24,8 @@ struct pt_regs;
#include "uxio.h"
static struct tasklet_struct DivasTask;
int Divas4BRIInitPCI(card_t *card, dia_card_t *cfg)
{
/* Use UxPciConfigWrite routines to initialise PCI config space */
......@@ -79,24 +81,23 @@ int DivasBRIInitPCI(card_t *card, dia_card_t *cfg)
int DivasDpcSchedule(void)
{
static struct work_struct DivasTask;
INIT_WORK(&DivasTask, DivasDoDpc, NULL);
schedule_work(&DivasTask);
tasklet_schedule(&DivasTask);
return 0;
}
int DivasScheduleRequestDpc(void)
{
static struct work_struct DivasTask;
INIT_WORK(&DivasTask, DivasDoRequestDpc, NULL);
schedule_work(&DivasTask);
tasklet_schedule(&DivasTask);
return 0;
}
void DivasInitDpc(void)
{
tasklet_init(&DivasTask, DivasDoDpc, 0);
}
void DivasLogAdd(void *buffer, int length)
{
static
......
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