Commit c721bcce authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] hysdn: remove custom types

hysdn defines its own types: ulong, uint, uchar and word.

Problem is, the module_param macros rely upon some of those identifiers having
special meanings too.  The net effect is that module_param() and friends
cannot be used in ISDN because of this namespace clash.

So remove the hysdn-private defines and open-code them all.

Cc: Karsten Keil <kkeil@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5b7b18cc
...@@ -38,8 +38,8 @@ ergo_interrupt(int intno, void *dev_id, struct pt_regs *regs) ...@@ -38,8 +38,8 @@ ergo_interrupt(int intno, void *dev_id, struct pt_regs *regs)
{ {
hysdn_card *card = dev_id; /* parameter from irq */ hysdn_card *card = dev_id; /* parameter from irq */
tErgDpram *dpr; tErgDpram *dpr;
ulong flags; unsigned long flags;
uchar volatile b; unsigned char volatile b;
if (!card) if (!card)
return IRQ_NONE; /* error -> spurious interrupt */ return IRQ_NONE; /* error -> spurious interrupt */
...@@ -77,7 +77,7 @@ ergo_irq_bh(hysdn_card * card) ...@@ -77,7 +77,7 @@ ergo_irq_bh(hysdn_card * card)
{ {
tErgDpram *dpr; tErgDpram *dpr;
int again; int again;
ulong flags; unsigned long flags;
if (card->state != CARD_STATE_RUN) if (card->state != CARD_STATE_RUN)
return; /* invalid call */ return; /* invalid call */
...@@ -131,8 +131,8 @@ ergo_irq_bh(hysdn_card * card) ...@@ -131,8 +131,8 @@ ergo_irq_bh(hysdn_card * card)
static void static void
ergo_stopcard(hysdn_card * card) ergo_stopcard(hysdn_card * card)
{ {
ulong flags; unsigned long flags;
uchar val; unsigned char val;
hysdn_net_release(card); /* first release the net device if existing */ hysdn_net_release(card); /* first release the net device if existing */
#ifdef CONFIG_HYSDN_CAPI #ifdef CONFIG_HYSDN_CAPI
...@@ -157,7 +157,7 @@ ergo_stopcard(hysdn_card * card) ...@@ -157,7 +157,7 @@ ergo_stopcard(hysdn_card * card)
static void static void
ergo_set_errlog_state(hysdn_card * card, int on) ergo_set_errlog_state(hysdn_card * card, int on)
{ {
ulong flags; unsigned long flags;
if (card->state != CARD_STATE_RUN) { if (card->state != CARD_STATE_RUN) {
card->err_log_state = ERRLOG_STATE_OFF; /* must be off */ card->err_log_state = ERRLOG_STATE_OFF; /* must be off */
...@@ -217,9 +217,10 @@ ergo_testram(hysdn_card * card) ...@@ -217,9 +217,10 @@ ergo_testram(hysdn_card * card)
/* Negative return values are interpreted as errors. */ /* Negative return values are interpreted as errors. */
/*****************************************************************************/ /*****************************************************************************/
static int static int
ergo_writebootimg(struct HYSDN_CARD *card, uchar * buf, ulong offs) ergo_writebootimg(struct HYSDN_CARD *card, unsigned char *buf,
unsigned long offs)
{ {
uchar *dst; unsigned char *dst;
tErgDpram *dpram; tErgDpram *dpram;
int cnt = (BOOT_IMG_SIZE >> 2); /* number of words to move and swap (byte order!) */ int cnt = (BOOT_IMG_SIZE >> 2); /* number of words to move and swap (byte order!) */
...@@ -264,14 +265,14 @@ ergo_writebootimg(struct HYSDN_CARD *card, uchar * buf, ulong offs) ...@@ -264,14 +265,14 @@ ergo_writebootimg(struct HYSDN_CARD *card, uchar * buf, ulong offs)
/* case of errors a negative error value is returned. */ /* case of errors a negative error value is returned. */
/********************************************************************************/ /********************************************************************************/
static int static int
ergo_writebootseq(struct HYSDN_CARD *card, uchar * buf, int len) ergo_writebootseq(struct HYSDN_CARD *card, unsigned char *buf, int len)
{ {
tDpramBootSpooler *sp = (tDpramBootSpooler *) card->dpram; tDpramBootSpooler *sp = (tDpramBootSpooler *) card->dpram;
uchar *dst; unsigned char *dst;
uchar buflen; unsigned char buflen;
int nr_write; int nr_write;
uchar tmp_rdptr; unsigned char tmp_rdptr;
uchar wr_mirror; unsigned char wr_mirror;
int i; int i;
if (card->debug_flags & LOG_POF_CARD) if (card->debug_flags & LOG_POF_CARD)
...@@ -330,7 +331,7 @@ ergo_waitpofready(struct HYSDN_CARD *card) ...@@ -330,7 +331,7 @@ ergo_waitpofready(struct HYSDN_CARD *card)
{ {
tErgDpram *dpr = card->dpram; /* pointer to DPRAM structure */ tErgDpram *dpr = card->dpram; /* pointer to DPRAM structure */
int timecnt = 10000 / 50; /* timeout is 10 secs max. */ int timecnt = 10000 / 50; /* timeout is 10 secs max. */
ulong flags; unsigned long flags;
int msg_size; int msg_size;
int i; int i;
...@@ -345,7 +346,7 @@ ergo_waitpofready(struct HYSDN_CARD *card) ...@@ -345,7 +346,7 @@ ergo_waitpofready(struct HYSDN_CARD *card)
if ((dpr->ToPcChannel != CHAN_SYSTEM) || if ((dpr->ToPcChannel != CHAN_SYSTEM) ||
(dpr->ToPcSize < MIN_RDY_MSG_SIZE) || (dpr->ToPcSize < MIN_RDY_MSG_SIZE) ||
(dpr->ToPcSize > MAX_RDY_MSG_SIZE) || (dpr->ToPcSize > MAX_RDY_MSG_SIZE) ||
((*(ulong *) dpr->ToPcBuf) != RDY_MAGIC)) ((*(unsigned long *) dpr->ToPcBuf) != RDY_MAGIC))
break; /* an error occurred */ break; /* an error occurred */
/* Check for additional data delivered during SysReady */ /* Check for additional data delivered during SysReady */
......
...@@ -23,36 +23,36 @@ ...@@ -23,36 +23,36 @@
/* following DPRAM layout copied from OS2-driver boarderg.h */ /* following DPRAM layout copied from OS2-driver boarderg.h */
typedef struct ErgDpram_tag { typedef struct ErgDpram_tag {
/*0000 */ uchar ToHyBuf[ERG_TO_HY_BUF_SIZE]; /*0000 */ unsigned char ToHyBuf[ERG_TO_HY_BUF_SIZE];
/*0E00 */ uchar ToPcBuf[ERG_TO_PC_BUF_SIZE]; /*0E00 */ unsigned char ToPcBuf[ERG_TO_PC_BUF_SIZE];
/*1C00 */ uchar bSoftUart[SIZE_RSV_SOFT_UART]; /*1C00 */ unsigned char bSoftUart[SIZE_RSV_SOFT_UART];
/* size 0x1B0 */ /* size 0x1B0 */
/*1DB0 *//* tErrLogEntry */ uchar volatile ErrLogMsg[64]; /*1DB0 *//* tErrLogEntry */ unsigned char volatile ErrLogMsg[64];
/* size 64 bytes */ /* size 64 bytes */
/*1DB0 ulong ulErrType; */ /*1DB0 unsigned long ulErrType; */
/*1DB4 ulong ulErrSubtype; */ /*1DB4 unsigned long ulErrSubtype; */
/*1DB8 ulong ucTextSize; */ /*1DB8 unsigned long ucTextSize; */
/*1DB9 ulong ucText[ERRLOG_TEXT_SIZE]; *//* ASCIIZ of len ucTextSize-1 */ /*1DB9 unsigned long ucText[ERRLOG_TEXT_SIZE]; *//* ASCIIZ of len ucTextSize-1 */
/*1DF0 */ /*1DF0 */
/*1DF0 */ word volatile ToHyChannel; /*1DF0 */ unsigned short volatile ToHyChannel;
/*1DF2 */ word volatile ToHySize; /*1DF2 */ unsigned short volatile ToHySize;
/*1DF4 */ uchar volatile ToHyFlag; /*1DF4 */ unsigned char volatile ToHyFlag;
/* !=0: msg for Hy waiting */ /* !=0: msg for Hy waiting */
/*1DF5 */ uchar volatile ToPcFlag; /*1DF5 */ unsigned char volatile ToPcFlag;
/* !=0: msg for PC waiting */ /* !=0: msg for PC waiting */
/*1DF6 */ word volatile ToPcChannel; /*1DF6 */ unsigned short volatile ToPcChannel;
/*1DF8 */ word volatile ToPcSize; /*1DF8 */ unsigned short volatile ToPcSize;
/*1DFA */ uchar bRes1DBA[0x1E00 - 0x1DFA]; /*1DFA */ unsigned char bRes1DBA[0x1E00 - 0x1DFA];
/* 6 bytes */ /* 6 bytes */
/*1E00 */ uchar bRestOfEntryTbl[0x1F00 - 0x1E00]; /*1E00 */ unsigned char bRestOfEntryTbl[0x1F00 - 0x1E00];
/*1F00 */ ulong TrapTable[62]; /*1F00 */ unsigned long TrapTable[62];
/*1FF8 */ uchar bRes1FF8[0x1FFB - 0x1FF8]; /*1FF8 */ unsigned char bRes1FF8[0x1FFB - 0x1FF8];
/* low part of reset vetor */ /* low part of reset vetor */
/*1FFB */ uchar ToPcIntMetro; /*1FFB */ unsigned char ToPcIntMetro;
/* notes: /* notes:
* - metro has 32-bit boot ram - accessing * - metro has 32-bit boot ram - accessing
* ToPcInt and ToHyInt would be the same; * ToPcInt and ToHyInt would be the same;
...@@ -65,16 +65,16 @@ typedef struct ErgDpram_tag { ...@@ -65,16 +65,16 @@ typedef struct ErgDpram_tag {
* so E1 side should NOT change this byte * so E1 side should NOT change this byte
* when writing! * when writing!
*/ */
/*1FFC */ uchar volatile ToHyNoDpramErrLog; /*1FFC */ unsigned char volatile ToHyNoDpramErrLog;
/* note: ToHyNoDpramErrLog is used to inform /* note: ToHyNoDpramErrLog is used to inform
* boot loader, not to use DPRAM based * boot loader, not to use DPRAM based
* ErrLog; when DOS driver is rewritten * ErrLog; when DOS driver is rewritten
* this becomes obsolete * this becomes obsolete
*/ */
/*1FFD */ uchar bRes1FFD; /*1FFD */ unsigned char bRes1FFD;
/*1FFE */ uchar ToPcInt; /*1FFE */ unsigned char ToPcInt;
/* E1_intclear; on CHAMP2: E1_intset */ /* E1_intclear; on CHAMP2: E1_intset */
/*1FFF */ uchar ToHyInt; /*1FFF */ unsigned char ToHyInt;
/* E1_intset; on CHAMP2: E1_intclear */ /* E1_intset; on CHAMP2: E1_intclear */
} tErgDpram; } tErgDpram;
......
...@@ -523,7 +523,7 @@ New nccis are created if necessary. ...@@ -523,7 +523,7 @@ New nccis are created if necessary.
*******************************************************************/ *******************************************************************/
void void
hycapi_rx_capipkt(hysdn_card * card, uchar * buf, word len) hycapi_rx_capipkt(hysdn_card * card, unsigned char *buf, unsigned short len)
{ {
struct sk_buff *skb; struct sk_buff *skb;
hycapictrl_info *cinfo = card->hyctrlinfo; hycapictrl_info *cinfo = card->hyctrlinfo;
......
...@@ -30,17 +30,17 @@ ...@@ -30,17 +30,17 @@
/* needed during boot and so allocated dynamically. */ /* needed during boot and so allocated dynamically. */
/************************************************************/ /************************************************************/
struct boot_data { struct boot_data {
word Cryptor; /* for use with Decrypt function */ unsigned short Cryptor; /* for use with Decrypt function */
word Nrecs; /* records remaining in file */ unsigned short Nrecs; /* records remaining in file */
uchar pof_state; /* actual state of read handler */ unsigned char pof_state;/* actual state of read handler */
uchar is_crypted; /* card data is crypted */ unsigned char is_crypted;/* card data is crypted */
int BufSize; /* actual number of bytes bufferd */ int BufSize; /* actual number of bytes bufferd */
int last_error; /* last occurred error */ int last_error; /* last occurred error */
word pof_recid; /* actual pof recid */ unsigned short pof_recid;/* actual pof recid */
ulong pof_reclen; /* total length of pof record data */ unsigned long pof_reclen;/* total length of pof record data */
ulong pof_recoffset; /* actual offset inside pof record */ unsigned long pof_recoffset;/* actual offset inside pof record */
union { union {
uchar BootBuf[BOOT_BUF_SIZE]; /* buffer as byte count */ unsigned char BootBuf[BOOT_BUF_SIZE];/* buffer as byte count */
tPofRecHdr PofRecHdr; /* header for actual record/chunk */ tPofRecHdr PofRecHdr; /* header for actual record/chunk */
tPofFileHdr PofFileHdr; /* header from POF file */ tPofFileHdr PofFileHdr; /* header from POF file */
tPofTimeStamp PofTime; /* time information */ tPofTimeStamp PofTime; /* time information */
...@@ -69,11 +69,11 @@ StartDecryption(struct boot_data *boot) ...@@ -69,11 +69,11 @@ StartDecryption(struct boot_data *boot)
static void static void
DecryptBuf(struct boot_data *boot, int cnt) DecryptBuf(struct boot_data *boot, int cnt)
{ {
uchar *bufp = boot->buf.BootBuf; unsigned char *bufp = boot->buf.BootBuf;
while (cnt--) { while (cnt--) {
boot->Cryptor = (boot->Cryptor >> 1) ^ ((boot->Cryptor & 1U) ? CRYPT_FEEDTERM : 0); boot->Cryptor = (boot->Cryptor >> 1) ^ ((boot->Cryptor & 1U) ? CRYPT_FEEDTERM : 0);
*bufp++ ^= (uchar) boot->Cryptor; *bufp++ ^= (unsigned char)boot->Cryptor;
} }
} /* DecryptBuf */ } /* DecryptBuf */
...@@ -86,7 +86,7 @@ pof_handle_data(hysdn_card * card, int datlen) ...@@ -86,7 +86,7 @@ pof_handle_data(hysdn_card * card, int datlen)
{ {
struct boot_data *boot = card->boot; /* pointer to boot specific data */ struct boot_data *boot = card->boot; /* pointer to boot specific data */
long l; long l;
uchar *imgp; unsigned char *imgp;
int img_len; int img_len;
/* handle the different record types */ /* handle the different record types */
...@@ -197,7 +197,7 @@ pof_write_buffer(hysdn_card * card, int datlen) ...@@ -197,7 +197,7 @@ pof_write_buffer(hysdn_card * card, int datlen)
break; break;
} }
/* Setup the new state and vars */ /* Setup the new state and vars */
boot->Nrecs = (word) (boot->buf.PofFileHdr.N_PofRecs); /* limited to 65535 */ boot->Nrecs = (unsigned short)(boot->buf.PofFileHdr.N_PofRecs); /* limited to 65535 */
boot->pof_state = POF_READ_TAG_HEAD; /* now start with single tags */ boot->pof_state = POF_READ_TAG_HEAD; /* now start with single tags */
boot->last_error = sizeof(tPofRecHdr); /* new length */ boot->last_error = sizeof(tPofRecHdr); /* new length */
break; break;
...@@ -268,7 +268,7 @@ pof_write_buffer(hysdn_card * card, int datlen) ...@@ -268,7 +268,7 @@ pof_write_buffer(hysdn_card * card, int datlen)
/* occurred. Additionally the pointer to the buffer data area is set on success */ /* occurred. Additionally the pointer to the buffer data area is set on success */
/*******************************************************************************/ /*******************************************************************************/
int int
pof_write_open(hysdn_card * card, uchar ** bufp) pof_write_open(hysdn_card * card, unsigned char **bufp)
{ {
struct boot_data *boot; /* pointer to boot specific data */ struct boot_data *boot; /* pointer to boot specific data */
...@@ -335,7 +335,7 @@ pof_write_close(hysdn_card * card) ...@@ -335,7 +335,7 @@ pof_write_close(hysdn_card * card)
/* when POF has been booted. A return value of 0 is used if no error occurred. */ /* when POF has been booted. A return value of 0 is used if no error occurred. */
/*********************************************************************************/ /*********************************************************************************/
int int
EvalSysrTokData(hysdn_card * card, uchar * cp, int len) EvalSysrTokData(hysdn_card *card, unsigned char *cp, int len)
{ {
u_char *p; u_char *p;
u_char crc; u_char crc;
......
...@@ -20,14 +20,6 @@ ...@@ -20,14 +20,6 @@
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
/****************************/
/* storage type definitions */
/****************************/
#define uchar unsigned char
#define uint unsigned int
#define ulong unsigned long
#define word unsigned short
#include "ince1pc.h" #include "ince1pc.h"
#ifdef CONFIG_HYSDN_CAPI #ifdef CONFIG_HYSDN_CAPI
...@@ -147,18 +139,18 @@ typedef struct HYSDN_CARD { ...@@ -147,18 +139,18 @@ typedef struct HYSDN_CARD {
/* general variables for the cards */ /* general variables for the cards */
int myid; /* own driver card id */ int myid; /* own driver card id */
uchar bus; /* pci bus the card is connected to */ unsigned char bus; /* pci bus the card is connected to */
uchar devfn; /* slot+function bit encoded */ unsigned char devfn; /* slot+function bit encoded */
word subsysid; /* PCI subsystem id */ unsigned short subsysid;/* PCI subsystem id */
uchar brdtype; /* type of card */ unsigned char brdtype; /* type of card */
uint bchans; /* number of available B-channels */ unsigned int bchans; /* number of available B-channels */
uint faxchans; /* number of available fax-channels */ unsigned int faxchans; /* number of available fax-channels */
uchar mac_addr[6]; /* MAC Address read from card */ unsigned char mac_addr[6];/* MAC Address read from card */
uint irq; /* interrupt number */ unsigned int irq; /* interrupt number */
uint iobase; /* IO-port base address */ unsigned int iobase; /* IO-port base address */
ulong plxbase; /* PLX memory base */ unsigned long plxbase; /* PLX memory base */
ulong membase; /* DPRAM memory base */ unsigned long membase; /* DPRAM memory base */
ulong memend; /* DPRAM memory end */ unsigned long memend; /* DPRAM memory end */
void *dpram; /* mapped dpram */ void *dpram; /* mapped dpram */
int state; /* actual state of card -> CARD_STATE_** */ int state; /* actual state of card -> CARD_STATE_** */
struct HYSDN_CARD *next; /* pointer to next card */ struct HYSDN_CARD *next; /* pointer to next card */
...@@ -168,26 +160,26 @@ typedef struct HYSDN_CARD { ...@@ -168,26 +160,26 @@ typedef struct HYSDN_CARD {
void *procconf; /* pointer to procconf filesystem specific data */ void *procconf; /* pointer to procconf filesystem specific data */
/* debugging and logging */ /* debugging and logging */
uchar err_log_state; /* actual error log state of the card */ unsigned char err_log_state;/* actual error log state of the card */
ulong debug_flags; /* tells what should be debugged and where */ unsigned long debug_flags;/* tells what should be debugged and where */
void (*set_errlog_state) (struct HYSDN_CARD *, int); void (*set_errlog_state) (struct HYSDN_CARD *, int);
/* interrupt handler + interrupt synchronisation */ /* interrupt handler + interrupt synchronisation */
struct work_struct irq_queue; /* interrupt task queue */ struct work_struct irq_queue; /* interrupt task queue */
uchar volatile irq_enabled; /* interrupt enabled if != 0 */ unsigned char volatile irq_enabled;/* interrupt enabled if != 0 */
uchar volatile hw_lock; /* hardware is currently locked -> no access */ unsigned char volatile hw_lock;/* hardware is currently locked -> no access */
/* boot process */ /* boot process */
void *boot; /* pointer to boot private data */ void *boot; /* pointer to boot private data */
int (*writebootimg) (struct HYSDN_CARD *, uchar *, ulong); int (*writebootimg) (struct HYSDN_CARD *, unsigned char *, unsigned long);
int (*writebootseq) (struct HYSDN_CARD *, uchar *, int); int (*writebootseq) (struct HYSDN_CARD *, unsigned char *, int);
int (*waitpofready) (struct HYSDN_CARD *); int (*waitpofready) (struct HYSDN_CARD *);
int (*testram) (struct HYSDN_CARD *); int (*testram) (struct HYSDN_CARD *);
/* scheduler for data transfer (only async parts) */ /* scheduler for data transfer (only async parts) */
uchar async_data[256]; /* async data to be sent (normally for config) */ unsigned char async_data[256];/* async data to be sent (normally for config) */
word volatile async_len; /* length of data to sent */ unsigned short volatile async_len;/* length of data to sent */
word volatile async_channel; /* channel number for async transfer */ unsigned short volatile async_channel;/* channel number for async transfer */
int volatile async_busy; /* flag != 0 sending in progress */ int volatile async_busy; /* flag != 0 sending in progress */
int volatile net_tx_busy; /* a network packet tx is in progress */ int volatile net_tx_busy; /* a network packet tx is in progress */
...@@ -251,15 +243,18 @@ extern int ergo_inithardware(hysdn_card * card); /* get hardware -> module init ...@@ -251,15 +243,18 @@ extern int ergo_inithardware(hysdn_card * card); /* get hardware -> module init
/* hysdn_boot.c */ /* hysdn_boot.c */
extern int pof_write_close(hysdn_card *); /* close proc file after writing pof */ extern int pof_write_close(hysdn_card *); /* close proc file after writing pof */
extern int pof_write_open(hysdn_card *, uchar **); /* open proc file for writing pof */ extern int pof_write_open(hysdn_card *, unsigned char **); /* open proc file for writing pof */
extern int pof_write_buffer(hysdn_card *, int); /* write boot data to card */ extern int pof_write_buffer(hysdn_card *, int); /* write boot data to card */
extern int EvalSysrTokData(hysdn_card *, uchar *, int); /* Check Sysready Token Data */ extern int EvalSysrTokData(hysdn_card *, unsigned char *, int); /* Check Sysready Token Data */
/* hysdn_sched.c */ /* hysdn_sched.c */
extern int hysdn_sched_tx(hysdn_card *, uchar *, word volatile *, word volatile *, extern int hysdn_sched_tx(hysdn_card *, unsigned char *,
word); unsigned short volatile *, unsigned short volatile *,
extern int hysdn_sched_rx(hysdn_card *, uchar *, word, word); unsigned short);
extern int hysdn_tx_cfgline(hysdn_card *, uchar *, word); /* send one cfg line */ extern int hysdn_sched_rx(hysdn_card *, unsigned char *, unsigned short,
unsigned short);
extern int hysdn_tx_cfgline(hysdn_card *, unsigned char *,
unsigned short); /* send one cfg line */
/* hysdn_net.c */ /* hysdn_net.c */
extern unsigned int hynet_enable; extern unsigned int hynet_enable;
...@@ -269,14 +264,16 @@ extern int hysdn_net_release(hysdn_card *); /* delete the device */ ...@@ -269,14 +264,16 @@ extern int hysdn_net_release(hysdn_card *); /* delete the device */
extern char *hysdn_net_getname(hysdn_card *); /* get name of net interface */ extern char *hysdn_net_getname(hysdn_card *); /* get name of net interface */
extern void hysdn_tx_netack(hysdn_card *); /* acknowledge a packet tx */ extern void hysdn_tx_netack(hysdn_card *); /* acknowledge a packet tx */
extern struct sk_buff *hysdn_tx_netget(hysdn_card *); /* get next network packet */ extern struct sk_buff *hysdn_tx_netget(hysdn_card *); /* get next network packet */
extern void hysdn_rx_netpkt(hysdn_card *, uchar *, word); /* rxed packet from network */ extern void hysdn_rx_netpkt(hysdn_card *, unsigned char *,
unsigned short); /* rxed packet from network */
#ifdef CONFIG_HYSDN_CAPI #ifdef CONFIG_HYSDN_CAPI
extern unsigned int hycapi_enable; extern unsigned int hycapi_enable;
extern int hycapi_capi_create(hysdn_card *); /* create a new capi device */ extern int hycapi_capi_create(hysdn_card *); /* create a new capi device */
extern int hycapi_capi_release(hysdn_card *); /* delete the device */ extern int hycapi_capi_release(hysdn_card *); /* delete the device */
extern int hycapi_capi_stop(hysdn_card *card); /* suspend */ extern int hycapi_capi_stop(hysdn_card *card); /* suspend */
extern void hycapi_rx_capipkt(hysdn_card * card, uchar * buf, word len); extern void hycapi_rx_capipkt(hysdn_card * card, unsigned char * buf,
unsigned short len);
extern void hycapi_tx_capiack(hysdn_card * card); extern void hycapi_tx_capiack(hysdn_card * card);
extern struct sk_buff *hycapi_tx_capiget(hysdn_card *card); extern struct sk_buff *hycapi_tx_capiget(hysdn_card *card);
extern int hycapi_init(void); extern int hycapi_init(void);
......
...@@ -41,8 +41,8 @@ hysdn_card *card_root = NULL; /* pointer to first card */ ...@@ -41,8 +41,8 @@ hysdn_card *card_root = NULL; /* pointer to first card */
/* the last entry contains all 0 */ /* the last entry contains all 0 */
/**********************************************/ /**********************************************/
static struct { static struct {
word subid; /* PCI sub id */ unsigned short subid; /* PCI sub id */
uchar cardtyp; /* card type assigned */ unsigned char cardtyp; /* card type assigned */
} pci_subid_map[] = { } pci_subid_map[] = {
{ {
......
...@@ -83,12 +83,12 @@ net_open(struct net_device *dev) ...@@ -83,12 +83,12 @@ net_open(struct net_device *dev)
/* Fill in the MAC-level header (if not already set) */ /* Fill in the MAC-level header (if not already set) */
if (!card->mac_addr[0]) { if (!card->mac_addr[0]) {
for (i = 0; i < ETH_ALEN - sizeof(ulong); i++) for (i = 0; i < ETH_ALEN - sizeof(unsigned long); i++)
dev->dev_addr[i] = 0xfc; dev->dev_addr[i] = 0xfc;
if ((in_dev = dev->ip_ptr) != NULL) { if ((in_dev = dev->ip_ptr) != NULL) {
struct in_ifaddr *ifa = in_dev->ifa_list; struct in_ifaddr *ifa = in_dev->ifa_list;
if (ifa != NULL) if (ifa != NULL)
memcpy(dev->dev_addr + (ETH_ALEN - sizeof(ulong)), &ifa->ifa_local, sizeof(ulong)); memcpy(dev->dev_addr + (ETH_ALEN - sizeof(unsigned long)), &ifa->ifa_local, sizeof(unsigned long));
} }
} else } else
memcpy(dev->dev_addr, card->mac_addr, ETH_ALEN); memcpy(dev->dev_addr, card->mac_addr, ETH_ALEN);
...@@ -197,7 +197,7 @@ hysdn_tx_netack(hysdn_card * card) ...@@ -197,7 +197,7 @@ hysdn_tx_netack(hysdn_card * card)
/* we got a packet from the network, go and queue it */ /* we got a packet from the network, go and queue it */
/*****************************************************/ /*****************************************************/
void void
hysdn_rx_netpkt(hysdn_card * card, uchar * buf, word len) hysdn_rx_netpkt(hysdn_card * card, unsigned char *buf, unsigned short len)
{ {
struct net_local *lp = card->netif; struct net_local *lp = card->netif;
struct sk_buff *skb; struct sk_buff *skb;
......
...@@ -47,20 +47,20 @@ ...@@ -47,20 +47,20 @@
/*--------------------------------------POF file record structs------------*/ /*--------------------------------------POF file record structs------------*/
typedef struct PofFileHdr_tag { /* Pof file header */ typedef struct PofFileHdr_tag { /* Pof file header */
/*00 */ ulong Magic __attribute__((packed)); /*00 */ unsigned long Magic __attribute__((packed));
/*04 */ ulong N_PofRecs __attribute__((packed)); /*04 */ unsigned long N_PofRecs __attribute__((packed));
/*08 */ /*08 */
} tPofFileHdr; } tPofFileHdr;
typedef struct PofRecHdr_tag { /* Pof record header */ typedef struct PofRecHdr_tag { /* Pof record header */
/*00 */ word PofRecId __attribute__((packed)); /*00 */ unsigned short PofRecId __attribute__((packed));
/*02 */ ulong PofRecDataLen __attribute__((packed)); /*02 */ unsigned long PofRecDataLen __attribute__((packed));
/*06 */ /*06 */
} tPofRecHdr; } tPofRecHdr;
typedef struct PofTimeStamp_tag { typedef struct PofTimeStamp_tag {
/*00 */ ulong UnixTime __attribute__((packed)); /*00 */ unsigned long UnixTime __attribute__((packed));
/*04 */ uchar DateTimeText[0x28] __attribute__((packed)); /*04 */ unsigned char DateTimeText[0x28] __attribute__((packed));
/* =40 */ /* =40 */
/*2C */ /*2C */
} tPofTimeStamp; } tPofTimeStamp;
......
...@@ -36,9 +36,9 @@ struct conf_writedata { ...@@ -36,9 +36,9 @@ struct conf_writedata {
int buf_size; /* actual number of bytes in the buffer */ int buf_size; /* actual number of bytes in the buffer */
int needed_size; /* needed size when reading pof */ int needed_size; /* needed size when reading pof */
int state; /* actual interface states from above constants */ int state; /* actual interface states from above constants */
uchar conf_line[CONF_LINE_LEN]; /* buffered conf line */ unsigned char conf_line[CONF_LINE_LEN]; /* buffered conf line */
word channel; /* active channel number */ unsigned short channel; /* active channel number */
uchar *pof_buffer; /* buffer when writing pof */ unsigned char *pof_buffer; /* buffer when writing pof */
}; };
/***********************************************************************/ /***********************************************************************/
...@@ -49,7 +49,7 @@ struct conf_writedata { ...@@ -49,7 +49,7 @@ struct conf_writedata {
static int static int
process_line(struct conf_writedata *cnf) process_line(struct conf_writedata *cnf)
{ {
uchar *cp = cnf->conf_line; unsigned char *cp = cnf->conf_line;
int i; int i;
if (cnf->card->debug_flags & LOG_CNF_LINE) if (cnf->card->debug_flags & LOG_CNF_LINE)
...@@ -92,7 +92,7 @@ hysdn_conf_write(struct file *file, const char __user *buf, size_t count, loff_t ...@@ -92,7 +92,7 @@ hysdn_conf_write(struct file *file, const char __user *buf, size_t count, loff_t
{ {
struct conf_writedata *cnf; struct conf_writedata *cnf;
int i; int i;
uchar ch, *cp; unsigned char ch, *cp;
if (!count) if (!count)
return (0); /* nothing to handle */ return (0); /* nothing to handle */
...@@ -390,7 +390,7 @@ int ...@@ -390,7 +390,7 @@ int
hysdn_procconf_init(void) hysdn_procconf_init(void)
{ {
hysdn_card *card; hysdn_card *card;
uchar conf_name[20]; unsigned char conf_name[20];
hysdn_proc_entry = proc_mkdir(PROC_SUBDIR_NAME, proc_net); hysdn_proc_entry = proc_mkdir(PROC_SUBDIR_NAME, proc_net);
if (!hysdn_proc_entry) { if (!hysdn_proc_entry) {
...@@ -423,7 +423,7 @@ void ...@@ -423,7 +423,7 @@ void
hysdn_procconf_release(void) hysdn_procconf_release(void)
{ {
hysdn_card *card; hysdn_card *card;
uchar conf_name[20]; unsigned char conf_name[20];
card = card_root; /* start with first card */ card = card_root; /* start with first card */
while (card) { while (card) {
......
...@@ -28,7 +28,7 @@ static void put_log_buffer(hysdn_card * card, char *cp); ...@@ -28,7 +28,7 @@ static void put_log_buffer(hysdn_card * card, char *cp);
/*************************************************/ /*************************************************/
struct log_data { struct log_data {
struct log_data *next; struct log_data *next;
ulong usage_cnt; /* number of files still to work */ unsigned long usage_cnt;/* number of files still to work */
void *proc_ctrl; /* pointer to own control procdata structure */ void *proc_ctrl; /* pointer to own control procdata structure */
char log_start[2]; /* log string start (final len aligned by size) */ char log_start[2]; /* log string start (final len aligned by size) */
}; };
...@@ -42,7 +42,7 @@ struct procdata { ...@@ -42,7 +42,7 @@ struct procdata {
struct log_data *log_head, *log_tail; /* head and tail for queue */ struct log_data *log_head, *log_tail; /* head and tail for queue */
int if_used; /* open count for interface */ int if_used; /* open count for interface */
int volatile del_lock; /* lock for delete operations */ int volatile del_lock; /* lock for delete operations */
uchar logtmp[LOG_MAX_LINELEN]; unsigned char logtmp[LOG_MAX_LINELEN];
wait_queue_head_t rd_queue; wait_queue_head_t rd_queue;
}; };
...@@ -153,9 +153,9 @@ put_log_buffer(hysdn_card * card, char *cp) ...@@ -153,9 +153,9 @@ put_log_buffer(hysdn_card * card, char *cp)
static ssize_t static ssize_t
hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t * off) hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t * off)
{ {
ulong u = 0; unsigned long u = 0;
int found = 0; int found = 0;
uchar *cp, valbuf[128]; unsigned char *cp, valbuf[128];
long base = 10; long base = 10;
hysdn_card *card = (hysdn_card *) file->private_data; hysdn_card *card = (hysdn_card *) file->private_data;
...@@ -249,7 +249,7 @@ hysdn_log_open(struct inode *ino, struct file *filep) ...@@ -249,7 +249,7 @@ hysdn_log_open(struct inode *ino, struct file *filep)
{ {
hysdn_card *card; hysdn_card *card;
struct procdata *pd = NULL; struct procdata *pd = NULL;
ulong flags; unsigned long flags;
lock_kernel(); lock_kernel();
card = card_root; card = card_root;
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
/* to keep the data until later. */ /* to keep the data until later. */
/*****************************************************************************/ /*****************************************************************************/
int int
hysdn_sched_rx(hysdn_card * card, uchar * buf, word len, word chan) hysdn_sched_rx(hysdn_card *card, unsigned char *buf, unsigned short len,
unsigned short chan)
{ {
switch (chan) { switch (chan) {
...@@ -72,7 +73,9 @@ hysdn_sched_rx(hysdn_card * card, uchar * buf, word len, word chan) ...@@ -72,7 +73,9 @@ hysdn_sched_rx(hysdn_card * card, uchar * buf, word len, word chan)
/* sending. */ /* sending. */
/*****************************************************************************/ /*****************************************************************************/
int int
hysdn_sched_tx(hysdn_card * card, uchar * buf, word volatile *len, word volatile *chan, word maxlen) hysdn_sched_tx(hysdn_card *card, unsigned char *buf,
unsigned short volatile *len, unsigned short volatile *chan,
unsigned short maxlen)
{ {
struct sk_buff *skb; struct sk_buff *skb;
...@@ -145,10 +148,10 @@ hysdn_sched_tx(hysdn_card * card, uchar * buf, word volatile *len, word volatile ...@@ -145,10 +148,10 @@ hysdn_sched_tx(hysdn_card * card, uchar * buf, word volatile *len, word volatile
/* are to be sent and this happens very seldom. */ /* are to be sent and this happens very seldom. */
/*****************************************************************************/ /*****************************************************************************/
int int
hysdn_tx_cfgline(hysdn_card * card, uchar * line, word chan) hysdn_tx_cfgline(hysdn_card *card, unsigned char *line, unsigned short chan)
{ {
int cnt = 50; /* timeout intervalls */ int cnt = 50; /* timeout intervalls */
ulong flags; unsigned long flags;
if (card->debug_flags & LOG_SCHED_ASYN) if (card->debug_flags & LOG_SCHED_ASYN)
hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1); hysdn_addlog(card, "async tx-cfg chan=%d len=%d", chan, strlen(line) + 1);
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
* s. RotlCRC algorithm * s. RotlCRC algorithm
* *
* RotlCRC algorithm: * RotlCRC algorithm:
* ucSum= 0 1 uchar * ucSum= 0 1 unsigned char
* for all NonEndTokenChunk bytes: * for all NonEndTokenChunk bytes:
* ROTL(ucSum,1) rotate left by 1 * ROTL(ucSum,1) rotate left by 1
* ucSum += Char; add current byte with swap around * ucSum += Char; add current byte with swap around
...@@ -85,13 +85,13 @@ ...@@ -85,13 +85,13 @@
typedef struct ErrLogEntry_tag { typedef struct ErrLogEntry_tag {
/*00 */ ulong ulErrType; /*00 */ unsigned long ulErrType;
/*04 */ ulong ulErrSubtype; /*04 */ unsigned long ulErrSubtype;
/*08 */ uchar ucTextSize; /*08 */ unsigned char ucTextSize;
/*09 */ uchar ucText[ERRLOG_TEXT_SIZE]; /*09 */ unsigned char ucText[ERRLOG_TEXT_SIZE];
/* ASCIIZ of len ucTextSize-1 */ /* ASCIIZ of len ucTextSize-1 */
/*40 */ /*40 */
...@@ -111,13 +111,13 @@ typedef struct ErrLogEntry_tag { ...@@ -111,13 +111,13 @@ typedef struct ErrLogEntry_tag {
#define DPRAM_SPOOLER_DATA_SIZE 0x20 #define DPRAM_SPOOLER_DATA_SIZE 0x20
typedef struct DpramBootSpooler_tag { typedef struct DpramBootSpooler_tag {
/*00 */ uchar Len; /*00 */ unsigned char Len;
/*01 */ volatile uchar RdPtr; /*01 */ volatile unsigned char RdPtr;
/*02 */ uchar WrPtr; /*02 */ unsigned char WrPtr;
/*03 */ uchar Data[DPRAM_SPOOLER_DATA_SIZE]; /*03 */ unsigned char Data[DPRAM_SPOOLER_DATA_SIZE];
/*23 */ /*23 */
} tDpramBootSpooler; } tDpramBootSpooler;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment