Commit ad126509 authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-isdn.bkbits.net/linux-2.5.isdn

into home.transmeta.com:/home/torvalds/v2.5/linux
parents a7035a19 bd304a6c
...@@ -6,4 +6,4 @@ obj-$(CONFIG_ISDN_DRV_ACT2000) += act2000.o ...@@ -6,4 +6,4 @@ obj-$(CONFIG_ISDN_DRV_ACT2000) += act2000.o
# Multipart objects. # Multipart objects.
act2000-objs := module.o capi.o act2000_isa.o act2000-y := module.o capi.o act2000_isa.o
...@@ -13,4 +13,3 @@ obj-$(CONFIG_ISDN_CAPI_CAPIFS) += capifs.o ...@@ -13,4 +13,3 @@ obj-$(CONFIG_ISDN_CAPI_CAPIFS) += capifs.o
kernelcapi-y := kcapi.o capiutil.o capilib.o kernelcapi-y := kcapi.o capiutil.o capilib.o
kernelcapi-$(CONFIG_PROC_FS) += kcapi_proc.o kernelcapi-$(CONFIG_PROC_FS) += kcapi_proc.o
kernelcapi-objs := $(kernelcapi-y)
...@@ -6,4 +6,4 @@ obj-$(CONFIG_ISDN_DIVERSION) += dss1_divert.o ...@@ -6,4 +6,4 @@ obj-$(CONFIG_ISDN_DIVERSION) += dss1_divert.o
# Multipart objects. # Multipart objects.
dss1_divert-objs := isdn_divert.o divert_procfs.o divert_init.o dss1_divert-y := isdn_divert.o divert_procfs.o divert_init.o
...@@ -7,15 +7,13 @@ obj-$(CONFIG_ISDN_DRV_EICON_DIVAS) += divas.o ...@@ -7,15 +7,13 @@ obj-$(CONFIG_ISDN_DRV_EICON_DIVAS) += divas.o
# Multipart objects. # Multipart objects.
eicon-objs := eicon_mod.o eicon_isa.o eicon_pci.o eicon_idi.o \ eicon-y := eicon_mod.o eicon_isa.o eicon_pci.o \
eicon_io.o eicon_idi.o eicon_io.o
divas-objs := common.o idi.o bri.o pri.o log.o xlog.o kprintf.o fpga.o \ eicon-$(CONFIG_ISDN_DRV_EICON_PCI) += common.o idi.o bri.o pri.o log.o \
fourbri.o lincfg.o linchr.o linsys.o linio.o Divas_mod.o xlog.o kprintf.o fpga.o fourbri.o lincfg.o \
linchr.o linsys.o linio.o
# Optional parts of multipart objects. divas-y := common.o idi.o bri.o pri.o log.o xlog.o \
kprintf.o fpga.o fourbri.o lincfg.o \
linchr.o linsys.o linio.o Divas_mod.o
eicon-objs-$(CONFIG_ISDN_DRV_EICON_PCI) += common.o idi.o bri.o pri.o log.o \
xlog.o kprintf.o fpga.o fourbri.o lincfg.o linchr.o \
linsys.o linio.o
eicon-objs += $(eicon-objs-y)
...@@ -123,7 +123,7 @@ eicon_isa_find_card(int Mem, int Irq, char * Id) ...@@ -123,7 +123,7 @@ eicon_isa_find_card(int Mem, int Irq, char * Id)
int int
eicon_isa_bootload(eicon_isa_card *card, eicon_isa_codebuf *cb) { eicon_isa_bootload(eicon_isa_card *card, eicon_isa_codebuf *cb) {
int tmp; int tmp;
int timeout; unsigned long timeout;
eicon_isa_codebuf cbuf; eicon_isa_codebuf cbuf;
unsigned char *code; unsigned char *code;
eicon_isa_boot *boot; eicon_isa_boot *boot;
...@@ -300,7 +300,7 @@ int ...@@ -300,7 +300,7 @@ int
eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) { eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) {
eicon_isa_boot *boot; eicon_isa_boot *boot;
int tmp; int tmp;
int timeout; unsigned long timeout;
int j; int j;
eicon_isa_codebuf cbuf; eicon_isa_codebuf cbuf;
unsigned char *code; unsigned char *code;
......
...@@ -111,7 +111,7 @@ static int b1pci_probe(struct capicardparams *p, struct pci_dev *pdev) ...@@ -111,7 +111,7 @@ static int b1pci_probe(struct capicardparams *p, struct pci_dev *pdev)
cinfo->capi_ctrl.procinfo = b1pci_procinfo; cinfo->capi_ctrl.procinfo = b1pci_procinfo;
cinfo->capi_ctrl.ctr_read_proc = b1ctl_read_proc; cinfo->capi_ctrl.ctr_read_proc = b1ctl_read_proc;
strcpy(cinfo->capi_ctrl.name, card->name); strcpy(cinfo->capi_ctrl.name, card->name);
cinfo->capi_ctrl.owner = THIS_MODULE; cinfo->capi_ctrl.owner = THIS_MODULE;
retval = attach_capi_ctr(&cinfo->capi_ctrl); retval = attach_capi_ctr(&cinfo->capi_ctrl);
if (retval) { if (retval) {
...@@ -239,6 +239,7 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev) ...@@ -239,6 +239,7 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev)
goto err_unmap; goto err_unmap;
} }
cinfo->capi_ctrl.owner = THIS_MODULE;
cinfo->capi_ctrl.driver_name = "b1pciv4"; cinfo->capi_ctrl.driver_name = "b1pciv4";
cinfo->capi_ctrl.driverdata = cinfo; cinfo->capi_ctrl.driverdata = cinfo;
cinfo->capi_ctrl.register_appl = b1dma_register_appl; cinfo->capi_ctrl.register_appl = b1dma_register_appl;
...@@ -249,7 +250,6 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev) ...@@ -249,7 +250,6 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev)
cinfo->capi_ctrl.procinfo = b1pciv4_procinfo; cinfo->capi_ctrl.procinfo = b1pciv4_procinfo;
cinfo->capi_ctrl.ctr_read_proc = b1dmactl_read_proc; cinfo->capi_ctrl.ctr_read_proc = b1dmactl_read_proc;
strcpy(cinfo->capi_ctrl.name, card->name); strcpy(cinfo->capi_ctrl.name, card->name);
cinfo->capi_ctrl.owner = THIS_MODULE;
retval = attach_capi_ctr(&cinfo->capi_ctrl); retval = attach_capi_ctr(&cinfo->capi_ctrl);
if (retval) { if (retval) {
......
...@@ -95,6 +95,7 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq, ...@@ -95,6 +95,7 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq,
b1_reset(card->port); b1_reset(card->port);
b1_getrevision(card); b1_getrevision(card);
cinfo->capi_ctrl.owner = THIS_MODULE;
cinfo->capi_ctrl.driver_name = "b1pcmcia"; cinfo->capi_ctrl.driver_name = "b1pcmcia";
cinfo->capi_ctrl.driverdata = cinfo; cinfo->capi_ctrl.driverdata = cinfo;
cinfo->capi_ctrl.register_appl = b1_register_appl; cinfo->capi_ctrl.register_appl = b1_register_appl;
...@@ -105,7 +106,6 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq, ...@@ -105,7 +106,6 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq,
cinfo->capi_ctrl.procinfo = b1pcmcia_procinfo; cinfo->capi_ctrl.procinfo = b1pcmcia_procinfo;
cinfo->capi_ctrl.ctr_read_proc = b1ctl_read_proc; cinfo->capi_ctrl.ctr_read_proc = b1ctl_read_proc;
strcpy(cinfo->capi_ctrl.name, card->name); strcpy(cinfo->capi_ctrl.name, card->name);
cinfo->capi_ctrl.owner = THIS_MODULE;
retval = attach_capi_ctr(&cinfo->capi_ctrl); retval = attach_capi_ctr(&cinfo->capi_ctrl);
if (retval) { if (retval) {
......
...@@ -109,6 +109,7 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev) ...@@ -109,6 +109,7 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev)
goto err_unmap; goto err_unmap;
} }
cinfo->capi_ctrl.owner = THIS_MODULE;
cinfo->capi_ctrl.driver_name = "t1pci"; cinfo->capi_ctrl.driver_name = "t1pci";
cinfo->capi_ctrl.driverdata = cinfo; cinfo->capi_ctrl.driverdata = cinfo;
cinfo->capi_ctrl.register_appl = b1dma_register_appl; cinfo->capi_ctrl.register_appl = b1dma_register_appl;
...@@ -119,7 +120,6 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev) ...@@ -119,7 +120,6 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev)
cinfo->capi_ctrl.procinfo = t1pci_procinfo; cinfo->capi_ctrl.procinfo = t1pci_procinfo;
cinfo->capi_ctrl.ctr_read_proc = b1dmactl_read_proc; cinfo->capi_ctrl.ctr_read_proc = b1dmactl_read_proc;
strcpy(cinfo->capi_ctrl.name, card->name); strcpy(cinfo->capi_ctrl.name, card->name);
cinfo->capi_ctrl.owner = THIS_MODULE;
retval = attach_capi_ctr(&cinfo->capi_ctrl); retval = attach_capi_ctr(&cinfo->capi_ctrl);
if (retval) { if (retval) {
......
# Makefile for the Eicon DIVA ISDN drivers. # Makefile for the Eicon DIVA ISDN drivers.
# Multipart objects. # Each configuration option enables a list of files.
divas-objs := divasmain.o divasfunc.o di.o io.o istream.o diva.o dlist.o divasproc.o diva_dma.o obj-$(CONFIG_ISDN_DIVAS) += divadidd.o divas.o
divacapi-objs := capimain.o capifunc.o message.o capidtmf.o obj-$(CONFIG_ISDN_DIVAS_MAINT) += diva_mnt.o
divadidd-objs := diva_didd.o diddfunc.o dadapter.o obj-$(CONFIG_ISDN_DIVAS_USERIDI) += diva_idi.o
diva_mnt-objs := divamnt.o mntfunc.o debug.o maintidi.o obj-$(CONFIG_ISDN_DIVAS_DIVACAPI) += divacapi.o
diva_idi-objs := divasi.o idifunc.o um_idi.o dqueue.o dlist.o
# Optional parts of multipart objects. # Multipart objects.
divas-objs-$(CONFIG_ISDN_DIVAS_BRIPCI) += os_bri.o s_bri.o divas-y := divasmain.o divasfunc.o di.o io.o istream.o \
divas-objs-$(CONFIG_ISDN_DIVAS_4BRIPCI) += os_4bri.o s_4bri.o diva.o dlist.o divasproc.o diva_dma.o
divas-objs-$(CONFIG_ISDN_DIVAS_PRIPCI) += os_pri.o s_pri.o divas-$(CONFIG_ISDN_DIVAS_BRIPCI) += os_bri.o s_bri.o
divas-$(CONFIG_ISDN_DIVAS_4BRIPCI) += os_4bri.o s_4bri.o
divas-$(CONFIG_ISDN_DIVAS_PRIPCI) += os_pri.o s_pri.o
divas-objs += $(sort $(divas-objs-y)) divacapi-y := capimain.o capifunc.o message.o capidtmf.o
# Each configuration option enables a list of files. divadidd-y := diva_didd.o diddfunc.o dadapter.o
diva_mnt-y := divamnt.o mntfunc.o debug.o maintidi.o
obj-$(CONFIG_ISDN_DIVAS) += divadidd.o divas.o diva_idi-y := divasi.o idifunc.o um_idi.o dqueue.o dlist.o
obj-$(CONFIG_ISDN_DIVAS_MAINT) += diva_mnt.o
obj-$(CONFIG_ISDN_DIVAS_USERIDI) += diva_idi.o
obj-$(CONFIG_ISDN_DIVAS_DIVACAPI) += divacapi.o
...@@ -17,47 +17,45 @@ obj-$(CONFIG_HISAX_FRITZ_PCIPNP) += hisax_hfcpci.o ...@@ -17,47 +17,45 @@ obj-$(CONFIG_HISAX_FRITZ_PCIPNP) += hisax_hfcpci.o
# Multipart objects. # Multipart objects.
hisax_st5481-objs := st5481_init.o st5481_usb.o st5481_d.o st5481_b.o \ hisax_st5481-y := st5481_init.o st5481_usb.o st5481_d.o \
st5481_hdlc.o st5481_b.o st5481_hdlc.o
hisax-objs := config.o isdnl1.o tei.o isdnl2.o isdnl3.o \
lmgr.o q931.o callc.o fsm.o cert.o hisax-y := config.o isdnl1.o tei.o isdnl2.o isdnl3.o \
lmgr.o q931.o callc.o fsm.o cert.o
# Optional parts of multipart objects. hisax-$(CONFIG_HISAX_EURO) += l3dss1.o
hisax-objs-$(CONFIG_HISAX_EURO) += l3dss1.o hisax-$(CONFIG_HISAX_NI1) += l3ni1.o
hisax-objs-$(CONFIG_HISAX_NI1) += l3ni1.o hisax-$(CONFIG_HISAX_1TR6) += l3_1tr6.o
hisax-objs-$(CONFIG_HISAX_1TR6) += l3_1tr6.o
hisax-$(CONFIG_HISAX_16_0) += teles0.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_16_0) += teles0.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_16_3) += teles3.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_16_3) += teles3.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_TELESPCI) += telespci.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_TELESPCI) += telespci.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_S0BOX) += s0box.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_S0BOX) += s0box.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_AVM_A1) += avm_a1.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_AVM_A1) += avm_a1.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_AVM_A1_PCMCIA) += avm_a1p.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_AVM_A1_PCMCIA) += avm_a1p.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_FRITZPCI) += avm_pci.o isac.o arcofi.o
hisax-objs-$(CONFIG_HISAX_FRITZPCI) += avm_pci.o isac.o arcofi.o hisax-$(CONFIG_HISAX_ELSA) += elsa.o isac.o arcofi.o hscx.o ipac.o
hisax-objs-$(CONFIG_HISAX_ELSA) += elsa.o isac.o arcofi.o hscx.o ipac.o hisax-$(CONFIG_HISAX_IX1MICROR2) += ix1_micro.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_IX1MICROR2) += ix1_micro.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_DIEHLDIVA) += diva.o isac.o arcofi.o hscx.o ipac.o ipacx.o
hisax-objs-$(CONFIG_HISAX_DIEHLDIVA) += diva.o isac.o arcofi.o hscx.o ipac.o ipacx.o hisax-$(CONFIG_HISAX_ASUSCOM) += asuscom.o isac.o arcofi.o hscx.o ipac.o
hisax-objs-$(CONFIG_HISAX_ASUSCOM) += asuscom.o isac.o arcofi.o hscx.o ipac.o hisax-$(CONFIG_HISAX_TELEINT) += teleint.o isac.o arcofi.o hfc_2bs0.o
hisax-objs-$(CONFIG_HISAX_TELEINT) += teleint.o isac.o arcofi.o hfc_2bs0.o hisax-$(CONFIG_HISAX_SEDLBAUER) += sedlbauer.o isac.o arcofi.o hscx.o ipac.o \
hisax-objs-$(CONFIG_HISAX_SEDLBAUER) += sedlbauer.o isac.o arcofi.o hscx.o ipac.o isar.o isar.o
hisax-objs-$(CONFIG_HISAX_SPORTSTER) += sportster.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_SPORTSTER) += sportster.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_MIC) += mic.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_MIC) += mic.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_NETJET) += nj_s.o netjet.o isac.o arcofi.o hisax-$(CONFIG_HISAX_NETJET) += nj_s.o netjet.o isac.o arcofi.o
hisax-objs-$(CONFIG_HISAX_NETJET_U) += nj_u.o netjet.o icc.o hisax-$(CONFIG_HISAX_NETJET_U) += nj_u.o netjet.o icc.o
hisax-objs-$(CONFIG_HISAX_HFCS) += hfcscard.o hfc_2bds0.o hisax-$(CONFIG_HISAX_HFCS) += hfcscard.o hfc_2bds0.o
hisax-objs-$(CONFIG_HISAX_HFC_PCI) += hfc_pci.o hisax-$(CONFIG_HISAX_HFC_PCI) += hfc_pci.o
hisax-objs-$(CONFIG_HISAX_HFC_SX) += hfc_sx.o hisax-$(CONFIG_HISAX_HFC_SX) += hfc_sx.o
hisax-objs-$(CONFIG_HISAX_NICCY) += niccy.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_NICCY) += niccy.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_ISURF) += isurf.o isac.o arcofi.o isar.o hisax-$(CONFIG_HISAX_ISURF) += isurf.o isac.o arcofi.o isar.o
hisax-objs-$(CONFIG_HISAX_HSTSAPHIR) += saphir.o isac.o arcofi.o hscx.o hisax-$(CONFIG_HISAX_HSTSAPHIR) += saphir.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_BKM_A4T) += bkm_a4t.o isac.o arcofi.o jade.o hisax-$(CONFIG_HISAX_BKM_A4T) += bkm_a4t.o isac.o arcofi.o jade.o
hisax-objs-$(CONFIG_HISAX_SCT_QUADRO) += bkm_a8.o isac.o arcofi.o hscx.o ipac.o hisax-$(CONFIG_HISAX_SCT_QUADRO) += bkm_a8.o isac.o arcofi.o hscx.o ipac.o
hisax-objs-$(CONFIG_HISAX_GAZEL) += gazel.o isac.o arcofi.o hscx.o ipac.o hisax-$(CONFIG_HISAX_GAZEL) += gazel.o isac.o arcofi.o hscx.o ipac.o
hisax-objs-$(CONFIG_HISAX_W6692) += w6692.o hisax-$(CONFIG_HISAX_W6692) += w6692.o
hisax-objs-$(CONFIG_HISAX_ENTERNOW_PCI) += enternow_pci.o amd7930_fn.o hisax-$(CONFIG_HISAX_ENTERNOW_PCI) += enternow_pci.o amd7930_fn.o
#hisax-objs-$(CONFIG_HISAX_TESTEMU) += testemu.o #hisax-$(CONFIG_HISAX_TESTEMU) += testemu.o
hisax-objs += $(hisax-objs-y)
CERT := $(shell cd $(src); md5sum -c md5sums.asc > /dev/null 2> /dev/null ;echo $$?) CERT := $(shell cd $(src); md5sum -c md5sums.asc > /dev/null 2> /dev/null ;echo $$?)
CFLAGS_cert.o := -DCERTIFICATION=$(CERT) CFLAGS_cert.o := -DCERTIFICATION=$(CERT)
...@@ -153,6 +153,8 @@ static dev_link_t *avma1cs_attach(void) ...@@ -153,6 +153,8 @@ static dev_link_t *avma1cs_attach(void)
/* Initialize the dev_link_t structure */ /* Initialize the dev_link_t structure */
link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL); link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL);
if (!link)
return NULL;
memset(link, 0, sizeof(struct dev_link_t)); memset(link, 0, sizeof(struct dev_link_t));
link->release.function = &avma1cs_release; link->release.function = &avma1cs_release;
link->release.data = (u_long)link; link->release.data = (u_long)link;
...@@ -186,6 +188,10 @@ static dev_link_t *avma1cs_attach(void) ...@@ -186,6 +188,10 @@ static dev_link_t *avma1cs_attach(void)
/* Allocate space for private device-specific data */ /* Allocate space for private device-specific data */
local = kmalloc(sizeof(local_info_t), GFP_KERNEL); local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
if (!local) {
kfree(link);
return NULL;
}
memset(local, 0, sizeof(local_info_t)); memset(local, 0, sizeof(local_info_t));
link->priv = local; link->priv = local;
......
...@@ -2,15 +2,10 @@ ...@@ -2,15 +2,10 @@
# Each configuration option enables a list of files. # Each configuration option enables a list of files.
obj-$(CONFIG_HYSDN) += hysdn.o obj-$(CONFIG_HYSDN) += hysdn.o
# Multipart objects. # Multipart objects.
hysdn-objs := hysdn_procconf.o hysdn_proclog.o boardergo.o hysdn_boot.o \ hysdn-y := hysdn_procconf.o hysdn_proclog.o boardergo.o \
hysdn_sched.o hysdn_net.o hysdn_init.o hysdn_boot.o hysdn_sched.o hysdn_net.o hysdn_init.o
hysdn-$(CONFIG_HYSDN_CAPI) += hycapi.o
# Optional parts of multipart objects.
hysdn-objs-$(CONFIG_HYSDN_CAPI) += hycapi.o
hysdn-objs += $(hysdn-objs-y)
...@@ -98,7 +98,8 @@ put_log_buffer(hysdn_card * card, char *cp) ...@@ -98,7 +98,8 @@ put_log_buffer(hysdn_card * card, char *cp)
{ {
struct log_data *ib; struct log_data *ib;
struct procdata *pd = card->proclog; struct procdata *pd = card->proclog;
int i, flags; int i;
unsigned long flags;
if (!pd) if (!pd)
return; return;
...@@ -300,7 +301,8 @@ hysdn_log_close(struct inode *ino, struct file *filep) ...@@ -300,7 +301,8 @@ hysdn_log_close(struct inode *ino, struct file *filep)
struct log_data *inf; struct log_data *inf;
struct procdata *pd; struct procdata *pd;
hysdn_card *card; hysdn_card *card;
int flags, retval = 0; int retval = 0;
unsigned long flags;
lock_kernel(); lock_kernel();
......
...@@ -2,25 +2,18 @@ ...@@ -2,25 +2,18 @@
# Each configuration option enables a list of files. # Each configuration option enables a list of files.
obj-$(CONFIG_ISDN) += isdn.o obj-$(CONFIG_ISDN) += isdn.o
obj-$(CONFIG_ISDN_PPP_BSDCOMP) += isdn_bsdcomp.o obj-$(CONFIG_ISDN_PPP_BSDCOMP) += isdn_bsdcomp.o
# Multipart objects. # Multipart objects.
isdn-objs := isdn_net_lib.o \ isdn-y := isdn_net_lib.o isdn_fsm.o isdn_tty.o \
isdn_fsm.o \ isdn_v110.o isdn_common.o
isdn_tty.o isdn_v110.o \ isdn-$(CONFIG_ISDN_NET_SIMPLE) += isdn_net.o
isdn_common.o \ isdn-$(CONFIG_ISDN_NET_CISCO) += isdn_ciscohdlck.o
isdn-$(CONFIG_ISDN_PPP) += isdn_ppp.o isdn_ppp_ccp.o
# Optional parts of multipart objects. isdn-$(CONFIG_ISDN_PPP_VJ) += isdn_ppp_vj.o
isdn-$(CONFIG_ISDN_MPP) += isdn_ppp_mp.o
isdn-objs-$(CONFIG_ISDN_NET_SIMPLE) += isdn_net.o isdn-$(CONFIG_ISDN_X25) += isdn_concap.o isdn_x25iface.o
isdn-objs-$(CONFIG_ISDN_NET_CISCO) += isdn_ciscohdlck.o isdn-$(CONFIG_ISDN_AUDIO) += isdn_audio.o
isdn-objs-$(CONFIG_ISDN_PPP) += isdn_ppp.o isdn_ppp_ccp.o isdn-$(CONFIG_ISDN_TTY_FAX) += isdn_ttyfax.o
isdn-objs-$(CONFIG_ISDN_PPP_VJ) += isdn_ppp_vj.o
isdn-objs-$(CONFIG_ISDN_MPP) += isdn_ppp_mp.o
isdn-objs-$(CONFIG_ISDN_X25) += isdn_concap.o isdn_x25iface.o
isdn-objs-$(CONFIG_ISDN_AUDIO) += isdn_audio.o
isdn-objs-$(CONFIG_ISDN_TTY_FAX) += isdn_ttyfax.o
isdn-objs += $(isdn-objs-y)
...@@ -300,7 +300,6 @@ static void bsd_free (void *state) ...@@ -300,7 +300,6 @@ static void bsd_free (void *state)
* Finally release the structure itself. * Finally release the structure itself.
*/ */
kfree (db); kfree (db);
MOD_DEC_USE_COUNT;
} }
} }
...@@ -355,8 +354,6 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data) ...@@ -355,8 +354,6 @@ static void *bsd_alloc (struct isdn_ppp_comp_data *data)
return NULL; return NULL;
} }
MOD_INC_USE_COUNT;
/* /*
* If this is the compression buffer then there is no length data. * If this is the compression buffer then there is no length data.
* For decompression, the length information is needed as well. * For decompression, the length information is needed as well.
...@@ -907,6 +904,7 @@ static int bsd_decompress (void *state, struct sk_buff *skb_in, struct sk_buff * ...@@ -907,6 +904,7 @@ static int bsd_decompress (void *state, struct sk_buff *skb_in, struct sk_buff *
*************************************************************/ *************************************************************/
static struct isdn_ppp_compressor ippp_bsd_compress = { static struct isdn_ppp_compressor ippp_bsd_compress = {
.owner = THIS_MODULE,
.num = CI_BSD_COMPRESS, .num = CI_BSD_COMPRESS,
.alloc = bsd_alloc, .alloc = bsd_alloc,
.free = bsd_free, .free = bsd_free,
......
...@@ -259,11 +259,14 @@ ippp_ccp_free(struct ippp_ccp *ccp) ...@@ -259,11 +259,14 @@ ippp_ccp_free(struct ippp_ccp *ccp)
{ {
int id; int id;
if (ccp->comp_stat) if (ccp->comp_stat) {
ccp->compressor->free(ccp->comp_stat); ccp->compressor->free(ccp->comp_stat);
if (ccp->decomp_stat) module_put(ccp->compressor->owner);
}
if (ccp->decomp_stat) {
ccp->decompressor->free(ccp->decomp_stat); ccp->decompressor->free(ccp->decomp_stat);
module_put(ccp->decompressor->owner);
}
for (id = 0; id < 256; id++) { for (id = 0; id < 256; id++) {
if (ccp->reset->rs[id]) if (ccp->reset->rs[id])
ippp_ccp_reset_free_state(ccp, id); ippp_ccp_reset_free_state(ccp, id);
...@@ -553,13 +556,14 @@ ippp_ccp_send_ccp(struct ippp_ccp *ccp, struct sk_buff *skb) ...@@ -553,13 +556,14 @@ ippp_ccp_send_ccp(struct ippp_ccp *ccp, struct sk_buff *skb)
} }
} }
static struct isdn_ppp_compressor *ipc_head = NULL; static LIST_HEAD(ipc_head);
static spinlock_t ipc_head_lock;
int int
ippp_ccp_set_compressor(struct ippp_ccp *ccp, int unit, ippp_ccp_set_compressor(struct ippp_ccp *ccp, int unit,
struct isdn_ppp_comp_data *data) struct isdn_ppp_comp_data *data)
{ {
struct isdn_ppp_compressor *ipc = ipc_head; struct isdn_ppp_compressor *ipc;
int ret; int ret;
void *stat; void *stat;
int num = data->num; int num = data->num;
...@@ -568,34 +572,48 @@ ippp_ccp_set_compressor(struct ippp_ccp *ccp, int unit, ...@@ -568,34 +572,48 @@ ippp_ccp_set_compressor(struct ippp_ccp *ccp, int unit,
printk(KERN_DEBUG "[%d] Set %scompressor type %d\n", unit, printk(KERN_DEBUG "[%d] Set %scompressor type %d\n", unit,
data->flags & IPPP_COMP_FLAG_XMIT ? "" : "de", num); data->flags & IPPP_COMP_FLAG_XMIT ? "" : "de", num);
for (ipc = ipc_head; ipc; ipc = ipc->next) { spin_lock(&ipc_head_lock);
if (ipc->num != num) list_for_each_entry(ipc, &ipc_head, list) {
continue; if (ipc->num == num &&
try_module_get(ipc->owner))
stat = ipc->alloc(data); goto found;
if (!stat) { }
printk(KERN_ERR "Can't alloc (de)compression!\n"); spin_unlock(&ipc_head_lock);
break; return -EINVAL;
}
ret = ipc->init(stat, data, unit, 0); found:
if(!ret) { spin_unlock(&ipc_head_lock);
printk(KERN_ERR "Can't init (de)compression!\n");
ipc->free(stat); stat = ipc->alloc(data);
break; if (!stat) {
printk(KERN_ERR "Can't alloc (de)compression!\n");
goto err;
}
ret = ipc->init(stat, data, unit, 0);
if(!ret) {
printk(KERN_ERR "Can't init (de)compression!\n");
ipc->free(stat);
goto err;
}
if (data->flags & IPPP_COMP_FLAG_XMIT) {
if (ccp->comp_stat) {
ccp->compressor->free(ccp->comp_stat);
module_put(ccp->compressor->owner);
} }
if (data->flags & IPPP_COMP_FLAG_XMIT) {
if (ccp->comp_stat)
ccp->compressor->free(ccp->comp_stat);
ccp->comp_stat = stat; ccp->comp_stat = stat;
ccp->compressor = ipc; ccp->compressor = ipc;
} else { } else {
if (ccp->decomp_stat) if (ccp->decomp_stat) {
ccp->decompressor->free(ccp->decomp_stat); ccp->decompressor->free(ccp->decomp_stat);
ccp->decomp_stat = stat; module_put(ccp->decompressor->owner);
ccp->decompressor = ipc;
} }
return 0; ccp->decomp_stat = stat;
ccp->decompressor = ipc;
} }
return 0;
err:
module_put(ipc->owner);
return -EINVAL; return -EINVAL;
} }
...@@ -606,36 +624,34 @@ ippp_ccp_get_compressors(unsigned long protos[8]) ...@@ -606,36 +624,34 @@ ippp_ccp_get_compressors(unsigned long protos[8])
int i, j; int i, j;
memset(protos, 0, sizeof(unsigned long) * 8); memset(protos, 0, sizeof(unsigned long) * 8);
for (ipc = ipc_head; ipc; ipc = ipc->next) {
spin_lock(&ipc_head_lock);
list_for_each_entry(ipc, &ipc_head, list) {
j = ipc->num / (sizeof(long)*8); j = ipc->num / (sizeof(long)*8);
i = ipc->num % (sizeof(long)*8); i = ipc->num % (sizeof(long)*8);
if (j < 8) if (j < 8)
protos[j] |= 1 << i; protos[j] |= 1 << i;
} }
spin_unlock(&ipc_head_lock);
} }
int int
isdn_ppp_register_compressor(struct isdn_ppp_compressor *ipc) isdn_ppp_register_compressor(struct isdn_ppp_compressor *ipc)
{ {
ipc->next = ipc_head; spin_lock(&ipc_head_lock);
ipc->prev = NULL; list_add_tail(&ipc->list, &ipc_head);
if (ipc_head) { spin_unlock(&ipc_head_lock);
ipc_head->prev = ipc;
}
ipc_head = ipc;
return 0; return 0;
} }
int int
isdn_ppp_unregister_compressor(struct isdn_ppp_compressor *ipc) isdn_ppp_unregister_compressor(struct isdn_ppp_compressor *ipc)
{ {
if (ipc->prev) spin_lock(&ipc_head_lock);
ipc->prev->next = ipc->next; list_del(&ipc->list);
else spin_unlock(&ipc_head_lock);
ipc_head = ipc->next;
if (ipc->next)
ipc->next->prev = ipc->prev;
ipc->prev = ipc->next = NULL;
return 0; return 0;
} }
...@@ -1983,7 +1983,7 @@ modem_write_profile(atemu * m) ...@@ -1983,7 +1983,7 @@ modem_write_profile(atemu * m)
memcpy(m->pmsn, m->msn, ISDN_MSNLEN); memcpy(m->pmsn, m->msn, ISDN_MSNLEN);
memcpy(m->plmsn, m->lmsn, ISDN_LMSNLEN); memcpy(m->plmsn, m->lmsn, ISDN_LMSNLEN);
if (dev->profd) if (dev->profd)
group_send_sig_info(SIGIO, SEND_SIG_PRIV, dev->profd); kill_pg_info(SIGIO, SEND_SIG_PRIV, dev->profd->pgrp);
} }
static struct tty_operations modem_ops = { static struct tty_operations modem_ops = {
...@@ -2095,11 +2095,10 @@ isdn_tty_init(void) ...@@ -2095,11 +2095,10 @@ isdn_tty_init(void)
#endif #endif
kfree(info->xmit_buf - 4); kfree(info->xmit_buf - 4);
} }
err_unregister_tty: tty_unregister_driver(m->tty_modem);
tty_unregister_driver(&isdn_mdm->tty_modem);
err: err:
put_tty_driver(&isdn_mdm->tty_modem); put_tty_driver(m->tty_modem);
isdn_mdm->tty_modem = NULL; m->tty_modem = NULL;
return retval; return retval;
} }
...@@ -2118,9 +2117,9 @@ isdn_tty_exit(void) ...@@ -2118,9 +2117,9 @@ isdn_tty_exit(void)
#endif #endif
kfree(info->xmit_buf - 4); kfree(info->xmit_buf - 4);
} }
tty_unregister_driver(&isdn_mdm->tty_modem); tty_unregister_driver(isdn_mdm.tty_modem);
put_tty_driver(&isdn_mdm->tty_modem); put_tty_driver(isdn_mdm.tty_modem);
isdn_mdm->tty_modem = NULL; isdn_mdm.tty_modem = NULL;
} }
/* /*
......
...@@ -303,7 +303,7 @@ isdn_tty_cmd_FCLASS1(char **p, modem_info * info) ...@@ -303,7 +303,7 @@ isdn_tty_cmd_FCLASS1(char **p, modem_info * info)
isdn_ctrl c; isdn_ctrl c;
int par; int par;
struct isdn_slot *slot; struct isdn_slot *slot;
long flags; unsigned long flags;
for (c.parm.aux.cmd = 0; c.parm.aux.cmd < 7; c.parm.aux.cmd++) for (c.parm.aux.cmd = 0; c.parm.aux.cmd < 7; c.parm.aux.cmd++)
if (!strncmp(p[0], cmd[c.parm.aux.cmd], 2)) if (!strncmp(p[0], cmd[c.parm.aux.cmd], 2))
......
#
# Makefile for the isdnloop ISDN device driver # Makefile for the isdnloop ISDN device driver
#
# Each configuration option enables a list of files. # Each configuration option enables a list of files.
......
...@@ -6,4 +6,4 @@ obj-$(CONFIG_ISDN_DRV_PCBIT) += pcbit.o ...@@ -6,4 +6,4 @@ obj-$(CONFIG_ISDN_DRV_PCBIT) += pcbit.o
# Multipart objects. # Multipart objects.
pcbit-objs := module.o edss1.o drv.o layer2.o capi.o callbacks.o pcbit-y := module.o edss1.o drv.o layer2.o capi.o callbacks.o
...@@ -6,5 +6,5 @@ obj-$(CONFIG_ISDN_DRV_SC) += sc.o ...@@ -6,5 +6,5 @@ obj-$(CONFIG_ISDN_DRV_SC) += sc.o
# Multipart objects. # Multipart objects.
sc-objs := shmem.o init.o debug.o packet.o command.o event.o \ sc-y := shmem.o init.o debug.o packet.o command.o event.o \
ioctl.o interrupt.o message.o timer.o ioctl.o interrupt.o message.o timer.o
...@@ -6,5 +6,6 @@ obj-$(CONFIG_ISDN_DRV_TPAM) += tpam.o ...@@ -6,5 +6,6 @@ obj-$(CONFIG_ISDN_DRV_TPAM) += tpam.o
# Multipart objects. # Multipart objects.
tpam-objs := tpam_main.o tpam_nco.o tpam_memory.o tpam_commands.o \ tpam-y := tpam_main.o tpam_nco.o tpam_memory.o \
tpam_queues.o tpam_hdlc.o tpam_crcpc.o tpam_commands.o tpam_queues.o tpam_hdlc.o \
tpam_crcpc.o
...@@ -145,6 +145,7 @@ irqreturn_t tpam_irq(int irq, void *dev_id, struct pt_regs *regs) ...@@ -145,6 +145,7 @@ irqreturn_t tpam_irq(int irq, void *dev_id, struct pt_regs *regs)
do { do {
hpic = readl(card->bar0 + TPAM_HPIC_REGISTER); hpic = readl(card->bar0 + TPAM_HPIC_REGISTER);
if (waiting_too_long++ > 0xfffffff) { if (waiting_too_long++ > 0xfffffff) {
kfree_skb(skb);
spin_unlock(&card->lock); spin_unlock(&card->lock);
printk(KERN_ERR "TurboPAM(tpam_irq): " printk(KERN_ERR "TurboPAM(tpam_irq): "
"waiting too long...\n"); "waiting too long...\n");
......
...@@ -283,7 +283,7 @@ typedef struct atemu { ...@@ -283,7 +283,7 @@ typedef struct atemu {
#endif #endif
int mdmcmdl; /* Length of Modem-Commandbuffer */ int mdmcmdl; /* Length of Modem-Commandbuffer */
int pluscount; /* Counter for +++ sequence */ int pluscount; /* Counter for +++ sequence */
int lastplus; /* Timestamp of last + */ unsigned long lastplus; /* Timestamp of last + */
char mdmcmd[255]; /* Modem-Commandbuffer */ char mdmcmd[255]; /* Modem-Commandbuffer */
unsigned int charge; /* Charge units of current connection */ unsigned int charge; /* Charge units of current connection */
} atemu; } atemu;
......
...@@ -95,7 +95,8 @@ struct isdn_ppp_resetparams { ...@@ -95,7 +95,8 @@ struct isdn_ppp_resetparams {
* check the original include for more information * check the original include for more information
*/ */
struct isdn_ppp_compressor { struct isdn_ppp_compressor {
struct isdn_ppp_compressor *next, *prev; struct module *owner;
struct list_head list;
int num; /* CCP compression protocol number */ int num; /* CCP compression protocol number */
void *(*alloc) (struct isdn_ppp_comp_data *); void *(*alloc) (struct isdn_ppp_comp_data *);
......
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