From: Andy P. <at...@us...> - 2002-04-10 18:37:00
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn In directory usw-pr-cvs1:/tmp/cvs-serv1502/isdn/hysdn Modified Files: boardergo.c boardergo.h hycapi.c hysdn_boot.c hysdn_defs.h hysdn_init.c hysdn_net.c hysdn_pof.h hysdn_procconf.c hysdn_procfs.c hysdn_proclog.c hysdn_sched.c ince1pc.h Log Message: synch 2.4.15 commit 49 Index: boardergo.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/boardergo.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- boardergo.c 14 Jan 2001 18:44:18 -0000 1.1.1.1 +++ boardergo.c 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,40 +1,27 @@ /* $Id$ - + * * Linux driver for HYSDN cards, specific routines for ergo type boards. * + * Author Werner Cornelius (we...@ti...) for Hypercope GmbH + * Copyright 1999 by Werner Cornelius (we...@ti...) + * + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. + * * As all Linux supported cards Champ2, Ergo and Metro2/4 use the same * DPRAM interface and layout with only minor differences all related * stuff is done here, not in separate modules. * - * written by Werner Cornelius (we...@ti...) for Hypercope GmbH - * - * Copyright 1999 by Werner Cornelius (we...@ti...) - * - * 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, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ -#define __NO_VERSION__ #include <linux/config.h> -#include <linux/module.h> -#include <linux/version.h> -#include <asm/io.h> +#include <linux/sched.h> #include <linux/signal.h> #include <linux/kernel.h> #include <linux/ioport.h> #include <linux/interrupt.h> +#include <linux/vmalloc.h> +#include <asm/io.h> #include "hysdn_defs.h" #include "boardergo.h" @@ -270,7 +257,7 @@ return (-ERR_BOOTIMG_FAIL); } } /* start_boot_img */ - return (0); /* successfull */ + return (0); /* successful */ } /* ergo_writebootimg */ /********************************************************************************/ @@ -337,7 +324,7 @@ /***********************************************************************************/ /* ergo_waitpofready waits for a maximum of 10 seconds for the completition of the */ -/* boot process. If the process has been successfull 0 is returned otherwise a */ +/* boot process. If the process has been successful 0 is returned otherwise a */ /* negative error code is returned. */ /***********************************************************************************/ static int @@ -361,7 +348,7 @@ (dpr->ToPcSize < MIN_RDY_MSG_SIZE) || (dpr->ToPcSize > MAX_RDY_MSG_SIZE) || ((*(ulong *) dpr->ToPcBuf) != RDY_MAGIC)) - break; /* an error occured */ + break; /* an error occurred */ /* Check for additional data delivered during SysReady */ msg_size = dpr->ToPcSize - RDY_MAGIC_SIZE; @@ -386,7 +373,9 @@ dpr->ToPcInt = 1; /* interrupt to E1 for all cards */ restore_flags(flags); - if ((i = hysdn_net_create(card))) { + if ((hynet_enable & (1 << card->myid)) + && (i = hysdn_net_create(card))) + { ergo_stopcard(card); card->state = CARD_STATE_BOOTERR; return (i); Index: boardergo.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/boardergo.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- boardergo.h 14 Jan 2001 18:44:19 -0000 1.1.1.1 +++ boardergo.h 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,23 +1,12 @@ /* $Id$ - - * Linux driver for HYSDN cards, definitions for ergo type boards (buffers..). - * written by Werner Cornelius (we...@ti...) for Hypercope GmbH - * - * Copyright 1999 by Werner Cornelius (we...@ti...) * - * 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, or (at your option) - * any later version. + * Linux driver for HYSDN cards, definitions for ergo type boards (buffers..). * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Author Werner Cornelius (we...@ti...) for Hypercope GmbH + * Copyright 1999 by Werner Cornelius (we...@ti...) * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. * */ Index: hycapi.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/hycapi.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hycapi.c 14 Jan 2001 18:44:36 -0000 1.1.1.1 +++ hycapi.c 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,27 +1,15 @@ /* $Id$ * * Linux driver for HYSDN cards, CAPI2.0-Interface. - * written by Ulrich Albrecht (u.a...@hy...) for Hypercope GmbH * + * Author Ulrich Albrecht <u.a...@hy...> for Hypercope GmbH * Copyright 2000 by Hypercope GmbH * - * 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, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. * */ -#define __NO_VERSION__ #include <linux/module.h> #include <linux/version.h> #include <linux/signal.h> @@ -43,6 +31,9 @@ static char hycapi_revision[]="$Revision$"; +unsigned int hycapi_enable = 0xffffffff; +MODULE_PARM(hycapi_enable, "i"); + typedef struct _hycapi_appl { unsigned int ctrl_mask; capi_register_params rp; @@ -522,7 +513,7 @@ /****************************************************************** hycapi_rx_capipkt -Recieve a capi-message. +Receive a capi-message. All B3_DATA_IND are converted to 64K-extension compatible format. New nccis are created if neccessary. @@ -542,15 +533,11 @@ printk(KERN_NOTICE "hycapi_rx_capipkt\n"); #endif if(!cinfo) { - printk(KERN_ERR "HYSDN Card%d: no HYCAPI-controller!\n", - card->myid); return; } ctrl = cinfo->capi_ctrl; if(!ctrl) { - printk(KERN_ERR "HYSDN Card%d: no CAPI-controller (1)!\n", - card->myid); return; } if(len < CAPI_MSG_BASELEN) { @@ -644,8 +631,6 @@ printk(KERN_NOTICE "hycapi_tx_capiack\n"); #endif if(!cinfo) { - printk(KERN_ERR "HYSDN Card%d: no CAPI-controller (2)!\n", - card->myid); return; } spin_lock_irq(&cinfo->lock); @@ -671,8 +656,6 @@ { hycapictrl_info *cinfo = card->hyctrlinfo; if(!cinfo) { - printk(KERN_ERR "HYSDN Card%d: no CAPI-controller! (3)\n", - card->myid); return (struct sk_buff *)NULL; } if (!cinfo->sk_count) @@ -739,7 +722,7 @@ struct capi_driver *driver; driver = &hycapi_driver; if (!hy_di) { - printk(KERN_ERR "HYSDN: no capi-driver to detach (???)\n"); + printk(KERN_ERR "HYSDN: no capi-driver to detach (?)\n"); return; } printk(KERN_NOTICE "HYSDN: Detaching capi-driver\n"); @@ -792,6 +775,9 @@ #ifdef HYCAPI_PRINTFNAMES printk(KERN_NOTICE "hycapi_capi_create\n"); #endif + if((hycapi_enable & (1 << card->myid)) == 0) { + return 1; + } if (!card->hyctrlinfo) { cinfo = (hycapictrl_info *) kmalloc(sizeof(hycapictrl_info), GFP_ATOMIC); if (!cinfo) { Index: hysdn_boot.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/hysdn_boot.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- hysdn_boot.c 25 Feb 2001 23:15:10 -0000 1.1.1.2 +++ hysdn_boot.c 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,30 +1,16 @@ /* $Id$ - - * Linux driver for HYSDN cards, specific routines for booting and pof handling. - * - * written by Werner Cornelius (we...@ti...) for Hypercope GmbH - * - * Copyright 1999 by Werner Cornelius (we...@ti...) * - * 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, or (at your option) - * any later version. + * Linux driver for HYSDN cards + * specific routines for booting and pof handling * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Author Werner Cornelius (we...@ti...) for Hypercope GmbH + * Copyright 1999 by Werner Cornelius (we...@ti...) * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. * */ -#define __NO_VERSION__ -#include <linux/module.h> -#include <linux/version.h> #include <linux/vmalloc.h> #include <linux/slab.h> #include <asm/uaccess.h> @@ -49,7 +35,7 @@ uchar pof_state; /* actual state of read handler */ uchar is_crypted; /* card data is crypted */ int BufSize; /* actual number of bytes bufferd */ - int last_error; /* last occured error */ + int last_error; /* last occurred error */ word pof_recid; /* actual pof recid */ ulong pof_reclen; /* total length of pof record data */ ulong pof_recoffset; /* actual offset inside pof record */ @@ -62,7 +48,7 @@ }; /*****************************************************/ -/* start decryption of sucessive POF file chuncks. */ +/* start decryption of successive POF file chuncks. */ /* */ /* to be called at start of POF file reading, */ /* before starting any decryption on any POF record. */ @@ -93,7 +79,7 @@ /********************************************************************************/ /* pof_handle_data executes the required actions dependant on the active record */ -/* id. If successfull 0 is returned, a negative value shows an error. */ +/* id. If successful 0 is returned, a negative value shows an error. */ /********************************************************************************/ static int pof_handle_data(hysdn_card * card, int datlen) @@ -182,7 +168,7 @@ /* number of data bytes. The number delivered is additionally supplied for */ /* verification. The functions handles the data and returns the needed number */ /* of bytes for the next action. If the returned value is 0 or less an error */ -/* occured and booting must be aborted. */ +/* occurred and booting must be aborted. */ /******************************************************************************/ int pof_write_buffer(hysdn_card * card, int datlen) @@ -253,7 +239,7 @@ break; } if ((boot->last_error = pof_handle_data(card, datlen)) < 0) - return (boot->last_error); /* an error occured */ + return (boot->last_error); /* an error occurred */ boot->pof_recoffset += datlen; if (boot->pof_recoffset >= boot->pof_reclen) { boot->pof_state = POF_READ_TAG_HEAD; /* now start with single tags */ @@ -346,7 +332,7 @@ /*********************************************************************************/ /* EvalSysrTokData checks additional records delivered with the Sysready Message */ -/* when POF has been booted. A return value of 0 is used if no error occured. */ +/* when POF has been booted. A return value of 0 is used if no error occurred. */ /*********************************************************************************/ int EvalSysrTokData(hysdn_card * card, uchar * cp, int len) Index: hysdn_defs.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/hysdn_defs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hysdn_defs.h 14 Jan 2001 18:44:23 -0000 1.1.1.1 +++ hysdn_defs.h 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,23 +1,13 @@ /* $Id$ - - * Linux driver for HYSDN cards, global definitions and exported vars and functions. - * written by Werner Cornelius (we...@ti...) for Hypercope GmbH - * - * Copyright 1999 by Werner Cornelius (we...@ti...) * - * 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, or (at your option) - * any later version. + * Linux driver for HYSDN cards + * global definitions and exported vars and functions. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Author Werner Cornelius (we...@ti...) for Hypercope GmbH + * Copyright 1999 by Werner Cornelius (we...@ti...) * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. * */ @@ -273,6 +263,7 @@ extern int hysdn_tx_cfgline(hysdn_card *, uchar *, word); /* send one cfg line */ /* hysdn_net.c */ +extern unsigned int hynet_enable; extern char *hysdn_net_revision; extern int hysdn_net_create(hysdn_card *); /* create a new net device */ extern int hysdn_net_release(hysdn_card *); /* delete the device */ @@ -282,6 +273,7 @@ extern void hysdn_rx_netpkt(hysdn_card *, uchar *, word); /* rxed packet from network */ #ifdef CONFIG_HYSDN_CAPI +extern unsigned int hycapi_enable; extern struct capi_driver_interface *hy_di; extern int hycapi_capi_create(hysdn_card *); /* create a new capi device */ extern int hycapi_capi_release(hysdn_card *); /* delete the device */ Index: hysdn_init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/hysdn_init.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- hysdn_init.c 25 Feb 2001 23:15:10 -0000 1.1.1.2 +++ hysdn_init.c 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,23 +1,12 @@ /* $Id$ - - * Linux driver for HYSDN cards, init functions. - * written by Werner Cornelius (we...@ti...) for Hypercope GmbH - * - * Copyright 1999 by Werner Cornelius (we...@ti...) * - * 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, or (at your option) - * any later version. + * Linux driver for HYSDN cards, init functions. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Author Werner Cornelius (we...@ti...) for Hypercope GmbH + * Copyright 1999 by Werner Cornelius (we...@ti...) * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. * */ @@ -32,6 +21,18 @@ #include "hysdn_defs.h" +static struct pci_device_id hysdn_pci_tbl[] __initdata = { + {PCI_VENDOR_ID_HYPERCOPE, PCI_DEVICE_ID_HYPERCOPE_PLX, PCI_ANY_ID, PCI_SUBDEVICE_ID_HYPERCOPE_METRO}, + {PCI_VENDOR_ID_HYPERCOPE, PCI_DEVICE_ID_HYPERCOPE_PLX, PCI_ANY_ID, PCI_SUBDEVICE_ID_HYPERCOPE_CHAMP2}, + {PCI_VENDOR_ID_HYPERCOPE, PCI_DEVICE_ID_HYPERCOPE_PLX, PCI_ANY_ID, PCI_SUBDEVICE_ID_HYPERCOPE_ERGO}, + {PCI_VENDOR_ID_HYPERCOPE, PCI_DEVICE_ID_HYPERCOPE_PLX, PCI_ANY_ID, PCI_SUBDEVICE_ID_HYPERCOPE_OLD_ERGO}, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, hysdn_pci_tbl); +MODULE_DESCRIPTION("ISDN4Linux: Driver for HYSDN cards"); +MODULE_AUTHOR("Werner Cornelius"); +MODULE_LICENSE("GPL"); + static char *hysdn_init_revision = "$Revision$"; int cardmax; /* number of found cards */ hysdn_card *card_root = NULL; /* pointer to first card */ @@ -62,14 +63,6 @@ } /* terminating entry */ }; -static struct pci_device_id hysdn_pci_tbl[] __initdata = { - {PCI_VENDOR_ID_HYPERCOPE, PCI_DEVICE_ID_HYPERCOPE_PLX, PCI_ANY_ID, PCI_SUBDEVICE_ID_HYPERCOPE_METRO}, - {PCI_VENDOR_ID_HYPERCOPE, PCI_DEVICE_ID_HYPERCOPE_PLX, PCI_ANY_ID, PCI_SUBDEVICE_ID_HYPERCOPE_CHAMP2}, - {PCI_VENDOR_ID_HYPERCOPE, PCI_DEVICE_ID_HYPERCOPE_PLX, PCI_ANY_ID, PCI_SUBDEVICE_ID_HYPERCOPE_ERGO}, - {PCI_VENDOR_ID_HYPERCOPE, PCI_DEVICE_ID_HYPERCOPE_PLX, PCI_ANY_ID, PCI_SUBDEVICE_ID_HYPERCOPE_OLD_ERGO}, - { } /* Terminating entry */ -}; -MODULE_DEVICE_TABLE(pci, hysdn_pci_tbl); /*********************************************************************/ /* search_cards searches for available cards in the pci config data. */ @@ -89,6 +82,7 @@ akt_pcidev)) != NULL) { if (pci_enable_device(akt_pcidev)) continue; + if (!(card = kmalloc(sizeof(hysdn_card), GFP_KERNEL))) { printk(KERN_ERR "HYSDN: unable to alloc device mem \n"); return; @@ -173,7 +167,6 @@ /* image becomes smaller and the driver code is only loaded when needed. */ /* Additionally newer versions may be activated without rebooting. */ /****************************************************************************/ -#ifdef CONFIG_MODULES /******************************************************/ /* extract revision number from string for log output */ @@ -197,12 +190,12 @@ /****************************************************************************/ /* init_module is called once when the module is loaded to do all necessary */ /* things like autodetect... */ -/* If the return value of this function is 0 the init has been successfull */ +/* If the return value of this function is 0 the init has been successful */ /* and the module is added to the list in /proc/modules, otherwise an error */ /* is assumed and the module will not be kept in memory. */ /****************************************************************************/ -int -init_module(void) +static int __init +hysdn_init(void) { char tmp[50]; @@ -235,14 +228,14 @@ /***********************************************************************/ /* cleanup_module is called when the module is released by the kernel. */ -/* The routine is only called if init_module has been successfull and */ +/* The routine is only called if init_module has been successful and */ /* the module counter has a value of 0. Otherwise this function will */ /* not be called. This function must release all resources still allo- */ /* cated as after the return from this function the module code will */ /* be removed from memory. */ /***********************************************************************/ -void -cleanup_module(void) +static void __exit +hysdn_exit(void) { #ifdef CONFIG_HYSDN_CAPI hysdn_card *card; @@ -261,4 +254,5 @@ printk(KERN_NOTICE "HYSDN: module unloaded\n"); } /* cleanup_module */ -#endif /* CONFIG_MODULES */ +module_init(hysdn_init); +module_exit(hysdn_exit); Index: hysdn_net.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/hysdn_net.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hysdn_net.c 14 Jan 2001 18:44:25 -0000 1.1.1.1 +++ hysdn_net.c 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,28 +1,16 @@ /* $Id$ - + * * Linux driver for HYSDN cards, net (ethernet type) handling routines. * - * written by Werner Cornelius (we...@ti...) for Hypercope GmbH + * Author Werner Cornelius (we...@ti...) for Hypercope GmbH + * Copyright 1999 by Werner Cornelius (we...@ti...) * - * Copyright 1999 by Werner Cornelius (we...@ti...) + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. * * This net module has been inspired by the skeleton driver from * Donald Becker (be...@CE...) * - * 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, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * */ #define __NO_VERSION__ @@ -37,6 +25,9 @@ #include "hysdn_defs.h" +unsigned int hynet_enable = 0xffffffff; +MODULE_PARM(hynet_enable, "i"); + /* store the actual version for log reporting */ char *hysdn_net_revision = "$Revision$"; @@ -301,8 +292,7 @@ hysdn_net_release(card); /* release an existing net device */ if ((dev = kmalloc(sizeof(struct net_local), GFP_KERNEL)) == NULL) { printk(KERN_WARNING "HYSDN: unable to allocate mem\n"); - if (card->debug_flags & LOG_NET_INIT) - return (-ENOMEM); + return (-ENOMEM); } memset(dev, 0, sizeof(struct net_local)); /* clean the structure */ @@ -350,7 +340,7 @@ if (card->debug_flags & LOG_NET_INIT) hysdn_addlog(card, "network device deleted"); - return (0); /* always successfull */ + return (0); /* always successful */ } /* hysdn_net_release */ /*****************************************************************************/ Index: hysdn_pof.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/hysdn_pof.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hysdn_pof.h 14 Jan 2001 18:44:26 -0000 1.1.1.1 +++ hysdn_pof.h 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,23 +1,12 @@ /* $Id$ - - * Linux driver for HYSDN cards, definitions used for handling pof-files. - * written by Werner Cornelius (we...@ti...) for Hypercope GmbH - * - * Copyright 1999 by Werner Cornelius (we...@ti...) * - * 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, or (at your option) - * any later version. + * Linux driver for HYSDN cards, definitions used for handling pof-files. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Author Werner Cornelius (we...@ti...) for Hypercope GmbH + * Copyright 1999 by Werner Cornelius (we...@ti...) * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. * */ Index: hysdn_procconf.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/hysdn_procconf.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hysdn_procconf.c 14 Jan 2001 18:44:28 -0000 1.1.1.1 +++ hysdn_procconf.c 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,23 +1,13 @@ /* $Id$ - + * * Linux driver for HYSDN cards, /proc/net filesystem dir and conf functions. + * * written by Werner Cornelius (we...@ti...) for Hypercope GmbH * * Copyright 1999 by Werner Cornelius (we...@ti...) * - * 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, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. * */ @@ -41,7 +31,7 @@ #define CONF_STATE_DETECT 0 /* waiting for detect */ #define CONF_STATE_CONF 1 /* writing config data */ #define CONF_STATE_POF 2 /* writing pof data */ -#define CONF_LINE_LEN 80 /* 80 chars max */ +#define CONF_LINE_LEN 255 /* 255 chars max */ struct conf_writedata { hysdn_card *card; /* card the device is connected to */ @@ -56,7 +46,7 @@ /***********************************************************************/ /* process_line parses one config line and transfers it to the card if */ /* necessary. */ -/* if the return value is negative an error occured. */ +/* if the return value is negative an error occurred. */ /***********************************************************************/ static int process_line(struct conf_writedata *cnf) @@ -92,15 +82,6 @@ return (0); } /* process_line */ -/*************************/ -/* dummy file operations */ -/*************************/ -static loff_t -hysdn_dummy_lseek(struct file *file, loff_t offset, int orig) -{ - return -ESPIPE; -} /* hysdn_dummy_lseek */ - /***********************************/ /* conf file operations and tables */ /***********************************/ @@ -130,7 +111,7 @@ if (ch == 0x1A) { /* we detected a pof file */ if ((cnf->needed_size = pof_write_open(cnf->card, &cnf->pof_buffer)) <= 0) - return (cnf->needed_size); /* an error occured -> exit */ + return (cnf->needed_size); /* an error occurred -> exit */ cnf->buf_size = 0; /* buffer is empty */ cnf->state = CONF_STATE_POF; /* new state */ } else { @@ -158,7 +139,7 @@ cnf->needed_size = pof_write_buffer(cnf->card, cnf->buf_size); /* write data */ if (cnf->needed_size <= 0) { cnf->card->state = CARD_STATE_BOOTERR; /* show boot error */ - return (cnf->needed_size); /* an error occured */ + return (cnf->needed_size); /* an error occurred */ } cnf->buf_size = 0; /* buffer is empty again */ } @@ -396,7 +377,7 @@ /******************************************************/ static struct file_operations conf_fops = { - llseek: hysdn_dummy_lseek, + llseek: no_llseek, read: hysdn_conf_read, write: hysdn_conf_write, open: hysdn_conf_open, @@ -465,4 +446,4 @@ } remove_proc_entry(PROC_SUBDIR_NAME, proc_net); -} /* hysdn_procfs_release */ +} Index: hysdn_procfs.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/hysdn_procfs.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hysdn_procfs.c 14 Jan 2001 18:44:30 -0000 1.1.1.1 +++ hysdn_procfs.c 10 Apr 2002 15:32:26 -0000 1.2 @@ -20,8 +20,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log$ - * Revision 1.1.1.1 2001/01/14 18:44:30 kenn - * Importing official Linus 2.4.0 tree + * Revision 1.2 2002/04/10 15:32:26 atp + * synch 2.4.15 commit 49 * * Revision 1.1 2000/02/10 19:45:18 werner * @@ -116,15 +116,6 @@ } /* put_log_buffer */ -/*************************/ -/* dummy file operations */ -/*************************/ -static loff_t -hysdn_dummy_lseek(struct file *file, loff_t offset, int orig) -{ - return -ESPIPE; -} /* hysdn_dummy_lseek */ - /**********************************/ /* log file operations and tables */ /**********************************/ @@ -142,7 +133,7 @@ return (-ESPIPE); if ((retval = pof_boot_write(card, buf, count)) < 0) - retval = -EFAULT; /* an error occured */ + retval = -EFAULT; /* an error occurred */ return (retval); } /* hysdn_log_write */ @@ -343,7 +334,7 @@ /**************************************************/ static struct file_operations log_fops = { - llseek: hysdn_dummy_lseek, + llseek: no_llseek, read: hysdn_log_read, write: hysdn_log_write, poll: hysdn_log_poll, Index: hysdn_proclog.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/hysdn_proclog.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hysdn_proclog.c 14 Jan 2001 18:44:31 -0000 1.1.1.1 +++ hysdn_proclog.c 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,23 +1,12 @@ /* $Id$ - - * Linux driver for HYSDN cards, /proc/net filesystem log functions. - * written by Werner Cornelius (we...@ti...) for Hypercope GmbH - * - * Copyright 1999 by Werner Cornelius (we...@ti...) * - * 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, or (at your option) - * any later version. + * Linux driver for HYSDN cards, /proc/net filesystem log functions. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Author Werner Cornelius (we...@ti...) for Hypercope GmbH + * Copyright 1999 by Werner Cornelius (we...@ti...) * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. * */ @@ -153,15 +142,6 @@ } /* put_log_buffer */ -/*************************/ -/* dummy file operations */ -/*************************/ -static loff_t -hysdn_dummy_lseek(struct file *file, loff_t offset, int orig) -{ - return -ESPIPE; -} /* hysdn_dummy_lseek */ - /******************************/ /* file operations and tables */ /******************************/ @@ -228,7 +208,7 @@ struct log_data *inf; int len; word ino; - struct procdata *pd; + struct procdata *pd = NULL; hysdn_card *card; if (!*((struct log_data **) file->private_data)) { @@ -271,7 +251,7 @@ hysdn_log_open(struct inode *ino, struct file *filep) { hysdn_card *card; - struct procdata *pd; + struct procdata *pd = NULL; ulong flags; lock_kernel(); @@ -381,7 +361,7 @@ unsigned int mask = 0; word ino; hysdn_card *card; - struct procdata *pd; + struct procdata *pd = NULL; if ((file->f_mode & (FMODE_READ | FMODE_WRITE)) == FMODE_WRITE) return (mask); /* no polling for write supported */ @@ -411,7 +391,7 @@ /**************************************************/ static struct file_operations log_fops = { - llseek: hysdn_dummy_lseek, + llseek: no_llseek, read: hysdn_log_read, write: hysdn_log_write, poll: hysdn_log_poll, Index: hysdn_sched.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/hysdn_sched.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hysdn_sched.c 14 Jan 2001 18:44:33 -0000 1.1.1.1 +++ hysdn_sched.c 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,36 +1,23 @@ /* $Id$ - - * Linux driver for HYSDN cards, scheduler routines for handling exchange card <-> pc. - * - * written by Werner Cornelius (we...@ti...) for Hypercope GmbH - * - * Copyright 1999 by Werner Cornelius (we...@ti...) * - * 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, or (at your option) - * any later version. + * Linux driver for HYSDN cards + * scheduler routines for handling exchange card <-> pc. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Author Werner Cornelius (we...@ti...) for Hypercope GmbH + * Copyright 1999 by Werner Cornelius (we...@ti...) * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. * */ -#define __NO_VERSION__ #include <linux/config.h> -#include <linux/module.h> -#include <linux/version.h> -#include <asm/io.h> +#include <linux/sched.h> #include <linux/signal.h> #include <linux/kernel.h> #include <linux/ioport.h> #include <linux/interrupt.h> +#include <asm/io.h> #include "hysdn_defs.h" @@ -47,7 +34,10 @@ switch (chan) { case CHAN_NDIS_DATA: - hysdn_rx_netpkt(card, buf, len); /* give packet to network handler */ + if (hynet_enable & (1 << card->myid)) { + /* give packet to network handler */ + hysdn_rx_netpkt(card, buf, len); + } break; case CHAN_ERRLOG: @@ -58,7 +48,9 @@ #ifdef CONFIG_HYSDN_CAPI case CHAN_CAPI: /* give packet to CAPI handler */ - hycapi_rx_capipkt(card, buf, len); + if (hycapi_enable & (1 << card->myid)) { + hycapi_rx_capipkt(card, buf, len); + } break; #endif /* CONFIG_HYSDN_CAPI */ default: @@ -115,7 +107,9 @@ return (1); /* tell that data should be send */ } /* error log start and able to send */ /* now handle network interface packets */ - if ((skb = hysdn_tx_netget(card)) != NULL) { + if ((hynet_enable & (1 << card->myid)) && + (skb = hysdn_tx_netget(card)) != NULL) + { if (skb->len <= maxlen) { memcpy(buf, skb->data, skb->len); /* copy the packet to the buffer */ *len = skb->len; @@ -126,7 +120,9 @@ hysdn_tx_netack(card); /* aknowledge packet -> throw away */ } /* send a network packet if available */ #ifdef CONFIG_HYSDN_CAPI - if((skb = hycapi_tx_capiget(card)) != NULL) { + if( ((hycapi_enable & (1 << card->myid))) && + ((skb = hycapi_tx_capiget(card)) != NULL) ) + { if (skb->len <= maxlen) { memcpy(buf, skb->data, skb->len); *len = skb->len; @@ -141,7 +137,7 @@ /*****************************************************************************/ -/* send one config line to the card and return 0 if successfull, otherwise a */ +/* send one config line to the card and return 0 if successful, otherwise a */ /* negative error code. */ /* The function works with timeouts perhaps not giving the greatest speed */ /* sending the line, but this should be meaningless beacuse only some lines */ Index: ince1pc.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/hysdn/ince1pc.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ince1pc.h 14 Jan 2001 18:44:33 -0000 1.1.1.1 +++ ince1pc.h 10 Apr 2002 15:32:26 -0000 1.2 @@ -1,17 +1,19 @@ +/* + * Linux driver for HYSDN cards + * common definitions for both sides of the bus: + * - conventions both spoolers must know + * - channel numbers agreed upon + * + * Author M. Steinkopf + * Copyright 1999 by M. Steinkopf + * + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. + * + */ + #ifndef __INCE1PC_H__ #define __INCE1PC_H__ - -/**************************************************************************** - - FILE: ince1pc.h - - AUTHOR: M.Steinkopf - - PURPOSE: common definitions for both sides of the bus: - - conventions both spoolers must know - - channel numbers agreed upon - -*****************************************************************************/ /* basic scalar definitions have same meanning, * but their declaration location depends on environment |