spelling fixes from KERNEL_2_4

compilation warning fixes from KERNEL_2_4
sedlbauer PCMCIA support module
This commit is contained in:
Kai Germaschewski 2001-03-15 09:03:42 +00:00
parent 100bf42e08
commit 331c629e51
129 changed files with 913 additions and 224 deletions

View File

@ -480,8 +480,8 @@ Description of the Interface between Linklevel and Hardwarelevel
Parameter:
driver = driver-Id
command = ISDN_CMD_PROT_IO
arg = The lower 8 Bits define the adressed protocol as defined
in ISDN_PTYPE..., the upper bits are used to differenciate
arg = The lower 8 Bits define the addressed protocol as defined
in ISDN_PTYPE..., the upper bits are used to differentiate
the protocol specific CMD.
para = protocol and function specific. See isdnif.h for detail.
@ -734,7 +734,7 @@ Description of the Interface between Linklevel and Hardwarelevel
Parameter:
driver = driver-Id
command = ISDN_STAT_PROT
arg = The lower 8 Bits define the adressed protocol as defined
arg = The lower 8 Bits define the addressed protocol as defined
in ISDN_PTYPE..., the upper bits are used to differenciate
the protocol specific STAT.
@ -748,7 +748,7 @@ Description of the Interface between Linklevel and Hardwarelevel
loading the driver. The LL has to ignore a disabled channel when searching
for free channels. The HL driver itself never delivers STAT callbacks for
disabled channels.
The LL returns a nonzero code if the operation was not successfull or the
The LL returns a nonzero code if the operation was not successful or the
selected channel is actually regarded as busy.
Parameter:

View File

@ -6,7 +6,7 @@ document. The diversion services may be used with all cards supported by
the HiSax driver.
The diversion kernel interface and controlling tool divertctrl were written
by Werner Cornelius (werner@isdn4linux.de or werner@titro.de) under the
GNU Public License.
GNU General Public License.
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

View File

@ -2,7 +2,7 @@ $Id$
The hysdn driver has been written by
by Werner Cornelius (werner@isdn4linux.de or werner@titro.de)
for Hypercope GmbH Aachen Germany. Hypercope agreed to publish this driver
under the GNU Public License.
under the GNU General Public License.
The CAPI 2.0-support was added by Ulrich Albrecht (ualbrecht@hypercope.de)
for Hypercope GmbH Aachen, Germany.

View File

@ -107,11 +107,12 @@ if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then
if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
bool ' HFC-S+, HFC-SP, HFC-PCMCIA cards' CONFIG_HISAX_HFC_SX
# bool ' TESTEMULATOR (EXPERIMENTAL)' CONFIG_HISAX_TESTEMU
bool ' Sedlbauer PCMCIA cards' CONFIG_HISAX_SEDLBAUER_CS
if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then
bool ' Am7930' CONFIG_HISAX_AMD7930
fi
fi
dep_tristate ' Sedlbauer PCMCIA cs module' CONFIG_HISAX_SEDLBAUER_CS $CONFIG_PCMCIA
fi
endmenu

View File

@ -88,7 +88,7 @@ typedef struct act2000_fwid {
#include <asm/io.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/ioport.h>

View File

@ -128,7 +128,7 @@ actcapi_chkhdr(act2000_card * card, actcapi_msghdr *hdr)
m->hdr.cmd.cmd = c; \
m->hdr.cmd.subcmd = s; \
m->hdr.msgnum = actcapi_nextsmsg(card); \
} \
} else m = NULL;\
}
#define ACTCAPI_CHKSKB if (!skb) { \

View File

@ -44,7 +44,7 @@ typedef struct actcapi_msgdsc {
char *description;
} actcapi_msgdsc;
/* CAPI Adress */
/* CAPI Address */
typedef struct actcapi_addr {
__u8 len; /* Length of element */
__u8 tnp; /* Type/Numbering Plan */

View File

@ -11,7 +11,7 @@
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/ptrace.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/tty.h>
@ -138,6 +138,8 @@ static dev_link_t *avmcs_attach(void)
/* Initialize the dev_link_t structure */
link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL);
if (!link)
return NULL;
memset(link, 0, sizeof(struct dev_link_t));
link->release.function = &avmcs_release;
link->release.data = (u_long)link;
@ -169,6 +171,8 @@ static dev_link_t *avmcs_attach(void)
/* Allocate space for private device-specific data */
local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
if (!local)
return NULL;
memset(local, 0, sizeof(local_info_t));
link->priv = local;

View File

@ -6,6 +6,10 @@
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.10 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
*
* Revision 1.9 2000/11/01 14:05:02 calle
* - use module_init/module_exit from linux/init.h.
* - all static struct variables are initialized with "membername:" now.
@ -20,7 +24,7 @@
* - fixed problem with memory mapping if address is not aligned
*
* Revision 1.6 2000/01/25 14:37:39 calle
* new message after successfull detection including card revision and
* new message after successful detection including card revision and
* used resources.
*
* Revision 1.5 1999/11/05 16:38:01 calle

View File

