提交 475be4d8 编写于 作者: J Joe Perches

isdn: whitespace coding style cleanup

isdn source code uses a not-current coding style.

Update the coding style used on a per-line basis
so that git diff -w shows only elided blank lines
at EOF.

Done with emacs and some scripts and some typing.

Built x86 allyesconfig.
No detected change in objdump -d or size.
Signed-off-by: NJoe Perches <joe@perches.com>
上级 0b0a635f
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Author Fritz Elfert * Author Fritz Elfert
* Copyright by Fritz Elfert <fritz@isdn4linux.de> * Copyright by Fritz Elfert <fritz@isdn4linux.de>
* *
* This software may be used and distributed according to the terms * This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference. * of the GNU General Public License, incorporated herein by reference.
* *
...@@ -40,21 +40,21 @@ ...@@ -40,21 +40,21 @@
/* Struct for adding new cards */ /* Struct for adding new cards */
typedef struct act2000_cdef { typedef struct act2000_cdef {
int bus; int bus;
int port; int port;
int irq; int irq;
char id[10]; char id[10];
} act2000_cdef; } act2000_cdef;
/* Struct for downloading firmware */ /* Struct for downloading firmware */
typedef struct act2000_ddef { typedef struct act2000_ddef {
int length; /* Length of code */ int length; /* Length of code */
char __user *buffer; /* Ptr. to code */ char __user *buffer; /* Ptr. to code */
} act2000_ddef; } act2000_ddef;
typedef struct act2000_fwid { typedef struct act2000_fwid {
char isdn[4]; char isdn[4];
char revlen[2]; char revlen[2];
char revision[504]; char revision[504];
} act2000_fwid; } act2000_fwid;
#if defined(__KERNEL__) || defined(__DEBUGVAR__) #if defined(__KERNEL__) || defined(__DEBUGVAR__)
...@@ -128,8 +128,8 @@ typedef struct act2000_chan { ...@@ -128,8 +128,8 @@ typedef struct act2000_chan {
typedef struct msn_entry { typedef struct msn_entry {
char eaz; char eaz;
char msn[16]; char msn[16];
struct msn_entry * next; struct msn_entry *next;
} msn_entry; } msn_entry;
typedef struct irq_data_isa { typedef struct irq_data_isa {
...@@ -183,17 +183,17 @@ typedef struct act2000_card { ...@@ -183,17 +183,17 @@ typedef struct act2000_card {
static inline void act2000_schedule_tx(act2000_card *card) static inline void act2000_schedule_tx(act2000_card *card)
{ {
schedule_work(&card->snd_tq); schedule_work(&card->snd_tq);
} }
static inline void act2000_schedule_rx(act2000_card *card) static inline void act2000_schedule_rx(act2000_card *card)
{ {
schedule_work(&card->rcv_tq); schedule_work(&card->rcv_tq);
} }
static inline void act2000_schedule_poll(act2000_card *card) static inline void act2000_schedule_poll(act2000_card *card)
{ {
schedule_work(&card->poll_tq); schedule_work(&card->poll_tq);
} }
extern char *act2000_find_eaz(act2000_card *, char); extern char *act2000_find_eaz(act2000_card *, char);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Author Fritz Elfert * Author Fritz Elfert
* Copyright by Fritz Elfert <fritz@isdn4linux.de> * Copyright by Fritz Elfert <fritz@isdn4linux.de>
* *
* This software may be used and distributed according to the terms * This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference. * of the GNU General Public License, incorporated herein by reference.
* *
...@@ -25,99 +25,99 @@ ...@@ -25,99 +25,99 @@
static int static int
act2000_isa_reset(unsigned short portbase) act2000_isa_reset(unsigned short portbase)
{ {
unsigned char reg; unsigned char reg;
int i; int i;
int found; int found;
int serial = 0; int serial = 0;
found = 0; found = 0;
if ((reg = inb(portbase + ISA_COR)) != 0xff) { if ((reg = inb(portbase + ISA_COR)) != 0xff) {
outb(reg | ISA_COR_RESET, portbase + ISA_COR); outb(reg | ISA_COR_RESET, portbase + ISA_COR);
mdelay(10); mdelay(10);
outb(reg, portbase + ISA_COR); outb(reg, portbase + ISA_COR);
mdelay(10); mdelay(10);
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
if (inb(portbase + ISA_ISR) & ISA_ISR_SERIAL) if (inb(portbase + ISA_ISR) & ISA_ISR_SERIAL)
serial |= 0x10000; serial |= 0x10000;
serial >>= 1; serial >>= 1;
} }
if (serial == ISA_SER_ID) if (serial == ISA_SER_ID)
found++; found++;
} }
return found; return found;
} }
int int
act2000_isa_detect(unsigned short portbase) act2000_isa_detect(unsigned short portbase)
{ {
int ret = 0; int ret = 0;
if (request_region(portbase, ACT2000_PORTLEN, "act2000isa")) { if (request_region(portbase, ACT2000_PORTLEN, "act2000isa")) {
ret = act2000_isa_reset(portbase); ret = act2000_isa_reset(portbase);
release_region(portbase, ISA_REGION); release_region(portbase, ISA_REGION);
} }
return ret; return ret;
} }
static irqreturn_t static irqreturn_t
act2000_isa_interrupt(int dummy, void *dev_id) act2000_isa_interrupt(int dummy, void *dev_id)
{ {
act2000_card *card = dev_id; act2000_card *card = dev_id;
u_char istatus; u_char istatus;
istatus = (inb(ISA_PORT_ISR) & 0x07); istatus = (inb(ISA_PORT_ISR) & 0x07);
if (istatus & ISA_ISR_OUT) { if (istatus & ISA_ISR_OUT) {
/* RX fifo has data */ /* RX fifo has data */
istatus &= ISA_ISR_OUT_MASK; istatus &= ISA_ISR_OUT_MASK;
outb(0, ISA_PORT_SIS); outb(0, ISA_PORT_SIS);
act2000_isa_receive(card); act2000_isa_receive(card);
outb(ISA_SIS_INT, ISA_PORT_SIS); outb(ISA_SIS_INT, ISA_PORT_SIS);
} }
if (istatus & ISA_ISR_ERR) { if (istatus & ISA_ISR_ERR) {
/* Error Interrupt */ /* Error Interrupt */
istatus &= ISA_ISR_ERR_MASK; istatus &= ISA_ISR_ERR_MASK;
printk(KERN_WARNING "act2000: errIRQ\n"); printk(KERN_WARNING "act2000: errIRQ\n");
} }
if (istatus) if (istatus)
printk(KERN_DEBUG "act2000: ?IRQ %d %02x\n", card->irq, istatus); printk(KERN_DEBUG "act2000: ?IRQ %d %02x\n", card->irq, istatus);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static void static void
act2000_isa_select_irq(act2000_card * card) act2000_isa_select_irq(act2000_card *card)
{ {
unsigned char reg; unsigned char reg;
reg = (inb(ISA_PORT_COR) & ~ISA_COR_IRQOFF) | ISA_COR_PERR; reg = (inb(ISA_PORT_COR) & ~ISA_COR_IRQOFF) | ISA_COR_PERR;
switch (card->irq) { switch (card->irq) {
case 3: case 3:
reg = ISA_COR_IRQ03; reg = ISA_COR_IRQ03;
break; break;
case 5: case 5:
reg = ISA_COR_IRQ05; reg = ISA_COR_IRQ05;
break; break;
case 7: case 7:
reg = ISA_COR_IRQ07; reg = ISA_COR_IRQ07;
break; break;
case 10: case 10:
reg = ISA_COR_IRQ10; reg = ISA_COR_IRQ10;
break; break;
case 11: case 11:
reg = ISA_COR_IRQ11; reg = ISA_COR_IRQ11;
break; break;
case 12: case 12:
reg = ISA_COR_IRQ12; reg = ISA_COR_IRQ12;
break; break;
case 15: case 15:
reg = ISA_COR_IRQ15; reg = ISA_COR_IRQ15;
break; break;
} }
outb(reg, ISA_PORT_COR); outb(reg, ISA_PORT_COR);
} }
static void static void
act2000_isa_enable_irq(act2000_card * card) act2000_isa_enable_irq(act2000_card *card)
{ {
act2000_isa_select_irq(card); act2000_isa_select_irq(card);
/* Enable READ irq */ /* Enable READ irq */
...@@ -129,102 +129,102 @@ act2000_isa_enable_irq(act2000_card * card) ...@@ -129,102 +129,102 @@ act2000_isa_enable_irq(act2000_card * card)
* If irq is -1, choose next free irq, else irq is given explicitly. * If irq is -1, choose next free irq, else irq is given explicitly.
*/ */
int int
act2000_isa_config_irq(act2000_card * card, short irq) act2000_isa_config_irq(act2000_card *card, short irq)
{ {
int old_irq; int old_irq;
if (card->flags & ACT2000_FLAGS_IVALID) { if (card->flags & ACT2000_FLAGS_IVALID) {
free_irq(card->irq, card); free_irq(card->irq, card);
} }
card->flags &= ~ACT2000_FLAGS_IVALID; card->flags &= ~ACT2000_FLAGS_IVALID;
outb(ISA_COR_IRQOFF, ISA_PORT_COR); outb(ISA_COR_IRQOFF, ISA_PORT_COR);
if (!irq) if (!irq)
return 0; return 0;
old_irq = card->irq; old_irq = card->irq;
card->irq = irq; card->irq = irq;
if (request_irq(irq, &act2000_isa_interrupt, 0, card->regname, card)) { if (request_irq(irq, &act2000_isa_interrupt, 0, card->regname, card)) {
card->irq = old_irq; card->irq = old_irq;
card->flags |= ACT2000_FLAGS_IVALID; card->flags |= ACT2000_FLAGS_IVALID;
printk(KERN_WARNING printk(KERN_WARNING
"act2000: Could not request irq %d\n",irq); "act2000: Could not request irq %d\n", irq);
return -EBUSY; return -EBUSY;
} else { } else {
act2000_isa_select_irq(card); act2000_isa_select_irq(card);
/* Disable READ and WRITE irq */ /* Disable READ and WRITE irq */
outb(0, ISA_PORT_SIS); outb(0, ISA_PORT_SIS);
outb(0, ISA_PORT_SOS); outb(0, ISA_PORT_SOS);
} }
return 0; return 0;
} }
int int
act2000_isa_config_port(act2000_card * card, unsigned short portbase) act2000_isa_config_port(act2000_card *card, unsigned short portbase)
{ {
if (card->flags & ACT2000_FLAGS_PVALID) { if (card->flags & ACT2000_FLAGS_PVALID) {
release_region(card->port, ISA_REGION); release_region(card->port, ISA_REGION);
card->flags &= ~ACT2000_FLAGS_PVALID; card->flags &= ~ACT2000_FLAGS_PVALID;
} }
if (request_region(portbase, ACT2000_PORTLEN, card->regname) == NULL) if (request_region(portbase, ACT2000_PORTLEN, card->regname) == NULL)
return -EBUSY; return -EBUSY;
else { else {
card->port = portbase; card->port = portbase;
card->flags |= ACT2000_FLAGS_PVALID; card->flags |= ACT2000_FLAGS_PVALID;
return 0; return 0;
} }
} }
/* /*
* Release ressources, used by an adaptor. * Release ressources, used by an adaptor.
*/ */
void void
act2000_isa_release(act2000_card * card) act2000_isa_release(act2000_card *card)
{ {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&card->lock, flags); spin_lock_irqsave(&card->lock, flags);
if (card->flags & ACT2000_FLAGS_IVALID) if (card->flags & ACT2000_FLAGS_IVALID)
free_irq(card->irq, card); free_irq(card->irq, card);
card->flags &= ~ACT2000_FLAGS_IVALID; card->flags &= ~ACT2000_FLAGS_IVALID;
if (card->flags & ACT2000_FLAGS_PVALID) if (card->flags & ACT2000_FLAGS_PVALID)
release_region(card->port, ISA_REGION); release_region(card->port, ISA_REGION);
card->flags &= ~ACT2000_FLAGS_PVALID; card->flags &= ~ACT2000_FLAGS_PVALID;
spin_unlock_irqrestore(&card->lock, flags); spin_unlock_irqrestore(&card->lock, flags);
} }
static int static int
act2000_isa_writeb(act2000_card * card, u_char data) act2000_isa_writeb(act2000_card *card, u_char data)
{ {
u_char timeout = 40; u_char timeout = 40;
while (timeout) { while (timeout) {
if (inb(ISA_PORT_SOS) & ISA_SOS_READY) { if (inb(ISA_PORT_SOS) & ISA_SOS_READY) {
outb(data, ISA_PORT_SDO); outb(data, ISA_PORT_SDO);
return 0; return 0;
} else { } else {
timeout--; timeout--;
udelay(10); udelay(10);
} }
} }
return 1; return 1;
} }
static int static int
act2000_isa_readb(act2000_card * card, u_char * data) act2000_isa_readb(act2000_card *card, u_char *data)
{ {
u_char timeout = 40; u_char timeout = 40;
while (timeout) { while (timeout) {
if (inb(ISA_PORT_SIS) & ISA_SIS_READY) { if (inb(ISA_PORT_SIS) & ISA_SIS_READY) {
*data = inb(ISA_PORT_SDI); *data = inb(ISA_PORT_SDI);
return 0; return 0;
} else { } else {
timeout--; timeout--;
udelay(10); udelay(10);
} }
} }
return 1; return 1;
} }
void void
...@@ -232,11 +232,11 @@ act2000_isa_receive(act2000_card *card) ...@@ -232,11 +232,11 @@ act2000_isa_receive(act2000_card *card)
{ {
u_char c; u_char c;
if (test_and_set_bit(ACT2000_LOCK_RX, (void *) &card->ilock) != 0) if (test_and_set_bit(ACT2000_LOCK_RX, (void *) &card->ilock) != 0)
return; return;
while (!act2000_isa_readb(card, &c)) { while (!act2000_isa_readb(card, &c)) {
if (card->idat.isa.rcvidx < 8) { if (card->idat.isa.rcvidx < 8) {
card->idat.isa.rcvhdr[card->idat.isa.rcvidx++] = c; card->idat.isa.rcvhdr[card->idat.isa.rcvidx++] = c;
if (card->idat.isa.rcvidx == 8) { if (card->idat.isa.rcvidx == 8) {
int valid = actcapi_chkhdr(card, (actcapi_msghdr *)&card->idat.isa.rcvhdr); int valid = actcapi_chkhdr(card, (actcapi_msghdr *)&card->idat.isa.rcvhdr);
...@@ -291,14 +291,14 @@ act2000_isa_receive(act2000_card *card) ...@@ -291,14 +291,14 @@ act2000_isa_receive(act2000_card *card)
} }
void void
act2000_isa_send(act2000_card * card) act2000_isa_send(act2000_card *card)
{ {
unsigned long flags; unsigned long flags;
struct sk_buff *skb; struct sk_buff *skb;
actcapi_msg *msg; actcapi_msg *msg;
int l; int l;
if (test_and_set_bit(ACT2000_LOCK_TX, (void *) &card->ilock) != 0) if (test_and_set_bit(ACT2000_LOCK_TX, (void *) &card->ilock) != 0)
return; return;
while (1) { while (1) {
spin_lock_irqsave(&card->lock, flags); spin_lock_irqsave(&card->lock, flags);
...@@ -307,7 +307,7 @@ act2000_isa_send(act2000_card * card) ...@@ -307,7 +307,7 @@ act2000_isa_send(act2000_card * card)
card->ack_msg = card->sbuf->data; card->ack_msg = card->sbuf->data;
msg = (actcapi_msg *)card->sbuf->data; msg = (actcapi_msg *)card->sbuf->data;
if ((msg->hdr.cmd.cmd == 0x86) && if ((msg->hdr.cmd.cmd == 0x86) &&
(msg->hdr.cmd.subcmd == 0) ) { (msg->hdr.cmd.subcmd == 0)) {
/* Save flags in message */ /* Save flags in message */
card->need_b3ack = msg->msg.data_b3_req.flags; card->need_b3ack = msg->msg.data_b3_req.flags;
msg->msg.data_b3_req.flags = 0; msg->msg.data_b3_req.flags = 0;
...@@ -335,7 +335,7 @@ act2000_isa_send(act2000_card * card) ...@@ -335,7 +335,7 @@ act2000_isa_send(act2000_card * card)
} }
msg = (actcapi_msg *)card->ack_msg; msg = (actcapi_msg *)card->ack_msg;
if ((msg->hdr.cmd.cmd == 0x86) && if ((msg->hdr.cmd.cmd == 0x86) &&
(msg->hdr.cmd.subcmd == 0) ) { (msg->hdr.cmd.subcmd == 0)) {
/* /*
* If it's user data, reset data-ptr * If it's user data, reset data-ptr
* and put skb into ackq. * and put skb into ackq.
...@@ -354,90 +354,90 @@ act2000_isa_send(act2000_card * card) ...@@ -354,90 +354,90 @@ act2000_isa_send(act2000_card * card)
* Get firmware ID, check for 'ISDN' signature. * Get firmware ID, check for 'ISDN' signature.
*/ */
static int static int
act2000_isa_getid(act2000_card * card) act2000_isa_getid(act2000_card *card)
{ {
act2000_fwid fid; act2000_fwid fid;
u_char *p = (u_char *) & fid; u_char *p = (u_char *)&fid;
int count = 0; int count = 0;
while (1) { while (1) {
if (count > 510) if (count > 510)
return -EPROTO; return -EPROTO;
if (act2000_isa_readb(card, p++)) if (act2000_isa_readb(card, p++))
break; break;
count++; count++;
} }
if (count <= 20) { if (count <= 20) {
printk(KERN_WARNING "act2000: No Firmware-ID!\n"); printk(KERN_WARNING "act2000: No Firmware-ID!\n");
return -ETIME; return -ETIME;
} }
*p = '\0'; *p = '\0';
fid.revlen[0] = '\0'; fid.revlen[0] = '\0';
if (strcmp(fid.isdn, "ISDN")) { if (strcmp(fid.isdn, "ISDN")) {
printk(KERN_WARNING "act2000: Wrong Firmware-ID!\n"); printk(KERN_WARNING "act2000: Wrong Firmware-ID!\n");
return -EPROTO; return -EPROTO;
} }
if ((p = strchr(fid.revision, '\n'))) if ((p = strchr(fid.revision, '\n')))
*p = '\0'; *p = '\0';
printk(KERN_INFO "act2000: Firmware-ID: %s\n", fid.revision); printk(KERN_INFO "act2000: Firmware-ID: %s\n", fid.revision);
if (card->flags & ACT2000_FLAGS_IVALID) { if (card->flags & ACT2000_FLAGS_IVALID) {
printk(KERN_DEBUG "Enabling Interrupts ...\n"); printk(KERN_DEBUG "Enabling Interrupts ...\n");
act2000_isa_enable_irq(card); act2000_isa_enable_irq(card);
} }
return 0; return 0;
} }
/* /*
* Download microcode into card, check Firmware signature. * Download microcode into card, check Firmware signature.
*/ */
int int
act2000_isa_download(act2000_card * card, act2000_ddef __user * cb) act2000_isa_download(act2000_card *card, act2000_ddef __user *cb)
{ {
unsigned int length; unsigned int length;
int l; int l;
int c; int c;
long timeout; long timeout;
u_char *b; u_char *b;
u_char __user *p; u_char __user *p;
u_char *buf; u_char *buf;
act2000_ddef cblock; act2000_ddef cblock;
if (!act2000_isa_reset(card->port)) if (!act2000_isa_reset(card->port))
return -ENXIO; return -ENXIO;
msleep_interruptible(500); msleep_interruptible(500);
if (copy_from_user(&cblock, cb, sizeof(cblock))) if (copy_from_user(&cblock, cb, sizeof(cblock)))
return -EFAULT; return -EFAULT;
length = cblock.length; length = cblock.length;
p = cblock.buffer; p = cblock.buffer;
if (!access_ok(VERIFY_READ, p, length)) if (!access_ok(VERIFY_READ, p, length))
return -EFAULT; return -EFAULT;
buf = kmalloc(1024, GFP_KERNEL); buf = kmalloc(1024, GFP_KERNEL);
if (!buf) if (!buf)
return -ENOMEM; return -ENOMEM;
timeout = 0; timeout = 0;
while (length) { while (length) {
l = (length > 1024) ? 1024 : length; l = (length > 1024) ? 1024 : length;
c = 0; c = 0;
b = buf; b = buf;
if (copy_from_user(buf, p, l)) { if (copy_from_user(buf, p, l)) {
kfree(buf); kfree(buf);
return -EFAULT; return -EFAULT;
} }
while (c < l) { while (c < l) {
if (act2000_isa_writeb(card, *b++)) { if (act2000_isa_writeb(card, *b++)) {
printk(KERN_WARNING printk(KERN_WARNING
"act2000: loader timed out" "act2000: loader timed out"
" len=%d c=%d\n", length, c); " len=%d c=%d\n", length, c);
kfree(buf); kfree(buf);
return -ETIME; return -ETIME;
} }
c++; c++;
} }
length -= l; length -= l;
p += l; p += l;
} }
kfree(buf); kfree(buf);
msleep_interruptible(500); msleep_interruptible(500);
return (act2000_isa_getid(card)); return (act2000_isa_getid(card));
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Author Fritz Elfert * Author Fritz Elfert
* Copyright by Fritz Elfert <fritz@isdn4linux.de> * Copyright by Fritz Elfert <fritz@isdn4linux.de>
* *
* This software may be used and distributed according to the terms * This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference. * of the GNU General Public License, incorporated herein by reference.
* *
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
#define ISA_POLL_LOOP 40 /* Try to read-write before give up */ #define ISA_POLL_LOOP 40 /* Try to read-write before give up */
typedef enum { typedef enum {
INT_NO_CHANGE = 0, /* Do not change the Mask */ INT_NO_CHANGE = 0, /* Do not change the Mask */
INT_ON = 1, /* Set to Enable */ INT_ON = 1, /* Set to Enable */
INT_OFF = 2, /* Set to Disable */ INT_OFF = 2, /* Set to Disable */
} ISA_INT_T; } ISA_INT_T;
/**************************************************************************/ /**************************************************************************/
...@@ -114,22 +114,22 @@ typedef enum { ...@@ -114,22 +114,22 @@ typedef enum {
/* Macros for accessing ports */ /* Macros for accessing ports */
#define ISA_PORT_COR (card->port+ISA_COR) #define ISA_PORT_COR (card->port + ISA_COR)
#define ISA_PORT_ISR (card->port+ISA_ISR) #define ISA_PORT_ISR (card->port + ISA_ISR)
#define ISA_PORT_EPR (card->port+ISA_EPR) #define ISA_PORT_EPR (card->port + ISA_EPR)
#define ISA_PORT_EER (card->port+ISA_EER) #define ISA_PORT_EER (card->port + ISA_EER)
#define ISA_PORT_SDI (card->port+ISA_SDI) #define ISA_PORT_SDI (card->port + ISA_SDI)
#define ISA_PORT_SDO (card->port+ISA_SDO) #define ISA_PORT_SDO (card->port + ISA_SDO)
#define ISA_PORT_SIS (card->port+ISA_SIS) #define ISA_PORT_SIS (card->port + ISA_SIS)
#define ISA_PORT_SOS (card->port+ISA_SOS) #define ISA_PORT_SOS (card->port + ISA_SOS)
/* Prototypes */ /* Prototypes */
extern int act2000_isa_detect(unsigned short portbase); extern int act2000_isa_detect(unsigned short portbase);
extern int act2000_isa_config_irq(act2000_card * card, short irq); extern int act2000_isa_config_irq(act2000_card *card, short irq);
extern int act2000_isa_config_port(act2000_card * card, unsigned short portbase); extern int act2000_isa_config_port(act2000_card *card, unsigned short portbase);
extern int act2000_isa_download(act2000_card * card, act2000_ddef __user * cb); extern int act2000_isa_download(act2000_card *card, act2000_ddef __user *cb);
extern void act2000_isa_release(act2000_card * card); extern void act2000_isa_release(act2000_card *card);
extern void act2000_isa_receive(act2000_card *card); extern void act2000_isa_receive(act2000_card *card);
extern void act2000_isa_send(act2000_card *card); extern void act2000_isa_send(act2000_card *card);
......
此差异已折叠。
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Author Fritz Elfert * Author Fritz Elfert
* Copyright by Fritz Elfert <fritz@isdn4linux.de> * Copyright by Fritz Elfert <fritz@isdn4linux.de>
* *
* This software may be used and distributed according to the terms * This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference. * of the GNU General Public License, incorporated herein by reference.
* *
...@@ -46,10 +46,10 @@ typedef struct actcapi_addr { ...@@ -46,10 +46,10 @@ typedef struct actcapi_addr {
typedef union actcapi_infonr { /* info number */ typedef union actcapi_infonr { /* info number */
__u16 mask; /* info-mask field */ __u16 mask; /* info-mask field */
struct bmask { /* bit definitions */ struct bmask { /* bit definitions */
unsigned codes : 3; /* code set */ unsigned codes:3; /* code set */
unsigned rsvd : 5; /* reserved */ unsigned rsvd:5; /* reserved */
unsigned svind : 1; /* single, variable length ind. */ unsigned svind:1; /* single, variable length ind. */
unsigned wtype : 7; /* W-element type */ unsigned wtype:7; /* W-element type */
} bmask; } bmask;
} actcapi_infonr; } actcapi_infonr;
...@@ -59,13 +59,13 @@ typedef union actcapi_infoel { /* info element */ ...@@ -59,13 +59,13 @@ typedef union actcapi_infoel { /* info element */
__u8 display[40]; /* display contents */ __u8 display[40]; /* display contents */
__u8 uuinfo[40]; /* User-user info field */ __u8 uuinfo[40]; /* User-user info field */
struct cause { /* Cause information */ struct cause { /* Cause information */
unsigned ext2 : 1; /* extension */ unsigned ext2:1; /* extension */
unsigned cod : 2; /* coding standard */ unsigned cod:2; /* coding standard */
unsigned spare : 1; /* spare */ unsigned spare:1; /* spare */
unsigned loc : 4; /* location */ unsigned loc:4; /* location */
unsigned ext1 : 1; /* extension */ unsigned ext1:1; /* extension */
unsigned cval : 7; /* Cause value */ unsigned cval:7; /* Cause value */
} cause; } cause;
struct charge { /* Charging information */ struct charge { /* Charging information */
__u8 toc; /* type of charging info */ __u8 toc; /* type of charging info */
__u8 unit[10]; /* charging units */ __u8 unit[10]; /* charging units */
...@@ -111,14 +111,14 @@ typedef struct actcapi_ncpd { ...@@ -111,14 +111,14 @@ typedef struct actcapi_ncpd {
* Bit 5-7 = Controller * Bit 5-7 = Controller
* Bit 8-15 = NCCI * Bit 8-15 = NCCI
*/ */
#define MAKE_NCCI(plci,contr,ncci) \ #define MAKE_NCCI(plci, contr, ncci) \
((plci & 0x1f) | ((contr & 0x7) << 5) | ((ncci & 0xff) << 8)) ((plci & 0x1f) | ((contr & 0x7) << 5) | ((ncci & 0xff) << 8))
#define EVAL_NCCI(fakencci,plci,contr,ncci) { \ #define EVAL_NCCI(fakencci, plci, contr, ncci) { \
plci = fakencci & 0x1f; \ plci = fakencci & 0x1f; \
contr = (fakencci >> 5) & 0x7; \ contr = (fakencci >> 5) & 0x7; \
ncci = (fakencci >> 8) & 0xff; \ ncci = (fakencci >> 8) & 0xff; \
} }
/* /*
* Layout of PLCI field in a B3 DATA CAPI message is different from * Layout of PLCI field in a B3 DATA CAPI message is different from
...@@ -128,13 +128,13 @@ typedef struct actcapi_ncpd { ...@@ -128,13 +128,13 @@ typedef struct actcapi_ncpd {
* Bit 5-7 = Controller * Bit 5-7 = Controller
* Bit 8-15 = reserved (must be 0) * Bit 8-15 = reserved (must be 0)
*/ */
#define MAKE_PLCI(plci,contr) \ #define MAKE_PLCI(plci, contr) \
((plci & 0x1f) | ((contr & 0x7) << 5)) ((plci & 0x1f) | ((contr & 0x7) << 5))
#define EVAL_PLCI(fakeplci,plci,contr) { \ #define EVAL_PLCI(fakeplci, plci, contr) { \
plci = fakeplci & 0x1f; \ plci = fakeplci & 0x1f; \
contr = (fakeplci >> 5) & 0x7; \ contr = (fakeplci >> 5) & 0x7; \
} }
typedef struct actcapi_msg { typedef struct actcapi_msg {
actcapi_msghdr hdr; actcapi_msghdr hdr;
......
此差异已折叠。
...@@ -164,7 +164,7 @@ static int capiminor_del_ack(struct capiminor *mp, u16 datahandle) ...@@ -164,7 +164,7 @@ static int capiminor_del_ack(struct capiminor *mp, u16 datahandle)
spin_lock_bh(&mp->ackqlock); spin_lock_bh(&mp->ackqlock);
list_for_each_entry_safe(p, tmp, &mp->ackqueue, list) { list_for_each_entry_safe(p, tmp, &mp->ackqueue, list) {
if (p->datahandle == datahandle) { if (p->datahandle == datahandle) {
list_del(&p->list); list_del(&p->list);
mp->nack--; mp->nack--;
spin_unlock_bh(&mp->ackqlock); spin_unlock_bh(&mp->ackqlock);
...@@ -199,8 +199,8 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) ...@@ -199,8 +199,8 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci)
unsigned int minor; unsigned int minor;
mp = kzalloc(sizeof(*mp), GFP_KERNEL); mp = kzalloc(sizeof(*mp), GFP_KERNEL);
if (!mp) { if (!mp) {
printk(KERN_ERR "capi: can't alloc capiminor\n"); printk(KERN_ERR "capi: can't alloc capiminor\n");
return NULL; return NULL;
} }
...@@ -391,7 +391,7 @@ gen_data_b3_resp_for(struct capiminor *mp, struct sk_buff *skb) ...@@ -391,7 +391,7 @@ gen_data_b3_resp_for(struct capiminor *mp, struct sk_buff *skb)
struct sk_buff *nskb; struct sk_buff *nskb;
nskb = alloc_skb(CAPI_DATA_B3_RESP_LEN, GFP_KERNEL); nskb = alloc_skb(CAPI_DATA_B3_RESP_LEN, GFP_KERNEL);
if (nskb) { if (nskb) {
u16 datahandle = CAPIMSG_U16(skb->data,CAPIMSG_BASELEN+4+4+2); u16 datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 4 + 2);
unsigned char *s = skb_put(nskb, CAPI_DATA_B3_RESP_LEN); unsigned char *s = skb_put(nskb, CAPI_DATA_B3_RESP_LEN);
capimsg_setu16(s, 0, CAPI_DATA_B3_RESP_LEN); capimsg_setu16(s, 0, CAPI_DATA_B3_RESP_LEN);
capimsg_setu16(s, 2, mp->ap->applid); capimsg_setu16(s, 2, mp->ap->applid);
...@@ -418,7 +418,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb) ...@@ -418,7 +418,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
pr_debug("capi: currently no receiver\n"); pr_debug("capi: currently no receiver\n");
return -1; return -1;
} }
ld = tty_ldisc_ref(tty); ld = tty_ldisc_ref(tty);
if (!ld) { if (!ld) {
/* fatal error, do not requeue */ /* fatal error, do not requeue */
...@@ -459,7 +459,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb) ...@@ -459,7 +459,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
ld->ops->receive_buf(tty, skb->data, NULL, skb->len); ld->ops->receive_buf(tty, skb->data, NULL, skb->len);
} else { } else {
printk(KERN_ERR "capi: send DATA_B3_RESP failed=%x\n", printk(KERN_ERR "capi: send DATA_B3_RESP failed=%x\n",
errcode); errcode);
kfree_skb(nskb); kfree_skb(nskb);
if (errcode == CAPI_SENDQUEUEFULL) if (errcode == CAPI_SENDQUEUEFULL)
...@@ -618,7 +618,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb) ...@@ -618,7 +618,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
goto unlock_out; goto unlock_out;
} }
if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_IND) { if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_IND) {
datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+4+2); datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 4 + 2);
pr_debug("capi_signal: DATA_B3_IND %u len=%d\n", pr_debug("capi_signal: DATA_B3_IND %u len=%d\n",
datahandle, skb->len-CAPIMSG_LEN(skb->data)); datahandle, skb->len-CAPIMSG_LEN(skb->data));
skb_queue_tail(&mp->inqueue, skb); skb_queue_tail(&mp->inqueue, skb);
...@@ -627,10 +627,10 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb) ...@@ -627,10 +627,10 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
} else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) { } else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) {
datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4); datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4);
pr_debug("capi_signal: DATA_B3_CONF %u 0x%x\n", pr_debug("capi_signal: DATA_B3_CONF %u 0x%x\n",
datahandle, datahandle,
CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+2)); CAPIMSG_U16(skb->data, CAPIMSG_BASELEN + 4 + 2));
kfree_skb(skb); kfree_skb(skb);
capiminor_del_ack(mp, datahandle); capiminor_del_ack(mp, datahandle);
tty = tty_port_tty_get(&mp->port); tty = tty_port_tty_get(&mp->port);
...@@ -669,7 +669,7 @@ capi_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) ...@@ -669,7 +669,7 @@ capi_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
if (file->f_flags & O_NONBLOCK) if (file->f_flags & O_NONBLOCK)
return -EAGAIN; return -EAGAIN;
err = wait_event_interruptible(cdev->recvwait, err = wait_event_interruptible(cdev->recvwait,
(skb = skb_dequeue(&cdev->recvqueue))); (skb = skb_dequeue(&cdev->recvqueue)));
if (err) if (err)
return err; return err;
} }
...@@ -736,7 +736,7 @@ capi_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos ...@@ -736,7 +736,7 @@ capi_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos
} }
static unsigned int static unsigned int
capi_poll(struct file *file, poll_table * wait) capi_poll(struct file *file, poll_table *wait)
{ {
struct capidev *cdev = file->private_data; struct capidev *cdev = file->private_data;
unsigned int mask = 0; unsigned int mask = 0;
...@@ -786,75 +786,75 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -786,75 +786,75 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return retval; return retval;
case CAPI_GET_VERSION: case CAPI_GET_VERSION:
{ {
if (copy_from_user(&data.contr, argp, if (copy_from_user(&data.contr, argp,
sizeof(data.contr))) sizeof(data.contr)))
return -EFAULT; return -EFAULT;
cdev->errcode = capi20_get_version(data.contr, &data.version); cdev->errcode = capi20_get_version(data.contr, &data.version);
if (cdev->errcode) if (cdev->errcode)
return -EIO; return -EIO;
if (copy_to_user(argp, &data.version, if (copy_to_user(argp, &data.version,
sizeof(data.version))) sizeof(data.version)))
return -EFAULT; return -EFAULT;
} }
return 0; return 0;
case CAPI_GET_SERIAL: case CAPI_GET_SERIAL:
{ {
if (copy_from_user(&data.contr, argp, if (copy_from_user(&data.contr, argp,
sizeof(data.contr))) sizeof(data.contr)))
return -EFAULT; return -EFAULT;
cdev->errcode = capi20_get_serial (data.contr, data.serial); cdev->errcode = capi20_get_serial(data.contr, data.serial);
if (cdev->errcode) if (cdev->errcode)
return -EIO; return -EIO;
if (copy_to_user(argp, data.serial, if (copy_to_user(argp, data.serial,
sizeof(data.serial))) sizeof(data.serial)))
return -EFAULT; return -EFAULT;
} }
return 0; return 0;
case CAPI_GET_PROFILE: case CAPI_GET_PROFILE:
{ {
if (copy_from_user(&data.contr, argp, if (copy_from_user(&data.contr, argp,
sizeof(data.contr))) sizeof(data.contr)))
return -EFAULT; return -EFAULT;
if (data.contr == 0) { if (data.contr == 0) {
cdev->errcode = capi20_get_profile(data.contr, &data.profile); cdev->errcode = capi20_get_profile(data.contr, &data.profile);
if (cdev->errcode) if (cdev->errcode)
return -EIO; return -EIO;
retval = copy_to_user(argp, retval = copy_to_user(argp,
&data.profile.ncontroller, &data.profile.ncontroller,
sizeof(data.profile.ncontroller)); sizeof(data.profile.ncontroller));
} else { } else {
cdev->errcode = capi20_get_profile(data.contr, &data.profile); cdev->errcode = capi20_get_profile(data.contr, &data.profile);
if (cdev->errcode) if (cdev->errcode)
return -EIO; return -EIO;
retval = copy_to_user(argp, &data.profile, retval = copy_to_user(argp, &data.profile,
sizeof(data.profile)); sizeof(data.profile));
}
if (retval)
return -EFAULT;
} }
return 0; if (retval)
return -EFAULT;
}
return 0;
case CAPI_GET_MANUFACTURER: case CAPI_GET_MANUFACTURER:
{ {
if (copy_from_user(&data.contr, argp, if (copy_from_user(&data.contr, argp,
sizeof(data.contr))) sizeof(data.contr)))
return -EFAULT; return -EFAULT;
cdev->errcode = capi20_get_manufacturer(data.contr, data.manufacturer); cdev->errcode = capi20_get_manufacturer(data.contr, data.manufacturer);
if (cdev->errcode) if (cdev->errcode)
return -EIO; return -EIO;
if (copy_to_user(argp, data.manufacturer, if (copy_to_user(argp, data.manufacturer,
sizeof(data.manufacturer))) sizeof(data.manufacturer)))
return -EFAULT; return -EFAULT;
} }
return 0; return 0;
case CAPI_GET_ERRCODE: case CAPI_GET_ERRCODE:
data.errcode = cdev->errcode; data.errcode = cdev->errcode;
cdev->errcode = CAPI_NOERROR; cdev->errcode = CAPI_NOERROR;
...@@ -871,15 +871,15 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -871,15 +871,15 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return -ENXIO; return -ENXIO;
case CAPI_MANUFACTURER_CMD: case CAPI_MANUFACTURER_CMD:
{ {
struct capi_manufacturer_cmd mcmd; struct capi_manufacturer_cmd mcmd;
if (!capable(CAP_SYS_ADMIN)) if (!capable(CAP_SYS_ADMIN))
return -EPERM; return -EPERM;
if (copy_from_user(&mcmd, argp, sizeof(mcmd))) if (copy_from_user(&mcmd, argp, sizeof(mcmd)))
return -EFAULT; return -EFAULT;
return capi20_manufacturer(mcmd.cmd, mcmd.data); return capi20_manufacturer(mcmd.cmd, mcmd.data);
} }
return 0; return 0;
case CAPI_SET_FLAGS: case CAPI_SET_FLAGS:
case CAPI_CLR_FLAGS: { case CAPI_CLR_FLAGS: {
...@@ -1070,7 +1070,7 @@ static int capinc_tty_write(struct tty_struct *tty, ...@@ -1070,7 +1070,7 @@ static int capinc_tty_write(struct tty_struct *tty,
mp->outbytes += skb->len; mp->outbytes += skb->len;
} }
skb = alloc_skb(CAPI_DATA_B3_REQ_LEN+count, GFP_ATOMIC); skb = alloc_skb(CAPI_DATA_B3_REQ_LEN + count, GFP_ATOMIC);
if (!skb) { if (!skb) {
printk(KERN_ERR "capinc_tty_write: alloc_skb failed\n"); printk(KERN_ERR "capinc_tty_write: alloc_skb failed\n");
spin_unlock_bh(&mp->outlock); spin_unlock_bh(&mp->outlock);
...@@ -1111,7 +1111,7 @@ static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch) ...@@ -1111,7 +1111,7 @@ static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
invoke_send = true; invoke_send = true;
} }
skb = alloc_skb(CAPI_DATA_B3_REQ_LEN+CAPI_MAX_BLKSIZE, GFP_ATOMIC); skb = alloc_skb(CAPI_DATA_B3_REQ_LEN + CAPI_MAX_BLKSIZE, GFP_ATOMIC);
if (skb) { if (skb) {
skb_reserve(skb, CAPI_DATA_B3_REQ_LEN); skb_reserve(skb, CAPI_DATA_B3_REQ_LEN);
*(skb_put(skb, 1)) = ch; *(skb_put(skb, 1)) = ch;
...@@ -1175,12 +1175,12 @@ static int capinc_tty_chars_in_buffer(struct tty_struct *tty) ...@@ -1175,12 +1175,12 @@ static int capinc_tty_chars_in_buffer(struct tty_struct *tty)
} }
static int capinc_tty_ioctl(struct tty_struct *tty, static int capinc_tty_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
} }
static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old) static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
{ {
pr_debug("capinc_tty_set_termios\n"); pr_debug("capinc_tty_set_termios\n");
} }
...@@ -1344,18 +1344,18 @@ static inline void capinc_tty_exit(void) { } ...@@ -1344,18 +1344,18 @@ static inline void capinc_tty_exit(void) { }
*/ */
static int capi20_proc_show(struct seq_file *m, void *v) static int capi20_proc_show(struct seq_file *m, void *v)
{ {
struct capidev *cdev; struct capidev *cdev;
struct list_head *l; struct list_head *l;
mutex_lock(&capidev_list_lock); mutex_lock(&capidev_list_lock);
list_for_each(l, &capidev_list) { list_for_each(l, &capidev_list) {
cdev = list_entry(l, struct capidev, list); cdev = list_entry(l, struct capidev, list);
seq_printf(m, "0 %d %lu %lu %lu %lu\n", seq_printf(m, "0 %d %lu %lu %lu %lu\n",
cdev->ap.applid, cdev->ap.applid,
cdev->ap.nrecvctlpkt, cdev->ap.nrecvctlpkt,
cdev->ap.nrecvdatapkt, cdev->ap.nrecvdatapkt,
cdev->ap.nsentctlpkt, cdev->ap.nsentctlpkt,
cdev->ap.nsentdatapkt); cdev->ap.nsentdatapkt);
} }
mutex_unlock(&capidev_list_lock); mutex_unlock(&capidev_list_lock);
return 0; return 0;
...@@ -1450,9 +1450,9 @@ static int __init capi_init(void) ...@@ -1450,9 +1450,9 @@ static int __init capi_init(void)
proc_init(); proc_init();
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
compileinfo = " (middleware)"; compileinfo = " (middleware)";
#else #else
compileinfo = " (no middleware)"; compileinfo = " (no middleware)";
#endif #endif
printk(KERN_NOTICE "CAPI 2.0 started up with major %d%s\n", printk(KERN_NOTICE "CAPI 2.0 started up with major %d%s\n",
capi_major, compileinfo); capi_major, compileinfo);
......
此差异已折叠。
此差异已折叠。
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/isdn/capilli.h> #include <linux/isdn/capilli.h>
#define DBG(format, arg...) do { \ #define DBG(format, arg...) do { \
printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \ printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \
} while (0) } while (0)
struct capilib_msgidqueue { struct capilib_msgidqueue {
struct capilib_msgidqueue *next; struct capilib_msgidqueue *next;
...@@ -28,7 +28,7 @@ struct capilib_ncci { ...@@ -28,7 +28,7 @@ struct capilib_ncci {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// NCCI Handling // NCCI Handling
static inline void mq_init(struct capilib_ncci * np) static inline void mq_init(struct capilib_ncci *np)
{ {
u_int i; u_int i;
np->msgidqueue = NULL; np->msgidqueue = NULL;
...@@ -42,7 +42,7 @@ static inline void mq_init(struct capilib_ncci * np) ...@@ -42,7 +42,7 @@ static inline void mq_init(struct capilib_ncci * np)
} }
} }
static inline int mq_enqueue(struct capilib_ncci * np, u16 msgid) static inline int mq_enqueue(struct capilib_ncci *np, u16 msgid)
{ {
struct capilib_msgidqueue *mq; struct capilib_msgidqueue *mq;
if ((mq = np->msgidfree) == NULL) if ((mq = np->msgidfree) == NULL)
...@@ -59,7 +59,7 @@ static inline int mq_enqueue(struct capilib_ncci * np, u16 msgid) ...@@ -59,7 +59,7 @@ static inline int mq_enqueue(struct capilib_ncci * np, u16 msgid)
return 1; return 1;
} }
static inline int mq_dequeue(struct capilib_ncci * np, u16 msgid) static inline int mq_dequeue(struct capilib_ncci *np, u16 msgid)
{ {
struct capilib_msgidqueue **pp; struct capilib_msgidqueue **pp;
for (pp = &np->msgidqueue; *pp; pp = &(*pp)->next) { for (pp = &np->msgidqueue; *pp; pp = &(*pp)->next) {
...@@ -165,7 +165,7 @@ u16 capilib_data_b3_req(struct list_head *head, u16 applid, u32 ncci, u16 msgid) ...@@ -165,7 +165,7 @@ u16 capilib_data_b3_req(struct list_head *head, u16 applid, u32 ncci, u16 msgid)
continue; continue;
if (np->ncci != ncci) if (np->ncci != ncci)
continue; continue;
if (mq_enqueue(np, msgid) == 0) if (mq_enqueue(np, msgid) == 0)
return CAPI_SENDQUEUEFULL; return CAPI_SENDQUEUEFULL;
...@@ -188,7 +188,7 @@ void capilib_data_b3_conf(struct list_head *head, u16 applid, u32 ncci, u16 msgi ...@@ -188,7 +188,7 @@ void capilib_data_b3_conf(struct list_head *head, u16 applid, u32 ncci, u16 msgi
continue; continue;
if (np->ncci != ncci) if (np->ncci != ncci)
continue; continue;
if (mq_dequeue(np, msgid) == 0) { if (mq_dequeue(np, msgid) == 0) {
printk(KERN_ERR "kcapi: msgid %hu ncci 0x%x not on queue\n", printk(KERN_ERR "kcapi: msgid %hu ncci 0x%x not on queue\n",
msgid, ncci); msgid, ncci);
......
此差异已折叠。
此差异已折叠。
/* /*
* Kernel CAPI 2.0 Module * Kernel CAPI 2.0 Module
* *
* Copyright 1999 by Carsten Paeth <calle@calle.de> * Copyright 1999 by Carsten Paeth <calle@calle.de>
* Copyright 2002 by Kai Germaschewski <kai@germaschewski.name> * Copyright 2002 by Kai Germaschewski <kai@germaschewski.name>
* *
* This software may be used and distributed according to the terms * This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference. * of the GNU General Public License, incorporated herein by reference.
* *
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
#include <linux/isdn/capilli.h> #include <linux/isdn/capilli.h>
#ifdef KCAPI_DEBUG #ifdef KCAPI_DEBUG
#define DBG(format, arg...) do { \ #define DBG(format, arg...) do { \
printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \ printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \
} while (0) } while (0)
#else #else
#define DBG(format, arg...) /* */ #define DBG(format, arg...) /* */
#endif #endif
...@@ -49,4 +49,3 @@ static inline void kcapi_proc_init(void) { }; ...@@ -49,4 +49,3 @@ static inline void kcapi_proc_init(void) { };
static inline void kcapi_proc_exit(void) { }; static inline void kcapi_proc_exit(void) { };
#endif #endif
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册