@ -6,6 +6,10 @@
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.36 2000/12/17 21:14:58 kai
* sync with kernel. std2kern hopefully takes care of the Makefile
* difference for the time being
*
* Revision 1.35 2000/12/10 22:51:05 kai
* add pci_set_master
* ioremap is handling unaligned regions since
@ -147,13 +151,6 @@ static char *revision = "$Revision$";
/* ------------------------------------------------------------- */
#ifndef PCI_VENDOR_ID_AVM
#define PCI_VENDOR_ID_AVM 0x1244
#endif
#ifndef PCI_DEVICE_ID_AVM_B1
#define PCI_DEVICE_ID_AVM_B1 0x700
#endif
#ifndef COMPAT_HAS_2_2_PCI
static struct pci_device_id b1pci_pci_tbl[] __initdata = {
{ PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_B1, PCI_ANY_ID, PCI_ANY_ID },

View File

@ -6,6 +6,10 @@
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.12 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
*
* Revision 1.11 2000/11/01 14:05:02 calle
* - use module_init/module_exit from linux/init.h.
* - all static struct variables are initialized with "membername:" now.
@ -29,7 +33,7 @@
* - fixed problem with memory mapping if address is not aligned
*
* Revision 1.6 2000/01/25 14:37:39 calle
* new message after successfull detection including card revision and
* new message after successful detection including card revision and
* used resources.
*
* Revision 1.5 1999/11/05 16:38:01 calle

View File

@ -6,6 +6,9 @@
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.28 2001/01/22 10:26:03 calle
* - Didn't compile with 2.2.X (pci_resource_start not defined).
*
* Revision 1.27 2000/12/10 22:51:05 kai
* add pci_set_master
* ioremap is handling unaligned regions since
@ -98,7 +101,7 @@
* - fixed problem with memory mapping if address is not aligned
*
* Revision 1.3 2000/01/25 14:37:39 calle
* new message after successfull detection including card revision and
* new message after successful detection including card revision and
* used resources.
*
* Revision 1.2 2000/01/21 20:52:58 keil
@ -138,18 +141,6 @@ static char *revision = "$Revision$";
#undef CONFIG_C4_POLLDEBUG
/* ------------------------------------------------------------- */
#ifndef PCI_VENDOR_ID_DEC
#define PCI_VENDOR_ID_DEC 0x1011
#endif
#ifndef PCI_DEVICE_ID_DEC_21285
#define PCI_DEVICE_ID_DEC_21285 0x1065
#endif
#ifndef PCI_VENDOR_ID_AVM
#define PCI_VENDOR_ID_AVM 0x1244
#endif
#ifndef PCI_DEVICE_ID_AVM_C4
#define PCI_DEVICE_ID_AVM_C4 0x0800
#endif
static int suppress_pollack;

View File

@ -6,6 +6,9 @@
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.49 2001/01/29 13:13:44 calle
* - added compile info to revision output.
*
* Revision 1.48 2001/01/25 14:58:56 calle
* - insert ncci in list after registering to capifs, not before.
*
@ -227,7 +230,7 @@
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/sched.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/fcntl.h>
#include <linux/fs.h>
#include <linux/signal.h>

View File

@ -6,6 +6,10 @@
* Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.39 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
*
* Revision 1.38 2000/11/14 08:43:07 calle
* Bugfix for v110. Connectparamters where setup for sync ...
*
@ -194,7 +198,7 @@
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/sched.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/fcntl.h>
#include <linux/fs.h>
#include <linux/signal.h>
@ -485,7 +489,7 @@ static inline __u8 cip2si2(__u16 cipval)
}
/* -------- controller managment ------------------------------------- */
/* -------- controller management ------------------------------------- */
static inline capidrv_contr *findcontrbydriverid(int driverid)
{

View File

@ -6,6 +6,9 @@
* Heavily based on devpts filesystem from H. Peter Anvin
*
* $Log$
* Revision 1.16 2000/11/28 11:42:19 kai
* merged MODULE_DEV_TABLE changes
*
* Revision 1.14.2.1 2000/11/26 17:47:53 kai
* added PCI_DEV_TABLE for 2.4
*
@ -83,7 +86,7 @@
#include <linux/kernel.h>
#include <linux/locks.h>
#include <linux/major.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/ctype.h>
#include <asm/bitops.h>
#include <asm/uaccess.h>

View File

@ -27,7 +27,7 @@
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/ptrace.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <asm/io.h>

View File

@ -6,6 +6,9 @@
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.22 2000/12/11 00:10:33 kai
* add the tq_scheduler -> schedule_task change from 2.4
*
* Revision 1.21 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
@ -816,7 +819,7 @@ static void controllercb_appl_released(struct capi_ctr * card, __u16 appl)
}
}
/*
* ncci managment
* ncci management
*/
static void controllercb_new_ncci(struct capi_ctr * card,

View File

@ -6,6 +6,10 @@
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.16 2000/11/23 20:45:14 kai
* fixed module_init/exit stuff
* Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
*
* Revision 1.15 2000/11/01 14:05:02 calle
* - use module_init/module_exit from linux/init.h.
* - all static struct variables are initialized with "membername:" now.
@ -29,7 +33,7 @@
* - fixed problem with memory mapping if address is not aligned
*
* Revision 1.9 2000/01/25 14:37:39 calle
* new message after successfull detection including card revision and
* new message after successful detection including card revision and
* used resources.
*
* Revision 1.8 1999/11/05 16:38:01 calle

View File

@ -6,6 +6,9 @@
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.20 2001/01/22 10:26:03 calle
* - Didn't compile with 2.2.X (pci_resource_start not defined).
*
* Revision 1.19 2000/12/10 22:51:05 kai
* add pci_set_master
* ioremap is handling unaligned regions since
@ -115,12 +118,6 @@ static char *revision = "$Revision$";
#undef CONFIG_T1PCI_POLLDEBUG
/* ------------------------------------------------------------- */
#ifndef PCI_VENDOR_ID_AVM
#define PCI_VENDOR_ID_AVM 0x1244
#endif
#ifndef PCI_DEVICE_ID_AVM_T1
#define PCI_DEVICE_ID_AVM_T1 0x1200
#endif
#ifndef COMPAT_HAS_2_2_PCI
static struct pci_device_id t1pci_pci_tbl[] __initdata = {

View File

@ -290,7 +290,7 @@ int deflect_extern_action(u_char cmd, ulong callid, char *to_nr)
/* insert a new rule before idx */
/********************************/
int insertrule(int idx, divert_rule *newrule)
{ struct deflect_struc *ds,*ds1;
{ struct deflect_struc *ds,*ds1=NULL;
int flags;
if (!(ds = (struct deflect_struc *) kmalloc(sizeof(struct deflect_struc),

View File

@ -28,7 +28,7 @@
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <errno.h>
#include "adapter.h"

View File

@ -139,7 +139,7 @@ typedef struct {
#include <asm/io.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/ioport.h>

View File

@ -62,7 +62,7 @@ struct get_serial_s {
struct postcall_s {
word command; /* command = 0x0300 */
word dummy; /* not used */
IDI_CALL callback; /* routine adress to call back */
IDI_CALL callback; /* routine address to call back */
ENTITY *contxt; /* ptr to entity to use */
};

View File

@ -27,7 +27,7 @@
#include <linux/kernel.h>
#include <linux/poll.h>
#include <linux/fs.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#undef N_DATA

View File

@ -26,7 +26,7 @@
#include <asm/io.h>
#include <asm/system.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/isdn_compat.h>

View File

@ -34,7 +34,6 @@ hisax-objs-$(CONFIG_HISAX_DIEHLDIVA) += diva.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_ASUSCOM) += asuscom.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_TELEINT) += teleint.o isac.o arcofi.o hfc_2bs0.o
hisax-objs-$(CONFIG_HISAX_SEDLBAUER) += sedlbauer.o isac.o arcofi.o hscx.o isar.o
hisax-objs-$(CONFIG_HISAX_SEDLBAUER_CS) += sedlbauer_cs.o
hisax-objs-$(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-objs-$(CONFIG_HISAX_NETJET) += nj_s.o netjet.o isac.o arcofi.o
@ -55,7 +54,8 @@ hisax-objs += $(sort $(hisax-objs-y))
# Each configuration option enables a list of files.
obj-$(CONFIG_ISDN_DRV_HISAX) += hisax.o
obj-$(CONFIG_ISDN_DRV_HISAX) += hisax.o
obj-$(CONFIG_HISAX_SEDLBAUER_CS) += sedlbauer_cs.o
MD5FILES := isac.c isdnl1.c isdnl2.c isdnl3.c \
tei.c callc.c cert.c l3dss1.c l3_1tr6.c \

View File

@ -14,7 +14,7 @@
*
* The code is unreliable enough to be consider alpha
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
* Advanced Micro Devices' Am79C30A is an ISDN/audio chip used in the
* SparcStation 1+. The chip provides microphone and speaker interfaces

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -6,7 +6,7 @@
*
* Thanks to ASUSCOM NETWORK INC. Taiwan and Dynalink NL for informations
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__

View File

@ -7,7 +7,7 @@
*
* Author Carsten Paeth (calle@calle.in-berlin.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*/
#define __NO_VERSION__
#include <linux/init.h>

View File

@ -5,7 +5,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__

View File

@ -1,5 +1,4 @@
/* $Id$
*
* bkm_a4t.c low level stuff for T-Berkom A4T
* derived from the original file sedlbauer.c
* derived from the original file niccy.c
@ -7,7 +6,7 @@
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -1,5 +1,4 @@
/* $Id$
*
* bkm_a8.c low level stuff for Scitel Quadro (4*S0, passive)
* derived from the original file sedlbauer.c
* derived from the original file niccy.c
@ -7,7 +6,7 @@
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__

View File

@ -1,10 +1,9 @@
/* $Id$
*
* bkm_ax.h low level decls for T-Berkom cards A4T and Scitel Quadro (4*S0, passive)
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -3,7 +3,7 @@
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@ -337,7 +337,7 @@ lli_go_active(struct FsmInst *fi, int event, void *arg)
* RESUME
*/
/* incomming call */
/* incoming call */
static void
lli_deliver_call(struct FsmInst *fi, int event, void *arg)

View File

@ -2,7 +2,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*

View File

@ -1,10 +1,9 @@
/* $Id$
*
*
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#include <linux/types.h>

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*

View File

@ -2,7 +2,7 @@
*
* stuff for the serial modem on ELSA cards
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#include <linux/config.h>

View File

@ -6,7 +6,7 @@
* Thanks to Jan den Ouden
* Fritz Elfert
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__

View File

@ -5,7 +5,7 @@
* Author BeWan Systems
* based on source code from Karsten Keil
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#include <linux/config.h>

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -2,7 +2,7 @@
*
* Basic declarations, defines and prototypes
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#include <linux/config.h>
@ -16,7 +16,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/malloc.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/ioport.h>
@ -128,13 +128,13 @@
#define l3dss1_process
#include "l3dss1.h"
#undef l3dss1_process
#endif CONFIG_HISAX_EURO
#endif /* CONFIG_HISAX_EURO */
#ifdef CONFIG_HISAX_NI1
#define l3ni1_process
#include "l3ni1.h"
#undef l3ni1_process
#endif CONFIG_HISAX_NI1
#endif /* CONFIG_HISAX_NI1 */
#define MAX_DFRAME_LEN 260
#define MAX_DFRAME_LEN_L1 300
@ -320,10 +320,10 @@ struct PStack {
{ u_char uuuu; /* only as dummy */
#ifdef CONFIG_HISAX_EURO
dss1_stk_priv dss1; /* private dss1 data */
#endif CONFIG_HISAX_EURO
#endif /* CONFIG_HISAX_EURO */
#ifdef CONFIG_HISAX_NI1
ni1_stk_priv ni1; /* private ni1 data */
#endif CONFIG_HISAX_NI1
#endif /* CONFIG_HISAX_NI1 */
} prot;
};
@ -344,10 +344,10 @@ struct l3_process {
{ u_char uuuu; /* only when euro not defined, avoiding empty union */
#ifdef CONFIG_HISAX_EURO
dss1_proc_priv dss1; /* private dss1 data */
#endif CONFIG_HISAX_EURO
#endif /* CONFIG_HISAX_EURO */
#ifdef CONFIG_HISAX_NI1
ni1_proc_priv ni1; /* private ni1 data */
#endif CONFIG_HISAX_NI1
#endif /* CONFIG_HISAX_NI1 */
} prot;
};

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -6,7 +6,7 @@
*
* This is an include file for fast inline IRQ stuff
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -7,10 +7,10 @@
// www.traverse.com.au
//
// 1999.6.25 Initial implementation of routines for Siemens ISDN
// Communication Controler PEB 2070 based on the ISAC routines
// Communication Controller PEB 2070 based on the ISAC routines
// written by Karsten Keil.
//
// This file is (c) under GNU PUBLIC LICENSE
// This file is (c) under GNU General Public License
//
//-----------------------------------------------------------------------------

View File

@ -7,10 +7,10 @@
// www.traverse.com.au
//
// 1999.7.14 Initial implementation of routines for Siemens ISDN
// Communication Controler PEB 2070 based on the ISAC routines
// Communication Controller PEB 2070 based on the ISAC routines
// written by Karsten Keil.
//
// This file is (c) under GNU PUBLIC LICENSE
// This file is (c) under GNU General Public License
//
//-----------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*/
@ -445,7 +445,7 @@ isac_interrupt(struct IsdnCardState *cs, u_char val)
if (cs->debug & L1_DEB_MONITOR)
debugl1(cs, "ISAC %02x -> MOX1", cs->dc.isac.mon_tx[cs->dc.isac.mon_txp -1]);
}
AfterMOX1:
AfterMOX1:;
#endif
}
}

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -5,7 +5,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*

View File

@ -2,7 +2,7 @@
*
* Layer 1 defines
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -3,7 +3,7 @@
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*

View File

@ -2,7 +2,7 @@
*
* Layer 2 defines
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -3,7 +3,7 @@
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*

View File

@ -1,6 +1,6 @@
/* $Id$
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -14,7 +14,7 @@
/*
For the modification done by the author the following terms and conditions
apply (GNU PUBLIC LICENSE)
apply (GNU General Public License)
This program is free software; you can redistribute it and/or modify

View File

@ -4,7 +4,7 @@
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -3,7 +3,7 @@
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*

View File

@ -2,7 +2,7 @@
*
* German 1TR6 D-channel protocol defines
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#ifndef l3_1tr6

View File

@ -5,7 +5,7 @@
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*
@ -426,9 +426,9 @@ l3dss1_parse_facility(struct PStack *st, struct l3_process *pc,
#undef FOO1
}
#else not HISAX_DE_AOC
#else /* not HISAX_DE_AOC */
l3_debug(st, "invoke break");
#endif not HISAX_DE_AOC
#endif /* not HISAX_DE_AOC */
break;
case 2: /* return result */
/* if no process available handle separately */
@ -438,12 +438,12 @@ l3dss1_parse_facility(struct PStack *st, struct l3_process *pc,
return;
}
if ((pc->prot.dss1.invoke_id) && (pc->prot.dss1.invoke_id == id))
{ /* Diversion successfull */
{ /* Diversion successful */
free_invoke_id(st,pc->prot.dss1.invoke_id);
pc->prot.dss1.remote_result = 0; /* success */
pc->prot.dss1.invoke_id = 0;
pc->redir_result = pc->prot.dss1.remote_result;
st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successfull */
st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successful */
else
l3_debug(st,"return error unknown identifier");
break;
@ -2112,7 +2112,7 @@ static void l3dss1_redir_req(struct l3_process *pc, u_char pr, void *arg)
MsgHead(p, pc->callref, MT_FACILITY);
for (subp = pc->chan->setup.phone; (*subp) && (*subp != '.'); subp++) len_phone++; /* len of phone number */
if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subadress element */
if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subaddress element */
*p++ = 0x1c; /* Facility info element */
*p++ = len_phone + len_sub + 2 + 2 + 8 + 3 + 3; /* length of element */
@ -2138,7 +2138,7 @@ static void l3dss1_redir_req(struct l3_process *pc, u_char pr, void *arg)
*p++ = pc->chan->setup.phone[l];
if (len_sub)
{ *p++ = 0x04; /* called party subadress */
{ *p++ = 0x04; /* called party subaddress */
*p++ = len_sub - 2;
while (*subp) *p++ = *subp++;
}

View File

@ -2,7 +2,7 @@
*
* DSS1 (Euro) D-channel protocol defines
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -16,7 +16,7 @@
// Will Scales - beta tester extraordinaire
// Brett Whittacre - beta tester and remote devel system in Vegas
//
// This file is (c) under GNU PUBLIC LICENSE
// This file is (c) under GNU General Public License
//
//-----------------------------------------------------------------------------
#define __NO_VERSION__
@ -372,12 +372,12 @@ l3ni1_parse_facility(struct PStack *st, struct l3_process *pc,
return;
}
if ((pc->prot.ni1.invoke_id) && (pc->prot.ni1.invoke_id == id))
{ /* Diversion successfull */
{ /* Diversion successful */
free_invoke_id(st,pc->prot.ni1.invoke_id);
pc->prot.ni1.remote_result = 0; /* success */
pc->prot.ni1.invoke_id = 0;
pc->redir_result = pc->prot.ni1.remote_result;
st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successfull */
st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successful */
else
l3_debug(st,"return error unknown identifier");
break;
@ -1973,7 +1973,7 @@ static void l3ni1_redir_req(struct l3_process *pc, u_char pr, void *arg)
MsgHead(p, pc->callref, MT_FACILITY);
for (subp = pc->chan->setup.phone; (*subp) && (*subp != '.'); subp++) len_phone++; /* len of phone number */
if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subadress element */
if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subaddress element */
*p++ = 0x1c; /* Facility info element */
*p++ = len_phone + len_sub + 2 + 2 + 8 + 3 + 3; /* length of element */
@ -1999,7 +1999,7 @@ static void l3ni1_redir_req(struct l3_process *pc, u_char pr, void *arg)
*p++ = pc->chan->setup.phone[l];
if (len_sub)
{ *p++ = 0x04; /* called party subadress */
{ *p++ = 0x04; /* called party subaddress */
*p++ = len_sub - 2;
while (*subp) *p++ = *subp++;
}

View File

@ -12,7 +12,7 @@
// code provided by Ragnar Paulson.
//
//
// This file is (c) under GNU PUBLIC LICENSE
// This file is (c) under GNU General Public License
//
//-----------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
*
* Layermanagement module
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -6,7 +6,7 @@
*
* Author Stephan von Krawczynski <skraw@ithnet.com>
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -6,7 +6,7 @@
*
* Thanks to Traverse Technologie Australia for documents and informations
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -6,7 +6,7 @@
// Author Kerstern Keil repackaged by
// Matt Henderson - Traverse Technologies P/L www.traverse.com.au
//
// This file is (c) under GNU PUBLIC LICENSE
// This file is (c) under GNU General Public License
//
//-----------------------------------------------------------------------------

View File

@ -7,7 +7,7 @@
*
* Thanks to Dr. Neuhaus and SAGEM for informations
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -1,6 +1,6 @@
// $Id$
//
// This file is (c) under GNU PUBLIC LICENSE
// This file is (c) under GNU General Public License
//
#define __NO_VERSION__

View File

@ -1,6 +1,6 @@
/* $Id$
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Jan den Ouden
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
* Changelog
*
@ -1253,7 +1253,7 @@ dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir)
finish = 1;
}
} else if (sapi == TEI_SAPI) {
dp += sprintf(dp, "tei managment\n");
dp += sprintf(dp, "tei management\n");
finish = 1;
} else {
dp += sprintf(dp, "unknown sapi %d broadcast\n", sapi);

View File

@ -5,7 +5,7 @@
* Author Karsten Keil (keil@isdn4linux.de)
* Brent Baccala <baccala@FreeSoft.org>
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
* Some passive ISDN cards, such as the Traverse NETJet and the AMD 7930,
* don't perform HDLC encapsulation over the B channel. Drivers for

View File

@ -4,7 +4,7 @@
*
* Author Brent Baccala <baccala@FreeSoft.org>
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author S0BOX specific stuff: Enrik Berkhan (enrik@starfleet.inka.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__

View File

@ -6,7 +6,7 @@
*
* Thanks to HST High Soft Tech GmbH
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -16,7 +16,7 @@
* Sedlbauer AG for informations
* Edgar Toernig
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -0,0 +1,679 @@
/*======================================================================
A Sedlbauer PCMCIA client driver
This driver is for the Sedlbauer Speed Star and Speed Star II,
which are ISDN PCMCIA Cards.
sedlbauer_cs.c 1.1a 2001/01/28 15:04:04
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The initial developer of the original code is David A. Hinds
<dahinds@users.sourceforge.net>. Portions created by David A. Hinds
are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
Modifications from dummy_cs.c are Copyright (C) 1999-2001 Marcus Niemann
<maniemann@users.sourceforge.net>. All Rights Reserved.
Alternatively, the contents of this file may be used under the
terms of the GNU Public License version 2 (the "GPL"), in which
case the provisions of the GPL are applicable instead of the
above. If you wish to allow the use of your version of this file
only under the terms of the GPL and not to allow others to use
your version of this file under the MPL, indicate your decision
by deleting the provisions above and replace them with the notice
and other provisions required by the GPL. If you do not delete
the provisions above, a recipient may use your version of this
file under either the MPL or the GPL.
======================================================================*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/ptrace.h>
#include <linux/malloc.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/ioport.h>
#include <asm/io.h>
#include <asm/system.h>
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/ds.h>
#include <pcmcia/bus_ops.h>
/*
All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
you do not define PCMCIA_DEBUG at all, all the debug code will be
left out. If you compile with PCMCIA_DEBUG=0, the debug code will
be present but disabled -- but it can then be enabled for specific
modules at load time with a 'pc_debug=#' option to insmod.
*/
#ifdef PCMCIA_DEBUG
static int pc_debug = PCMCIA_DEBUG;
MODULE_PARM(pc_debug, "i");
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
static char *version =
"sedlbauer_cs.c 1.1a 2001/01/28 15:04:04 (M.Niemann)";
#else
#define DEBUG(n, args...)
#endif
/*====================================================================*/
/* Parameters that can be set with 'insmod' */
/* The old way: bit map of interrupts to choose from */
/* This means pick from 15, 14, 12, 11, 10, 9, 7, 5, 4, and 3 */
static u_int irq_mask = 0xdeb8;
/* Newer, simpler way of listing specific interrupts */
static int irq_list[4] = { -1 };
MODULE_PARM(irq_mask, "i");
MODULE_PARM(irq_list, "1-4i");
static int protocol = 2; /* EURO-ISDN Default */
MODULE_PARM(protocol, "i");
extern int sedl_init_pcmcia(int, int, int*, int);
/*====================================================================*/
/*
The event() function is this driver's Card Services event handler.
It will be called by Card Services when an appropriate card status
event is received. The config() and release() entry points are
used to configure or release a socket, in response to card
insertion and ejection events. They are invoked from the sedlbauer
event handler.
*/
static void sedlbauer_config(dev_link_t *link);
static void sedlbauer_release(u_long arg);
static int sedlbauer_event(event_t event, int priority,
event_callback_args_t *args);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static dev_link_t *sedlbauer_attach(void);
static void sedlbauer_detach(dev_link_t *);
/*
You'll also need to prototype all the functions that will actually
be used to talk to your device. See 'memory_cs' for a good example
of a fully self-sufficient driver; the other drivers rely more or
less on other parts of the kernel.
*/
/*
The dev_info variable is the "key" that is used to match up this
device driver with appropriate cards, through the card configuration
database.
*/
static dev_info_t dev_info = "sedlbauer_cs";
/*
A linked list of "instances" of the sedlbauer device. Each actual
PCMCIA card corresponds to one device instance, and is described
by one dev_link_t structure (defined in ds.h).
You may not want to use a linked list for this -- for example, the
memory card driver uses an array of dev_link_t pointers, where minor
device numbers are used to derive the corresponding array index.
*/
static dev_link_t *dev_list = NULL;
/*
A dev_link_t structure has fields for most things that are needed
to keep track of a socket, but there will usually be some device
specific information that also needs to be kept track of. The
'priv' pointer in a dev_link_t structure can be used to point to
a device-specific private data structure, like this.
To simplify the data structure handling, we actually include the
dev_link_t structure in the device's private data structure.
A driver needs to provide a dev_node_t structure for each device
on a card. In some cases, there is only one device per card (for
example, ethernet cards, modems). In other cases, there may be
many actual or logical devices (SCSI adapters, memory cards with
multiple partitions). The dev_node_t structures need to be kept
in a linked list starting at the 'dev' field of a dev_link_t
structure. We allocate them in the card's private data structure,
because they generally shouldn't be allocated dynamically.
In this case, we also provide a flag to indicate if a device is
"stopped" due to a power management event, or card ejection. The
device IO routines can use a flag like this to throttle IO to a
card that is not ready to accept it.
The bus_operations pointer is used on platforms for which we need
to use special socket-specific versions of normal IO primitives
(inb, outb, readb, writeb, etc) for card IO.
*/
typedef struct local_info_t {
dev_link_t link;
dev_node_t node;
int stop;
struct bus_operations *bus;
} local_info_t;
/*====================================================================*/
static void cs_error(client_handle_t handle, int func, int ret)
{
error_info_t err = { func, ret };
CardServices(ReportError, handle, &err);
}
/*======================================================================
sedlbauer_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static dev_link_t *sedlbauer_attach(void)
{
local_info_t *local;
dev_link_t *link;
client_reg_t client_reg;
int ret, i;
DEBUG(0, "sedlbauer_attach()\n");
/* Allocate space for private device-specific data */
local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
if (!local) return NULL;
memset(local, 0, sizeof(local_info_t));
link = &local->link; link->priv = local;
/* Initialize the dev_link_t structure */
link->release.function = &sedlbauer_release;
link->release.data = (u_long)link;
/* Interrupt setup */
link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
link->irq.IRQInfo1 = IRQ_INFO2_VALID|IRQ_LEVEL_ID;
if (irq_list[0] == -1)
link->irq.IRQInfo2 = irq_mask;
else
for (i = 0; i < 4; i++)
link->irq.IRQInfo2 |= 1 << irq_list[i];
link->irq.Handler = NULL;
/*
General socket configuration defaults can go here. In this
client, we assume very little, and rely on the CIS for almost
everything. In most clients, many details (i.e., number, sizes,
and attributes of IO windows) are fixed by the nature of the
device, and can be hard-wired here.
*/
/* from old sedl_cs
*/
/* The io structure describes IO port mapping */
link->io.NumPorts1 = 8;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
link->io.IOAddrLines = 3;
link->conf.Attributes = 0;
link->conf.Vcc = 50;
link->conf.IntType = INT_MEMORY_AND_IO;
/* Register with Card Services */
link->next = dev_list;
dev_list = link;
client_reg.dev_info = &dev_info;
client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
client_reg.EventMask =
CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
client_reg.event_handler = &sedlbauer_event;
client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
ret = CardServices(RegisterClient, &link->handle, &client_reg);
if (ret != CS_SUCCESS) {
cs_error(link->handle, RegisterClient, ret);
sedlbauer_detach(link);
return NULL;
}
return link;
} /* sedlbauer_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void sedlbauer_detach(dev_link_t *link)
{
dev_link_t **linkp;
DEBUG(0, "sedlbauer_detach(0x%p)\n", link);
/* Locate device structure */
for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
if (*linkp == link) break;
if (*linkp == NULL)
return;
/*
If the device is currently configured and active, we won't
actually delete it yet. Instead, it is marked so that when
the release() function is called, that will trigger a proper
detach().
*/
if (link->state & DEV_CONFIG) {
#ifdef PCMCIA_DEBUG
printk(KERN_DEBUG "sedlbauer_cs: detach postponed, '%s' "
"still locked\n", link->dev->dev_name);
#endif
link->state |= DEV_STALE_LINK;
return;
}
/* Break the link with Card Services */
if (link->handle)
CardServices(DeregisterClient, link->handle);
/* Unlink device structure, and free it */
*linkp = link->next;
/* This points to the parent local_info_t struct */
kfree(link->priv);
} /* sedlbauer_detach */
/*======================================================================
sedlbauer_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
#define CS_CHECK(fn, args...) \
while ((last_ret=CardServices(last_fn=(fn),args))!=0) goto cs_failed
#define CFG_CHECK(fn, args...) \
if (CardServices(fn, args) != 0) goto next_entry
static void sedlbauer_config(dev_link_t *link)
{
client_handle_t handle = link->handle;
local_info_t *dev = link->priv;
tuple_t tuple;
cisparse_t parse;
int last_fn, last_ret;
u_char buf[64];
config_info_t conf;
win_req_t req;
memreq_t map;
DEBUG(0, "sedlbauer_config(0x%p)\n", link);
/*
This reads the card's CONFIG tuple to find its configuration
registers.
*/
tuple.DesiredTuple = CISTPL_CONFIG;
tuple.Attributes = 0;
tuple.TupleData = buf;
tuple.TupleDataMax = sizeof(buf);
tuple.TupleOffset = 0;
CS_CHECK(GetFirstTuple, handle, &tuple);
CS_CHECK(GetTupleData, handle, &tuple);
CS_CHECK(ParseTuple, handle, &tuple, &parse);
link->conf.ConfigBase = parse.config.base;
link->conf.Present = parse.config.rmask[0];
/* Configure card */
link->state |= DEV_CONFIG;
/* Look up the current Vcc */
CS_CHECK(GetConfigurationInfo, handle, &conf);
link->conf.Vcc = conf.Vcc;
/*
In this loop, we scan the CIS for configuration table entries,
each of which describes a valid card configuration, including
voltage, IO window, memory window, and interrupt settings.
We make no assumptions about the card to be configured: we use
just the information available in the CIS. In an ideal world,
this would work for any PCMCIA card, but it requires a complete
and accurate CIS. In practice, a driver usually "knows" most of
these things without consulting the CIS, and most client drivers
will only use the CIS to fill in implementation-defined details.
*/
tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
CS_CHECK(GetFirstTuple, handle, &tuple);
while (1) {
cistpl_cftable_entry_t dflt = { 0 };
cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
CFG_CHECK(GetTupleData, handle, &tuple);
CFG_CHECK(ParseTuple, handle, &tuple, &parse);
if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg;
if (cfg->index == 0) goto next_entry;
link->conf.ConfigIndex = cfg->index;
/* Does this card need audio output? */
if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
link->conf.Attributes |= CONF_ENABLE_SPKR;
link->conf.Status = CCSR_AUDIO_ENA;
}
/* Use power settings for Vcc and Vpp if present */
/* Note that the CIS values need to be rescaled */
if (cfg->vcc.present & (1<<CISTPL_POWER_VNOM)) {
if (conf.Vcc != cfg->vcc.param[CISTPL_POWER_VNOM]/10000)
goto next_entry;
} else if (dflt.vcc.present & (1<<CISTPL_POWER_VNOM)) {
if (conf.Vcc != dflt.vcc.param[CISTPL_POWER_VNOM]/10000)
goto next_entry;
}
if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM))
link->conf.Vpp1 = link->conf.Vpp2 =
cfg->vpp1.param[CISTPL_POWER_VNOM]/10000;
else if (dflt.vpp1.present & (1<<CISTPL_POWER_VNOM))
link->conf.Vpp1 = link->conf.Vpp2 =
dflt.vpp1.param[CISTPL_POWER_VNOM]/10000;
/* Do we need to allocate an interrupt? */
if (cfg->irq.IRQInfo1 || dflt.irq.IRQInfo1)
link->conf.Attributes |= CONF_ENABLE_IRQ;
/* IO window settings */
link->io.NumPorts1 = link->io.NumPorts2 = 0;
if ((cfg->io.nwin > 0) || (dflt.io.nwin > 0)) {
cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt.io;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
if (!(io->flags & CISTPL_IO_8BIT))
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
if (!(io->flags & CISTPL_IO_16BIT))
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
/* new in dummy.cs 2001/01/28 MN
link->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK;
*/
link->io.BasePort1 = io->win[0].base;
link->io.NumPorts1 = io->win[0].len;
if (io->nwin > 1) {
link->io.Attributes2 = link->io.Attributes1;
link->io.BasePort2 = io->win[1].base;
link->io.NumPorts2 = io->win[1].len;
}
/* This reserves IO space but doesn't actually enable it */
CFG_CHECK(RequestIO, link->handle, &link->io);
}
/*
Now set up a common memory window, if needed. There is room
in the dev_link_t structure for one memory window handle,
but if the base addresses need to be saved, or if multiple
windows are needed, the info should go in the private data
structure for this device.
Note that the memory window base is a physical address, and
needs to be mapped to virtual space with ioremap() before it
is used.
*/
if ((cfg->mem.nwin > 0) || (dflt.mem.nwin > 0)) {
cistpl_mem_t *mem =
(cfg->mem.nwin) ? &cfg->mem : &dflt.mem;
req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM;
req.Attributes |= WIN_ENABLE;
req.Base = mem->win[0].host_addr;
req.Size = mem->win[0].len;
/* new in dummy.cs 2001/01/28 MN
if (req.Size < 0x1000)
req.Size = 0x1000;
*/
req.AccessSpeed = 0;
link->win = (window_handle_t)link->handle;
CFG_CHECK(RequestWindow, &link->win, &req);
map.Page = 0; map.CardOffset = mem->win[0].card_addr;
CFG_CHECK(MapMemPage, link->win, &map);
}
/* If we got this far, we're cool! */
break;
next_entry:
/* new in dummy.cs 2001/01/28 MN
if (link->io.NumPorts1)
CardServices(ReleaseIO, link->handle, &link->io);
*/
CS_CHECK(GetNextTuple, handle, &tuple);
}
/*
Allocate an interrupt line. Note that this does not assign a
handler to the interrupt, unless the 'Handler' member of the
irq structure is initialized.
*/
if (link->conf.Attributes & CONF_ENABLE_IRQ)
CS_CHECK(RequestIRQ, link->handle, &link->irq);
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
CS_CHECK(RequestConfiguration, link->handle, &link->conf);
/*
At this point, the dev_node_t structure(s) need to be
initialized and arranged in a linked list at link->dev.
*/
sprintf(dev->node.dev_name, "sedlbauer");
dev->node.major = dev->node.minor = 0;
link->dev = &dev->node;
/* Finally, report what we've done */
printk(KERN_INFO "%s: index 0x%02x: Vcc %d.%d",
dev->node.dev_name, link->conf.ConfigIndex,
link->conf.Vcc/10, link->conf.Vcc%10);
if (link->conf.Vpp1)
printk(", Vpp %d.%d", link->conf.Vpp1/10, link->conf.Vpp1%10);
if (link->conf.Attributes & CONF_ENABLE_IRQ)
printk(", irq %d", link->irq.AssignedIRQ);
if (link->io.NumPorts1)
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
link->io.BasePort1+link->io.NumPorts1-1);
if (link->io.NumPorts2)
printk(" & 0x%04x-0x%04x", link->io.BasePort2,
link->io.BasePort2+link->io.NumPorts2-1);
if (link->win)
printk(", mem 0x%06lx-0x%06lx", req.Base,
req.Base+req.Size-1);
printk("\n");
link->state &= ~DEV_CONFIG_PENDING;
sedl_init_pcmcia(link->io.BasePort1, link->irq.AssignedIRQ,
&(((local_info_t*)link->priv)->stop),
protocol);
return;
cs_failed:
cs_error(link->handle, last_fn, last_ret);
sedlbauer_release((u_long)link);
} /* sedlbauer_config */
/*======================================================================
After a card is removed, sedlbauer_release() will unregister the
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void sedlbauer_release(u_long arg)
{
dev_link_t *link = (dev_link_t *)arg;
DEBUG(0, "sedlbauer_release(0x%p)\n", link);
/*
If the device is currently in use, we won't release until it
is actually closed, because until then, we can't be sure that
no one will try to access the device or its data structures.
*/
if (link->open) {
DEBUG(1, "sedlbauer_cs: release postponed, '%s' still open\n",
link->dev->dev_name);
link->state |= DEV_STALE_CONFIG;
return;
}
/* Unlink the device chain */
link->dev = NULL;
/*
In a normal driver, additional code may be needed to release
other kernel data structures associated with this device.
*/
/* Don't bother checking to see if these succeed or not */
if (link->win)
CardServices(ReleaseWindow, link->win);
CardServices(ReleaseConfiguration, link->handle);
if (link->io.NumPorts1)
CardServices(ReleaseIO, link->handle, &link->io);
if (link->irq.AssignedIRQ)
CardServices(ReleaseIRQ, link->handle, &link->irq);
link->state &= ~DEV_CONFIG;
if (link->state & DEV_STALE_LINK)
sedlbauer_detach(link);
} /* sedlbauer_release */
/*======================================================================
The card status event handler. Mostly, this schedules other
stuff to run after an event is received.
When a CARD_REMOVAL event is received, we immediately set a
private flag to block future accesses to this device. All the
functions that actually access the device should check this flag
to make sure the card is still present.
======================================================================*/
static int sedlbauer_event(event_t event, int priority,
event_callback_args_t *args)
{
dev_link_t *link = args->client_data;
local_info_t *dev = link->priv;
DEBUG(1, "sedlbauer_event(0x%06x)\n", event);
switch (event) {
case CS_EVENT_CARD_REMOVAL:
link->state &= ~DEV_PRESENT;
if (link->state & DEV_CONFIG) {
((local_info_t *)link->priv)->stop = 1;
mod_timer(&link->release, jiffies + HZ/20);
}
break;
case CS_EVENT_CARD_INSERTION:
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
dev->bus = args->bus;
sedlbauer_config(link);
break;
case CS_EVENT_PM_SUSPEND:
link->state |= DEV_SUSPEND;
/* Fall through... */
case CS_EVENT_RESET_PHYSICAL:
/* Mark the device as stopped, to block IO until later */
dev->stop = 1;
if (link->state & DEV_CONFIG)
CardServices(ReleaseConfiguration, link->handle);
break;
case CS_EVENT_PM_RESUME:
link->state &= ~DEV_SUSPEND;
/* Fall through... */
case CS_EVENT_CARD_RESET:
if (link->state & DEV_CONFIG)
CardServices(RequestConfiguration, link->handle, &link->conf);
dev->stop = 0;
/*
In a normal driver, additional code may go here to restore
the device state and restart IO.
*/
break;
}
return 0;
} /* sedlbauer_event */
/*====================================================================*/
static int __init init_sedlbauer_cs(void)
{
servinfo_t serv;
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "sedlbauer_cs: Card Services release "
"does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &sedlbauer_attach, &sedlbauer_detach);
return 0;
}
static void __exit exit_sedlbauer_cs(void)
{
DEBUG(0, "sedlbauer_cs: unloading\n");
unregister_pccard_driver(&dev_info);
while (dev_list != NULL) {
del_timer(&dev_list->release);
if (dev_list->state & DEV_CONFIG)
sedlbauer_release((u_long)dev_list);
sedlbauer_detach(dev_list);
}
}
module_init(init_sedlbauer_cs);
module_exit(exit_sedlbauer_cs);

View File

@ -6,7 +6,7 @@
*
* Thanks to Christian "naddy" Weisgerber (3Com, US Robotics) for documentation
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__

View File

@ -3,7 +3,7 @@
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
* For changes and modifications please read
* ../../../Documentation/isdn/HiSax.cert
*

View File

@ -4,7 +4,7 @@
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -9,7 +9,7 @@
* Fritz Elfert
* Beat Doebeli
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__

View File

@ -10,7 +10,7 @@
* Fritz Elfert
* Beat Doebeli
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__

View File

@ -5,7 +5,7 @@
* Author Ton van Rosmalen
* Karsten Keil (keil@isdn4linux.de)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/
#define __NO_VERSION__

View File

@ -5,7 +5,7 @@
* Author Petr Novak <petr.novak@i.cz>
* (based on HiSax driver by Karsten Keil)
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -4,7 +4,7 @@
*
* Author Petr Novak <petr.novak@i.cz>
*
* This file is (c) under GNU PUBLIC LICENSE
* This file is (c) under GNU General Public License
*
*/

View File

@ -270,7 +270,7 @@ ergo_writebootimg(struct HYSDN_CARD *card, uchar * buf, ulong offs)
return (-ERR_BOOTIMG_FAIL);
}
} /* start_boot_img */
return (0); /* successfull */
return (0); /* successful */
} /* ergo_writebootimg */
/********************************************************************************/
@ -337,7 +337,7 @@ ergo_writebootseq(struct HYSDN_CARD *card, uchar * buf, int len)
/***********************************************************************************/
/* 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 +361,7 @@ ergo_waitpofready(struct HYSDN_CARD *card)
(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;

Some files were not shown because too many files have changed in this diff Show More