aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/capi/capidrv.c1
-rw-r--r--drivers/isdn/capi/kcapi.c26
-rw-r--r--drivers/isdn/gigaset/capi.c1
-rw-r--r--drivers/isdn/hardware/mISDN/mISDNinfineon.c4
-rw-r--r--drivers/isdn/hardware/mISDN/mISDNisar.c2
-rw-r--r--drivers/isdn/hisax/avm_pci.c2
-rw-r--r--drivers/isdn/hisax/callc.c4
-rw-r--r--drivers/isdn/hisax/config.c2
-rw-r--r--drivers/isdn/hisax/hfc_2bds0.c4
-rw-r--r--drivers/isdn/hisax/hfc_2bs0.c2
-rw-r--r--drivers/isdn/hisax/hfc_pci.c4
-rw-r--r--drivers/isdn/hisax/hfc_sx.c6
-rw-r--r--drivers/isdn/hisax/hisax.h2
-rw-r--r--drivers/isdn/hisax/ipacx.c2
-rw-r--r--drivers/isdn/hisax/isar.c15
-rw-r--r--drivers/isdn/hisax/isdnl1.h1
-rw-r--r--drivers/isdn/hisax/isdnl3.c2
-rw-r--r--drivers/isdn/hisax/netjet.c10
-rw-r--r--drivers/isdn/hisax/st5481_d.c6
-rw-r--r--drivers/isdn/i4l/isdn_concap.c2
-rw-r--r--drivers/isdn/i4l/isdn_net.c20
-rw-r--r--drivers/isdn/i4l/isdn_ppp.c26
-rw-r--r--drivers/isdn/mISDN/hwchannel.c4
-rw-r--r--drivers/isdn/mISDN/l1oip_core.c2
-rw-r--r--drivers/isdn/mISDN/layer1.c10
-rw-r--r--drivers/isdn/mISDN/layer2.c12
-rw-r--r--drivers/isdn/mISDN/tei.c23
27 files changed, 117 insertions, 78 deletions
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c
index e54e79d4e2c1..92607ed25e2e 100644
--- a/drivers/isdn/capi/capidrv.c
+++ b/drivers/isdn/capi/capidrv.c
@@ -2297,6 +2297,7 @@ static int __init capidrv_init(void)
2297 2297
2298 errcode = capi20_get_profile(0, &profile); 2298 errcode = capi20_get_profile(0, &profile);
2299 if (errcode != CAPI_NOERROR) { 2299 if (errcode != CAPI_NOERROR) {
2300 unregister_capictr_notifier(&capictr_nb);
2300 capi20_release(&global.ap); 2301 capi20_release(&global.ap);
2301 return -EIO; 2302 return -EIO;
2302 } 2303 }
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c
index 3acf94cc5acd..2b33b2627fce 100644
--- a/drivers/isdn/capi/kcapi.c
+++ b/drivers/isdn/capi/kcapi.c
@@ -38,6 +38,7 @@
38#include <linux/rcupdate.h> 38#include <linux/rcupdate.h>
39 39
40static int showcapimsgs = 0; 40static int showcapimsgs = 0;
41static struct workqueue_struct *kcapi_wq;
41 42
42MODULE_DESCRIPTION("CAPI4Linux: kernel CAPI layer"); 43MODULE_DESCRIPTION("CAPI4Linux: kernel CAPI layer");
43MODULE_AUTHOR("Carsten Paeth"); 44MODULE_AUTHOR("Carsten Paeth");
@@ -291,7 +292,7 @@ static int notify_push(unsigned int event_type, u32 controller)
291 event->type = event_type; 292 event->type = event_type;
292 event->controller = controller; 293 event->controller = controller;
293 294
294 schedule_work(&event->work); 295 queue_work(kcapi_wq, &event->work);
295 return 0; 296 return 0;
296} 297}
297 298
@@ -408,7 +409,7 @@ void capi_ctr_handle_message(struct capi_ctr *ctr, u16 appl,
408 goto error; 409 goto error;
409 } 410 }
410 skb_queue_tail(&ap->recv_queue, skb); 411 skb_queue_tail(&ap->recv_queue, skb);
411 schedule_work(&ap->recv_work); 412 queue_work(kcapi_wq, &ap->recv_work);
412 rcu_read_unlock(); 413 rcu_read_unlock();
413 414
414 return; 415 return;
@@ -743,7 +744,7 @@ u16 capi20_release(struct capi20_appl *ap)
743 744
744 mutex_unlock(&capi_controller_lock); 745 mutex_unlock(&capi_controller_lock);
745 746
746 flush_scheduled_work(); 747 flush_workqueue(kcapi_wq);
747 skb_queue_purge(&ap->recv_queue); 748 skb_queue_purge(&ap->recv_queue);
748 749
749 if (showcapimsgs & 1) { 750 if (showcapimsgs & 1) {
@@ -1285,21 +1286,30 @@ static int __init kcapi_init(void)
1285{ 1286{
1286 int err; 1287 int err;
1287 1288
1289 kcapi_wq = alloc_workqueue("kcapi", 0, 0);
1290 if (!kcapi_wq)
1291 return -ENOMEM;
1292
1288 register_capictr_notifier(&capictr_nb); 1293 register_capictr_notifier(&capictr_nb);
1289 1294
1290 err = cdebug_init(); 1295 err = cdebug_init();
1291 if (!err) 1296 if (err) {
1292 kcapi_proc_init(); 1297 unregister_capictr_notifier(&capictr_nb);
1293 return err; 1298 destroy_workqueue(kcapi_wq);
1299 return err;
1300 }
1301
1302 kcapi_proc_init();
1303 return 0;
1294} 1304}
1295 1305
1296static void __exit kcapi_exit(void) 1306static void __exit kcapi_exit(void)
1297{ 1307{
1298 kcapi_proc_exit(); 1308 kcapi_proc_exit();
1299 1309
1300 /* make sure all notifiers are finished */ 1310 unregister_capictr_notifier(&capictr_nb);
1301 flush_scheduled_work();
1302 cdebug_exit(); 1311 cdebug_exit();
1312 destroy_workqueue(kcapi_wq);
1303} 1313}
1304 1314
1305module_init(kcapi_init); 1315module_init(kcapi_init);
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index bcc174e4f3b1..658e75f18d05 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -1900,6 +1900,7 @@ static void do_disconnect_req(struct gigaset_capi_ctr *iif,
1900 if (b3skb == NULL) { 1900 if (b3skb == NULL) {
1901 dev_err(cs->dev, "%s: out of memory\n", __func__); 1901 dev_err(cs->dev, "%s: out of memory\n", __func__);
1902 send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR); 1902 send_conf(iif, ap, skb, CAPI_MSGOSRESOURCEERR);
1903 kfree(b3cmsg);
1903 return; 1904 return;
1904 } 1905 }
1905 capi_cmsg2message(b3cmsg, 1906 capi_cmsg2message(b3cmsg,
diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
index e90db8870b6c..bc0529ac88a1 100644
--- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c
+++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
@@ -420,7 +420,7 @@ enable_hwirq(struct inf_hw *hw)
420 break; 420 break;
421 case INF_NICCY: 421 case INF_NICCY:
422 val = inl((u32)hw->cfg.start + NICCY_IRQ_CTRL_REG); 422 val = inl((u32)hw->cfg.start + NICCY_IRQ_CTRL_REG);
423 val |= NICCY_IRQ_ENABLE;; 423 val |= NICCY_IRQ_ENABLE;
424 outl(val, (u32)hw->cfg.start + NICCY_IRQ_CTRL_REG); 424 outl(val, (u32)hw->cfg.start + NICCY_IRQ_CTRL_REG);
425 break; 425 break;
426 case INF_SCT_1: 426 case INF_SCT_1:
@@ -924,7 +924,7 @@ setup_instance(struct inf_hw *card)
924 mISDNipac_init(&card->ipac, card); 924 mISDNipac_init(&card->ipac, card);
925 925
926 if (card->ipac.isac.dch.dev.Bprotocols == 0) 926 if (card->ipac.isac.dch.dev.Bprotocols == 0)
927 goto error_setup;; 927 goto error_setup;
928 928
929 err = mISDN_register_device(&card->ipac.isac.dch.dev, 929 err = mISDN_register_device(&card->ipac.isac.dch.dev,
930 &card->pdev->dev, card->name); 930 &card->pdev->dev, card->name);
diff --git a/drivers/isdn/hardware/mISDN/mISDNisar.c b/drivers/isdn/hardware/mISDN/mISDNisar.c
index 38eb31439a73..d13fa5b119f5 100644
--- a/drivers/isdn/hardware/mISDN/mISDNisar.c
+++ b/drivers/isdn/hardware/mISDN/mISDNisar.c
@@ -264,7 +264,7 @@ load_firmware(struct isar_hw *isar, const u8 *buf, int size)
264 while (noc) { 264 while (noc) {
265 val = le16_to_cpu(*sp++); 265 val = le16_to_cpu(*sp++);
266 *mp++ = val >> 8; 266 *mp++ = val >> 8;
267 *mp++ = val & 0xFF;; 267 *mp++ = val & 0xFF;
268 noc--; 268 noc--;
269 } 269 }
270 spin_lock_irqsave(isar->hwlock, flags); 270 spin_lock_irqsave(isar->hwlock, flags);
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c
index fcf4ed1cb4b9..0e66af1decd4 100644
--- a/drivers/isdn/hisax/avm_pci.c
+++ b/drivers/isdn/hisax/avm_pci.c
@@ -314,7 +314,7 @@ hdlc_fill_fifo(struct BCState *bcs)
314 bcs->hw.hdlc.ctrl.sr.cmd |= HDLC_CMD_XME; 314 bcs->hw.hdlc.ctrl.sr.cmd |= HDLC_CMD_XME;
315 } 315 }
316 if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO)) 316 if ((cs->debug & L1_DEB_HSCX) && !(cs->debug & L1_DEB_HSCX_FIFO))
317 debugl1(cs, "hdlc_fill_fifo %d/%ld", count, bcs->tx_skb->len); 317 debugl1(cs, "hdlc_fill_fifo %d/%u", count, bcs->tx_skb->len);
318 p = bcs->tx_skb->data; 318 p = bcs->tx_skb->data;
319 ptr = (u_int *)p; 319 ptr = (u_int *)p;
320 skb_pull(bcs->tx_skb, count); 320 skb_pull(bcs->tx_skb, count);
diff --git a/drivers/isdn/hisax/callc.c b/drivers/isdn/hisax/callc.c
index f150330b5a23..37e685eafd24 100644
--- a/drivers/isdn/hisax/callc.c
+++ b/drivers/isdn/hisax/callc.c
@@ -65,7 +65,7 @@ hisax_findcard(int driverid)
65 return (struct IsdnCardState *) 0; 65 return (struct IsdnCardState *) 0;
66} 66}
67 67
68static void 68static __attribute__((format(printf, 3, 4))) void
69link_debug(struct Channel *chanp, int direction, char *fmt, ...) 69link_debug(struct Channel *chanp, int direction, char *fmt, ...)
70{ 70{
71 va_list args; 71 va_list args;
@@ -1068,7 +1068,7 @@ init_d_st(struct Channel *chanp)
1068 return 0; 1068 return 0;
1069} 1069}
1070 1070
1071static void 1071static __attribute__((format(printf, 2, 3))) void
1072callc_debug(struct FsmInst *fi, char *fmt, ...) 1072callc_debug(struct FsmInst *fi, char *fmt, ...)
1073{ 1073{
1074 va_list args; 1074 va_list args;
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index b133378d4dc9..c110f8679bab 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -1917,7 +1917,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if)
1917#ifdef CONFIG_PCI 1917#ifdef CONFIG_PCI
1918#include <linux/pci.h> 1918#include <linux/pci.h>
1919 1919
1920static struct pci_device_id hisax_pci_tbl[] __devinitdata = { 1920static struct pci_device_id hisax_pci_tbl[] __devinitdata __used = {
1921#ifdef CONFIG_HISAX_FRITZPCI 1921#ifdef CONFIG_HISAX_FRITZPCI
1922 {PCI_VDEVICE(AVM, PCI_DEVICE_ID_AVM_A1) }, 1922 {PCI_VDEVICE(AVM, PCI_DEVICE_ID_AVM_A1) },
1923#endif 1923#endif
diff --git a/drivers/isdn/hisax/hfc_2bds0.c b/drivers/isdn/hisax/hfc_2bds0.c
index 7250f56a5246..a16459a1332c 100644
--- a/drivers/isdn/hisax/hfc_2bds0.c
+++ b/drivers/isdn/hisax/hfc_2bds0.c
@@ -292,7 +292,7 @@ hfc_fill_fifo(struct BCState *bcs)
292 } 292 }
293 count = GetFreeFifoBytes_B(bcs); 293 count = GetFreeFifoBytes_B(bcs);
294 if (cs->debug & L1_DEB_HSCX) 294 if (cs->debug & L1_DEB_HSCX)
295 debugl1(cs, "hfc_fill_fifo %d count(%ld/%d),%lx", 295 debugl1(cs, "hfc_fill_fifo %d count(%u/%d),%lx",
296 bcs->channel, bcs->tx_skb->len, 296 bcs->channel, bcs->tx_skb->len,
297 count, current->state); 297 count, current->state);
298 if (count < bcs->tx_skb->len) { 298 if (count < bcs->tx_skb->len) {
@@ -719,7 +719,7 @@ hfc_fill_dfifo(struct IsdnCardState *cs)
719 } 719 }
720 count = GetFreeFifoBytes_D(cs); 720 count = GetFreeFifoBytes_D(cs);
721 if (cs->debug & L1_DEB_ISAC) 721 if (cs->debug & L1_DEB_ISAC)
722 debugl1(cs, "hfc_fill_Dfifo count(%ld/%d)", 722 debugl1(cs, "hfc_fill_Dfifo count(%u/%d)",
723 cs->tx_skb->len, count); 723 cs->tx_skb->len, count);
724 if (count < cs->tx_skb->len) { 724 if (count < cs->tx_skb->len) {
725 if (cs->debug & L1_DEB_ISAC) 725 if (cs->debug & L1_DEB_ISAC)
diff --git a/drivers/isdn/hisax/hfc_2bs0.c b/drivers/isdn/hisax/hfc_2bs0.c
index b1f6481e1193..626f85df302b 100644
--- a/drivers/isdn/hisax/hfc_2bs0.c
+++ b/drivers/isdn/hisax/hfc_2bs0.c
@@ -282,7 +282,7 @@ hfc_fill_fifo(struct BCState *bcs)
282 count += cs->hw.hfc.fifosize; 282 count += cs->hw.hfc.fifosize;
283 } /* L1_MODE_TRANS */ 283 } /* L1_MODE_TRANS */
284 if (cs->debug & L1_DEB_HSCX) 284 if (cs->debug & L1_DEB_HSCX)
285 debugl1(cs, "hfc_fill_fifo %d count(%ld/%d)", 285 debugl1(cs, "hfc_fill_fifo %d count(%u/%d)",
286 bcs->channel, bcs->tx_skb->len, 286 bcs->channel, bcs->tx_skb->len,
287 count); 287 count);
288 if (count < bcs->tx_skb->len) { 288 if (count < bcs->tx_skb->len) {
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index 917cc84065bd..3147020d188b 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -550,7 +550,7 @@ hfcpci_fill_dfifo(struct IsdnCardState *cs)
550 count += D_FIFO_SIZE; /* count now contains available bytes */ 550 count += D_FIFO_SIZE; /* count now contains available bytes */
551 551
552 if (cs->debug & L1_DEB_ISAC) 552 if (cs->debug & L1_DEB_ISAC)
553 debugl1(cs, "hfcpci_fill_Dfifo count(%ld/%d)", 553 debugl1(cs, "hfcpci_fill_Dfifo count(%u/%d)",
554 cs->tx_skb->len, count); 554 cs->tx_skb->len, count);
555 if (count < cs->tx_skb->len) { 555 if (count < cs->tx_skb->len) {
556 if (cs->debug & L1_DEB_ISAC) 556 if (cs->debug & L1_DEB_ISAC)
@@ -681,7 +681,7 @@ hfcpci_fill_fifo(struct BCState *bcs)
681 count += B_FIFO_SIZE; /* count now contains available bytes */ 681 count += B_FIFO_SIZE; /* count now contains available bytes */
682 682
683 if (cs->debug & L1_DEB_HSCX) 683 if (cs->debug & L1_DEB_HSCX)
684 debugl1(cs, "hfcpci_fill_fifo %d count(%ld/%d),%lx", 684 debugl1(cs, "hfcpci_fill_fifo %d count(%u/%d),%lx",
685 bcs->channel, bcs->tx_skb->len, 685 bcs->channel, bcs->tx_skb->len,
686 count, current->state); 686 count, current->state);
687 687
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
index 5aa138eb0b3c..1235b7131ae1 100644
--- a/drivers/isdn/hisax/hfc_sx.c
+++ b/drivers/isdn/hisax/hfc_sx.c
@@ -179,7 +179,7 @@ write_fifo(struct IsdnCardState *cs, struct sk_buff *skb, u_char fifo, int trans
179 count += fifo_size; /* count now contains available bytes */ 179 count += fifo_size; /* count now contains available bytes */
180 180
181 if (cs->debug & L1_DEB_ISAC_FIFO) 181 if (cs->debug & L1_DEB_ISAC_FIFO)
182 debugl1(cs, "hfcsx_write_fifo %d count(%ld/%d)", 182 debugl1(cs, "hfcsx_write_fifo %d count(%u/%d)",
183 fifo, skb->len, count); 183 fifo, skb->len, count);
184 if (count < skb->len) { 184 if (count < skb->len) {
185 if (cs->debug & L1_DEB_ISAC_FIFO) 185 if (cs->debug & L1_DEB_ISAC_FIFO)
@@ -265,7 +265,7 @@ read_fifo(struct IsdnCardState *cs, u_char fifo, int trans_max)
265 count++; 265 count++;
266 266
267 if (cs->debug & L1_DEB_ISAC_FIFO) 267 if (cs->debug & L1_DEB_ISAC_FIFO)
268 debugl1(cs, "hfcsx_read_fifo %d count %ld)", 268 debugl1(cs, "hfcsx_read_fifo %d count %u)",
269 fifo, count); 269 fifo, count);
270 270
271 if ((count > fifo_size) || (count < 4)) { 271 if ((count > fifo_size) || (count < 4)) {
@@ -986,7 +986,7 @@ HFCSX_l1hw(struct PStack *st, int pr, void *arg)
986 default: 986 default:
987 spin_unlock_irqrestore(&cs->lock, flags); 987 spin_unlock_irqrestore(&cs->lock, flags);
988 if (cs->debug & L1_DEB_WARN) 988 if (cs->debug & L1_DEB_WARN)
989 debugl1(cs, "hfcsx_l1hw loop invalid %4lx", arg); 989 debugl1(cs, "hfcsx_l1hw loop invalid %4lx", (unsigned long)arg);
990 return; 990 return;
991 } 991 }
992 cs->hw.hfcsx.trm |= 0x80; /* enable IOM-loop */ 992 cs->hw.hfcsx.trm |= 0x80; /* enable IOM-loop */
diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
index 32ab3924aa73..de1c669c7b13 100644
--- a/drivers/isdn/hisax/hisax.h
+++ b/drivers/isdn/hisax/hisax.h
@@ -1286,7 +1286,9 @@ int jiftime(char *s, long mark);
1286 1286
1287int HiSax_command(isdn_ctrl * ic); 1287int HiSax_command(isdn_ctrl * ic);
1288int HiSax_writebuf_skb(int id, int chan, int ack, struct sk_buff *skb); 1288int HiSax_writebuf_skb(int id, int chan, int ack, struct sk_buff *skb);
1289__attribute__((format(printf, 3, 4)))
1289void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...); 1290void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...);
1291__attribute__((format(printf, 3, 0)))
1290void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args); 1292void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, va_list args);
1291void HiSax_reportcard(int cardnr, int sel); 1293void HiSax_reportcard(int cardnr, int sel);
1292int QuickHex(char *txt, u_char * p, int cnt); 1294int QuickHex(char *txt, u_char * p, int cnt);
diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c
index 751b25f2ff58..332104103e18 100644
--- a/drivers/isdn/hisax/ipacx.c
+++ b/drivers/isdn/hisax/ipacx.c
@@ -717,7 +717,7 @@ bch_mode(struct BCState *bcs, int mode, int bc)
717 717
718 bc = bc ? 1 : 0; // in case bc is greater than 1 718 bc = bc ? 1 : 0; // in case bc is greater than 1
719 if (cs->debug & L1_DEB_HSCX) 719 if (cs->debug & L1_DEB_HSCX)
720 debugl1(cs, "mode_bch() switch B-% mode %d chan %d", hscx, mode, bc); 720 debugl1(cs, "mode_bch() switch B-%d mode %d chan %d", hscx, mode, bc);
721 bcs->mode = mode; 721 bcs->mode = mode;
722 bcs->channel = bc; 722 bcs->channel = bc;
723 723
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index 2e72227bd071..d4cce337add2 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -189,7 +189,7 @@ ISARVersion(struct IsdnCardState *cs, char *s)
189static int 189static int
190isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf) 190isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf)
191{ 191{
192 int ret, size, cnt, debug; 192 int cfu_ret, ret, size, cnt, debug;
193 u_char len, nom, noc; 193 u_char len, nom, noc;
194 u_short sadr, left, *sp; 194 u_short sadr, left, *sp;
195 u_char __user *p = buf; 195 u_char __user *p = buf;
@@ -212,9 +212,10 @@ isar_load_firmware(struct IsdnCardState *cs, u_char __user *buf)
212 cs->debug &= ~(L1_DEB_HSCX | L1_DEB_HSCX_FIFO); 212 cs->debug &= ~(L1_DEB_HSCX | L1_DEB_HSCX_FIFO);
213#endif 213#endif
214 214
215 if ((ret = copy_from_user(&size, p, sizeof(int)))) { 215 cfu_ret = copy_from_user(&size, p, sizeof(int));
216 printk(KERN_ERR"isar_load_firmware copy_from_user ret %d\n", ret); 216 if (cfu_ret) {
217 return ret; 217 printk(KERN_ERR"isar_load_firmware copy_from_user ret %d\n", cfu_ret);
218 return -EFAULT;
218 } 219 }
219 p += sizeof(int); 220 p += sizeof(int);
220 printk(KERN_DEBUG"isar_load_firmware size: %d\n", size); 221 printk(KERN_DEBUG"isar_load_firmware size: %d\n", size);
@@ -953,7 +954,7 @@ isar_pump_statev_modem(struct BCState *bcs, u_char devt) {
953 break; 954 break;
954 case PSEV_GSTN_CLR: 955 case PSEV_GSTN_CLR:
955 if (cs->debug & L1_DEB_HSCX) 956 if (cs->debug & L1_DEB_HSCX)
956 debugl1(cs, "pump stev GSTN CLEAR", devt); 957 debugl1(cs, "pump stev GSTN CLEAR");
957 break; 958 break;
958 default: 959 default:
959 if (cs->debug & L1_DEB_HSCX) 960 if (cs->debug & L1_DEB_HSCX)
@@ -1268,7 +1269,7 @@ isar_int_main(struct IsdnCardState *cs)
1268static void 1269static void
1269ftimer_handler(struct BCState *bcs) { 1270ftimer_handler(struct BCState *bcs) {
1270 if (bcs->cs->debug) 1271 if (bcs->cs->debug)
1271 debugl1(bcs->cs, "ftimer flags %04x", 1272 debugl1(bcs->cs, "ftimer flags %04lx",
1272 bcs->Flag); 1273 bcs->Flag);
1273 test_and_clear_bit(BC_FLG_FTI_RUN, &bcs->Flag); 1274 test_and_clear_bit(BC_FLG_FTI_RUN, &bcs->Flag);
1274 if (test_and_clear_bit(BC_FLG_LL_CONN, &bcs->Flag)) { 1275 if (test_and_clear_bit(BC_FLG_LL_CONN, &bcs->Flag)) {
@@ -1748,7 +1749,7 @@ isar_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) {
1748 struct BCState *bcs; 1749 struct BCState *bcs;
1749 1750
1750 if (cs->debug & L1_DEB_HSCX) 1751 if (cs->debug & L1_DEB_HSCX)
1751 debugl1(cs, "isar_auxcmd cmd/ch %x/%d", ic->command, ic->arg); 1752 debugl1(cs, "isar_auxcmd cmd/ch %x/%ld", ic->command, ic->arg);
1752 switch (ic->command) { 1753 switch (ic->command) {
1753 case (ISDN_CMD_FAXCMD): 1754 case (ISDN_CMD_FAXCMD):
1754 bcs = cs->channel[ic->arg].bcs; 1755 bcs = cs->channel[ic->arg].bcs;
diff --git a/drivers/isdn/hisax/isdnl1.h b/drivers/isdn/hisax/isdnl1.h
index 172ad4c8c961..425d86116f2b 100644
--- a/drivers/isdn/hisax/isdnl1.h
+++ b/drivers/isdn/hisax/isdnl1.h
@@ -21,6 +21,7 @@
21#define B_XMTBUFREADY 1 21#define B_XMTBUFREADY 1
22#define B_ACKPENDING 2 22#define B_ACKPENDING 2
23 23
24__attribute__((format(printf, 2, 3)))
24void debugl1(struct IsdnCardState *cs, char *fmt, ...); 25void debugl1(struct IsdnCardState *cs, char *fmt, ...);
25void DChannel_proc_xmt(struct IsdnCardState *cs); 26void DChannel_proc_xmt(struct IsdnCardState *cs);
26void DChannel_proc_rcv(struct IsdnCardState *cs); 27void DChannel_proc_rcv(struct IsdnCardState *cs);
diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c
index fd0b643ab740..ad291f21b201 100644
--- a/drivers/isdn/hisax/isdnl3.c
+++ b/drivers/isdn/hisax/isdnl3.c
@@ -66,7 +66,7 @@ static char *strL3Event[] =
66 "EV_TIMEOUT", 66 "EV_TIMEOUT",
67}; 67};
68 68
69static void 69static __attribute__((format(printf, 2, 3))) void
70l3m_debug(struct FsmInst *fi, char *fmt, ...) 70l3m_debug(struct FsmInst *fi, char *fmt, ...)
71{ 71{
72 va_list args; 72 va_list args;
diff --git a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c
index 5d7f0f2ff9b9..644891efc26f 100644
--- a/drivers/isdn/hisax/netjet.c
+++ b/drivers/isdn/hisax/netjet.c
@@ -254,7 +254,7 @@ static int make_raw_data(struct BCState *bcs) {
254 val >>= 1; 254 val >>= 1;
255 } 255 }
256 if (bcs->cs->debug & L1_DEB_HSCX) 256 if (bcs->cs->debug & L1_DEB_HSCX)
257 debugl1(bcs->cs,"tiger make_raw: in %ld out %d.%d", 257 debugl1(bcs->cs,"tiger make_raw: in %u out %d.%d",
258 bcs->tx_skb->len, s_cnt, bitcnt); 258 bcs->tx_skb->len, s_cnt, bitcnt);
259 if (bitcnt) { 259 if (bitcnt) {
260 while (8>bitcnt++) { 260 while (8>bitcnt++) {
@@ -361,7 +361,7 @@ static int make_raw_data_56k(struct BCState *bcs) {
361 val >>= 1; 361 val >>= 1;
362 } 362 }
363 if (bcs->cs->debug & L1_DEB_HSCX) 363 if (bcs->cs->debug & L1_DEB_HSCX)
364 debugl1(bcs->cs,"tiger make_raw_56k: in %ld out %d.%d", 364 debugl1(bcs->cs,"tiger make_raw_56k: in %u out %d.%d",
365 bcs->tx_skb->len, s_cnt, bitcnt); 365 bcs->tx_skb->len, s_cnt, bitcnt);
366 if (bitcnt) { 366 if (bitcnt) {
367 while (8>bitcnt++) { 367 while (8>bitcnt++) {
@@ -612,7 +612,7 @@ void netjet_fill_dma(struct BCState *bcs)
612 if (!bcs->tx_skb) 612 if (!bcs->tx_skb)
613 return; 613 return;
614 if (bcs->cs->debug & L1_DEB_HSCX) 614 if (bcs->cs->debug & L1_DEB_HSCX)
615 debugl1(bcs->cs,"tiger fill_dma1: c%d %4x", bcs->channel, 615 debugl1(bcs->cs,"tiger fill_dma1: c%d %4lx", bcs->channel,
616 bcs->Flag); 616 bcs->Flag);
617 if (test_and_set_bit(BC_FLG_BUSY, &bcs->Flag)) 617 if (test_and_set_bit(BC_FLG_BUSY, &bcs->Flag))
618 return; 618 return;
@@ -625,7 +625,7 @@ void netjet_fill_dma(struct BCState *bcs)
625 return; 625 return;
626 }; 626 };
627 if (bcs->cs->debug & L1_DEB_HSCX) 627 if (bcs->cs->debug & L1_DEB_HSCX)
628 debugl1(bcs->cs,"tiger fill_dma2: c%d %4x", bcs->channel, 628 debugl1(bcs->cs,"tiger fill_dma2: c%d %4lx", bcs->channel,
629 bcs->Flag); 629 bcs->Flag);
630 if (test_and_clear_bit(BC_FLG_NOFRAME, &bcs->Flag)) { 630 if (test_and_clear_bit(BC_FLG_NOFRAME, &bcs->Flag)) {
631 write_raw(bcs, bcs->hw.tiger.sendp, bcs->hw.tiger.free); 631 write_raw(bcs, bcs->hw.tiger.sendp, bcs->hw.tiger.free);
@@ -667,7 +667,7 @@ void netjet_fill_dma(struct BCState *bcs)
667 write_raw(bcs, p, cnt); 667 write_raw(bcs, p, cnt);
668 } 668 }
669 if (bcs->cs->debug & L1_DEB_HSCX) 669 if (bcs->cs->debug & L1_DEB_HSCX)
670 debugl1(bcs->cs,"tiger fill_dma3: c%d %4x", bcs->channel, 670 debugl1(bcs->cs,"tiger fill_dma3: c%d %4lx", bcs->channel,
671 bcs->Flag); 671 bcs->Flag);
672} 672}
673 673
diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c
index b7876b19fe73..44082637a09f 100644
--- a/drivers/isdn/hisax/st5481_d.c
+++ b/drivers/isdn/hisax/st5481_d.c
@@ -167,7 +167,8 @@ static struct FsmNode L1FnList[] __initdata =
167 {ST_L1_F8, EV_IND_RSY, l1_ignore}, 167 {ST_L1_F8, EV_IND_RSY, l1_ignore},
168}; 168};
169 169
170static void l1m_debug(struct FsmInst *fi, char *fmt, ...) 170static __attribute__((format(printf, 2, 3)))
171void l1m_debug(struct FsmInst *fi, char *fmt, ...)
171{ 172{
172 va_list args; 173 va_list args;
173 char buf[256]; 174 char buf[256];
@@ -269,7 +270,8 @@ static char *strDoutEvent[] =
269 "EV_DOUT_UNDERRUN", 270 "EV_DOUT_UNDERRUN",
270}; 271};
271 272
272static void dout_debug(struct FsmInst *fi, char *fmt, ...) 273static __attribute__((format(printf, 2, 3)))
274void dout_debug(struct FsmInst *fi, char *fmt, ...)
273{ 275{
274 va_list args; 276 va_list args;
275 char buf[256]; 277 char buf[256];
diff --git a/drivers/isdn/i4l/isdn_concap.c b/drivers/isdn/i4l/isdn_concap.c
index 46048e55f241..d568689669f8 100644
--- a/drivers/isdn/i4l/isdn_concap.c
+++ b/drivers/isdn/i4l/isdn_concap.c
@@ -61,7 +61,7 @@ static int isdn_concap_dl_data_req(struct concap_proto *concap, struct sk_buff *
61static int isdn_concap_dl_connect_req(struct concap_proto *concap) 61static int isdn_concap_dl_connect_req(struct concap_proto *concap)
62{ 62{
63 struct net_device *ndev = concap -> net_dev; 63 struct net_device *ndev = concap -> net_dev;
64 isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); 64 isdn_net_local *lp = netdev_priv(ndev);
65 int ret; 65 int ret;
66 IX25DEBUG( "isdn_concap_dl_connect_req: %s \n", ndev -> name); 66 IX25DEBUG( "isdn_concap_dl_connect_req: %s \n", ndev -> name);
67 67
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index 26d44c3ca1d8..afeede7ee295 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -827,7 +827,7 @@ isdn_net_dial(void)
827void 827void
828isdn_net_hangup(struct net_device *d) 828isdn_net_hangup(struct net_device *d)
829{ 829{
830 isdn_net_local *lp = (isdn_net_local *) netdev_priv(d); 830 isdn_net_local *lp = netdev_priv(d);
831 isdn_ctrl cmd; 831 isdn_ctrl cmd;
832#ifdef CONFIG_ISDN_X25 832#ifdef CONFIG_ISDN_X25
833 struct concap_proto *cprot = lp->netdev->cprot; 833 struct concap_proto *cprot = lp->netdev->cprot;
@@ -1052,7 +1052,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
1052{ 1052{
1053 isdn_net_dev *nd; 1053 isdn_net_dev *nd;
1054 isdn_net_local *slp; 1054 isdn_net_local *slp;
1055 isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); 1055 isdn_net_local *lp = netdev_priv(ndev);
1056 int retv = NETDEV_TX_OK; 1056 int retv = NETDEV_TX_OK;
1057 1057
1058 if (((isdn_net_local *) netdev_priv(ndev))->master) { 1058 if (((isdn_net_local *) netdev_priv(ndev))->master) {
@@ -1116,7 +1116,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
1116static void 1116static void
1117isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev) 1117isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev)
1118{ 1118{
1119 isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); 1119 isdn_net_local *lp = netdev_priv(dev);
1120 if (!skb) 1120 if (!skb)
1121 return; 1121 return;
1122 if (lp->p_encap == ISDN_NET_ENCAP_ETHER) { 1122 if (lp->p_encap == ISDN_NET_ENCAP_ETHER) {
@@ -1131,7 +1131,7 @@ isdn_net_adjust_hdr(struct sk_buff *skb, struct net_device *dev)
1131 1131
1132static void isdn_net_tx_timeout(struct net_device * ndev) 1132static void isdn_net_tx_timeout(struct net_device * ndev)
1133{ 1133{
1134 isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); 1134 isdn_net_local *lp = netdev_priv(ndev);
1135 1135
1136 printk(KERN_WARNING "isdn_tx_timeout dev %s dialstate %d\n", ndev->name, lp->dialstate); 1136 printk(KERN_WARNING "isdn_tx_timeout dev %s dialstate %d\n", ndev->name, lp->dialstate);
1137 if (!lp->dialstate){ 1137 if (!lp->dialstate){
@@ -1165,7 +1165,7 @@ static void isdn_net_tx_timeout(struct net_device * ndev)
1165static netdev_tx_t 1165static netdev_tx_t
1166isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev) 1166isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
1167{ 1167{
1168 isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); 1168 isdn_net_local *lp = netdev_priv(ndev);
1169#ifdef CONFIG_ISDN_X25 1169#ifdef CONFIG_ISDN_X25
1170 struct concap_proto * cprot = lp -> netdev -> cprot; 1170 struct concap_proto * cprot = lp -> netdev -> cprot;
1171/* At this point hard_start_xmit() passes control to the encapsulation 1171/* At this point hard_start_xmit() passes control to the encapsulation
@@ -1347,7 +1347,7 @@ isdn_net_close(struct net_device *dev)
1347static struct net_device_stats * 1347static struct net_device_stats *
1348isdn_net_get_stats(struct net_device *dev) 1348isdn_net_get_stats(struct net_device *dev)
1349{ 1349{
1350 isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); 1350 isdn_net_local *lp = netdev_priv(dev);
1351 return &lp->stats; 1351 return &lp->stats;
1352} 1352}
1353 1353
@@ -1426,7 +1426,7 @@ isdn_net_ciscohdlck_alloc_skb(isdn_net_local *lp, int len)
1426static int 1426static int
1427isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 1427isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1428{ 1428{
1429 isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); 1429 isdn_net_local *lp = netdev_priv(dev);
1430 unsigned long len = 0; 1430 unsigned long len = 0;
1431 unsigned long expires = 0; 1431 unsigned long expires = 0;
1432 int tmp = 0; 1432 int tmp = 0;
@@ -1493,7 +1493,7 @@ isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1493static int isdn_net_ioctl(struct net_device *dev, 1493static int isdn_net_ioctl(struct net_device *dev,
1494 struct ifreq *ifr, int cmd) 1494 struct ifreq *ifr, int cmd)
1495{ 1495{
1496 isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); 1496 isdn_net_local *lp = netdev_priv(dev);
1497 1497
1498 switch (lp->p_encap) { 1498 switch (lp->p_encap) {
1499#ifdef CONFIG_ISDN_PPP 1499#ifdef CONFIG_ISDN_PPP
@@ -1786,7 +1786,7 @@ isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb)
1786static void 1786static void
1787isdn_net_receive(struct net_device *ndev, struct sk_buff *skb) 1787isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
1788{ 1788{
1789 isdn_net_local *lp = (isdn_net_local *) netdev_priv(ndev); 1789 isdn_net_local *lp = netdev_priv(ndev);
1790 isdn_net_local *olp = lp; /* original 'lp' */ 1790 isdn_net_local *olp = lp; /* original 'lp' */
1791#ifdef CONFIG_ISDN_X25 1791#ifdef CONFIG_ISDN_X25
1792 struct concap_proto *cprot = lp -> netdev -> cprot; 1792 struct concap_proto *cprot = lp -> netdev -> cprot;
@@ -1800,7 +1800,7 @@ isdn_net_receive(struct net_device *ndev, struct sk_buff *skb)
1800 * handle master's statistics and hangup-timeout 1800 * handle master's statistics and hangup-timeout
1801 */ 1801 */
1802 ndev = lp->master; 1802 ndev = lp->master;
1803 lp = (isdn_net_local *) netdev_priv(ndev); 1803 lp = netdev_priv(ndev);
1804 lp->stats.rx_packets++; 1804 lp->stats.rx_packets++;
1805 lp->stats.rx_bytes += skb->len; 1805 lp->stats.rx_bytes += skb->len;
1806 } 1806 }
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index fe824e0cbb25..9e8162c80bb0 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -1147,15 +1147,14 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
1147 } 1147 }
1148 1148
1149 if (is->pass_filter 1149 if (is->pass_filter
1150 && sk_run_filter(skb, is->pass_filter, is->pass_len) == 0) { 1150 && sk_run_filter(skb, is->pass_filter) == 0) {
1151 if (is->debug & 0x2) 1151 if (is->debug & 0x2)
1152 printk(KERN_DEBUG "IPPP: inbound frame filtered.\n"); 1152 printk(KERN_DEBUG "IPPP: inbound frame filtered.\n");
1153 kfree_skb(skb); 1153 kfree_skb(skb);
1154 return; 1154 return;
1155 } 1155 }
1156 if (!(is->active_filter 1156 if (!(is->active_filter
1157 && sk_run_filter(skb, is->active_filter, 1157 && sk_run_filter(skb, is->active_filter) == 0)) {
1158 is->active_len) == 0)) {
1159 if (is->debug & 0x2) 1158 if (is->debug & 0x2)
1160 printk(KERN_DEBUG "IPPP: link-active filter: reseting huptimer.\n"); 1159 printk(KERN_DEBUG "IPPP: link-active filter: reseting huptimer.\n");
1161 lp->huptimer = 0; 1160 lp->huptimer = 0;
@@ -1221,7 +1220,7 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev)
1221 struct ippp_struct *ipt,*ipts; 1220 struct ippp_struct *ipt,*ipts;
1222 int slot, retval = NETDEV_TX_OK; 1221 int slot, retval = NETDEV_TX_OK;
1223 1222
1224 mlp = (isdn_net_local *) netdev_priv(netdev); 1223 mlp = netdev_priv(netdev);
1225 nd = mlp->netdev; /* get master lp */ 1224 nd = mlp->netdev; /* get master lp */
1226 1225
1227 slot = mlp->ppp_slot; 1226 slot = mlp->ppp_slot;
@@ -1294,15 +1293,14 @@ isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev)
1294 } 1293 }
1295 1294
1296 if (ipt->pass_filter 1295 if (ipt->pass_filter
1297 && sk_run_filter(skb, ipt->pass_filter, ipt->pass_len) == 0) { 1296 && sk_run_filter(skb, ipt->pass_filter) == 0) {
1298 if (ipt->debug & 0x4) 1297 if (ipt->debug & 0x4)
1299 printk(KERN_DEBUG "IPPP: outbound frame filtered.\n"); 1298 printk(KERN_DEBUG "IPPP: outbound frame filtered.\n");
1300 kfree_skb(skb); 1299 kfree_skb(skb);
1301 goto unlock; 1300 goto unlock;
1302 } 1301 }
1303 if (!(ipt->active_filter 1302 if (!(ipt->active_filter
1304 && sk_run_filter(skb, ipt->active_filter, 1303 && sk_run_filter(skb, ipt->active_filter) == 0)) {
1305 ipt->active_len) == 0)) {
1306 if (ipt->debug & 0x4) 1304 if (ipt->debug & 0x4)
1307 printk(KERN_DEBUG "IPPP: link-active filter: reseting huptimer.\n"); 1305 printk(KERN_DEBUG "IPPP: link-active filter: reseting huptimer.\n");
1308 lp->huptimer = 0; 1306 lp->huptimer = 0;
@@ -1492,9 +1490,9 @@ int isdn_ppp_autodial_filter(struct sk_buff *skb, isdn_net_local *lp)
1492 } 1490 }
1493 1491
1494 drop |= is->pass_filter 1492 drop |= is->pass_filter
1495 && sk_run_filter(skb, is->pass_filter, is->pass_len) == 0; 1493 && sk_run_filter(skb, is->pass_filter) == 0;
1496 drop |= is->active_filter 1494 drop |= is->active_filter
1497 && sk_run_filter(skb, is->active_filter, is->active_len) == 0; 1495 && sk_run_filter(skb, is->active_filter) == 0;
1498 1496
1499 skb_push(skb, IPPP_MAX_HEADER - 4); 1497 skb_push(skb, IPPP_MAX_HEADER - 4);
1500 return drop; 1498 return drop;
@@ -1985,7 +1983,7 @@ isdn_ppp_dev_ioctl_stats(int slot, struct ifreq *ifr, struct net_device *dev)
1985{ 1983{
1986 struct ppp_stats __user *res = ifr->ifr_data; 1984 struct ppp_stats __user *res = ifr->ifr_data;
1987 struct ppp_stats t; 1985 struct ppp_stats t;
1988 isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); 1986 isdn_net_local *lp = netdev_priv(dev);
1989 1987
1990 if (!access_ok(VERIFY_WRITE, res, sizeof(struct ppp_stats))) 1988 if (!access_ok(VERIFY_WRITE, res, sizeof(struct ppp_stats)))
1991 return -EFAULT; 1989 return -EFAULT;
@@ -2024,7 +2022,7 @@ isdn_ppp_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
2024{ 2022{
2025 int error=0; 2023 int error=0;
2026 int len; 2024 int len;
2027 isdn_net_local *lp = (isdn_net_local *) netdev_priv(dev); 2025 isdn_net_local *lp = netdev_priv(dev);
2028 2026
2029 2027
2030 if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP) 2028 if (lp->p_encap != ISDN_NET_ENCAP_SYNCPPP)
@@ -2091,7 +2089,7 @@ isdn_ppp_dial_slave(char *name)
2091 2089
2092 sdev = lp->slave; 2090 sdev = lp->slave;
2093 while (sdev) { 2091 while (sdev) {
2094 isdn_net_local *mlp = (isdn_net_local *) netdev_priv(sdev); 2092 isdn_net_local *mlp = netdev_priv(sdev);
2095 if (!(mlp->flags & ISDN_NET_CONNECTED)) 2093 if (!(mlp->flags & ISDN_NET_CONNECTED))
2096 break; 2094 break;
2097 sdev = mlp->slave; 2095 sdev = mlp->slave;
@@ -2099,7 +2097,7 @@ isdn_ppp_dial_slave(char *name)
2099 if (!sdev) 2097 if (!sdev)
2100 return 2; 2098 return 2;
2101 2099
2102 isdn_net_dial_req((isdn_net_local *) netdev_priv(sdev)); 2100 isdn_net_dial_req(netdev_priv(sdev));
2103 return 0; 2101 return 0;
2104#else 2102#else
2105 return -1; 2103 return -1;
@@ -2122,7 +2120,7 @@ isdn_ppp_hangup_slave(char *name)
2122 2120
2123 sdev = lp->slave; 2121 sdev = lp->slave;
2124 while (sdev) { 2122 while (sdev) {
2125 isdn_net_local *mlp = (isdn_net_local *) netdev_priv(sdev); 2123 isdn_net_local *mlp = netdev_priv(sdev);
2126 2124
2127 if (mlp->slave) { /* find last connected link in chain */ 2125 if (mlp->slave) { /* find last connected link in chain */
2128 isdn_net_local *nlp = ISDN_SLAVE_PRIV(mlp); 2126 isdn_net_local *nlp = ISDN_SLAVE_PRIV(mlp);
diff --git a/drivers/isdn/mISDN/hwchannel.c b/drivers/isdn/mISDN/hwchannel.c
index 307bd6e8988b..199f374cf9da 100644
--- a/drivers/isdn/mISDN/hwchannel.c
+++ b/drivers/isdn/mISDN/hwchannel.c
@@ -110,7 +110,7 @@ mISDN_freedchannel(struct dchannel *ch)
110 } 110 }
111 skb_queue_purge(&ch->squeue); 111 skb_queue_purge(&ch->squeue);
112 skb_queue_purge(&ch->rqueue); 112 skb_queue_purge(&ch->rqueue);
113 flush_scheduled_work(); 113 flush_work_sync(&ch->workq);
114 return 0; 114 return 0;
115} 115}
116EXPORT_SYMBOL(mISDN_freedchannel); 116EXPORT_SYMBOL(mISDN_freedchannel);
@@ -143,7 +143,7 @@ mISDN_freebchannel(struct bchannel *ch)
143 mISDN_clear_bchannel(ch); 143 mISDN_clear_bchannel(ch);
144 skb_queue_purge(&ch->rqueue); 144 skb_queue_purge(&ch->rqueue);
145 ch->rcount = 0; 145 ch->rcount = 0;
146 flush_scheduled_work(); 146 flush_work_sync(&ch->workq);
147 return 0; 147 return 0;
148} 148}
149EXPORT_SYMBOL(mISDN_freebchannel); 149EXPORT_SYMBOL(mISDN_freebchannel);
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c
index 5b59796ed250..bd526f664a39 100644
--- a/drivers/isdn/mISDN/l1oip_core.c
+++ b/drivers/isdn/mISDN/l1oip_core.c
@@ -1269,6 +1269,8 @@ release_card(struct l1oip *hc)
1269 if (timer_pending(&hc->timeout_tl)) 1269 if (timer_pending(&hc->timeout_tl))
1270 del_timer(&hc->timeout_tl); 1270 del_timer(&hc->timeout_tl);
1271 1271
1272 cancel_work_sync(&hc->workq);
1273
1272 if (hc->socket_thread) 1274 if (hc->socket_thread)
1273 l1oip_socket_close(hc); 1275 l1oip_socket_close(hc);
1274 1276
diff --git a/drivers/isdn/mISDN/layer1.c b/drivers/isdn/mISDN/layer1.c
index ac4aa18c632b..5cc7c001c523 100644
--- a/drivers/isdn/mISDN/layer1.c
+++ b/drivers/isdn/mISDN/layer1.c
@@ -99,12 +99,16 @@ static void
99l1m_debug(struct FsmInst *fi, char *fmt, ...) 99l1m_debug(struct FsmInst *fi, char *fmt, ...)
100{ 100{
101 struct layer1 *l1 = fi->userdata; 101 struct layer1 *l1 = fi->userdata;
102 struct va_format vaf;
102 va_list va; 103 va_list va;
103 104
104 va_start(va, fmt); 105 va_start(va, fmt);
105 printk(KERN_DEBUG "%s: ", dev_name(&l1->dch->dev.dev)); 106
106 vprintk(fmt, va); 107 vaf.fmt = fmt;
107 printk("\n"); 108 vaf.va = &va;
109
110 printk(KERN_DEBUG "%s: %pV\n", dev_name(&l1->dch->dev.dev), &vaf);
111
108 va_end(va); 112 va_end(va);
109} 113}
110 114
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c
index c97371788764..4ae75053c9d2 100644
--- a/drivers/isdn/mISDN/layer2.c
+++ b/drivers/isdn/mISDN/layer2.c
@@ -95,14 +95,20 @@ static void
95l2m_debug(struct FsmInst *fi, char *fmt, ...) 95l2m_debug(struct FsmInst *fi, char *fmt, ...)
96{ 96{
97 struct layer2 *l2 = fi->userdata; 97 struct layer2 *l2 = fi->userdata;
98 struct va_format vaf;
98 va_list va; 99 va_list va;
99 100
100 if (!(*debug & DEBUG_L2_FSM)) 101 if (!(*debug & DEBUG_L2_FSM))
101 return; 102 return;
103
102 va_start(va, fmt); 104 va_start(va, fmt);
103 printk(KERN_DEBUG "l2 (sapi %d tei %d): ", l2->sapi, l2->tei); 105
104 vprintk(fmt, va); 106 vaf.fmt = fmt;
105 printk("\n"); 107 vaf.va = &va;
108
109 printk(KERN_DEBUG "l2 (sapi %d tei %d): %pV\n",
110 l2->sapi, l2->tei, &vaf);
111
106 va_end(va); 112 va_end(va);
107} 113}
108 114
diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c
index 1b85d9d27496..687c9b6264ab 100644
--- a/drivers/isdn/mISDN/tei.c
+++ b/drivers/isdn/mISDN/tei.c
@@ -79,14 +79,19 @@ static void
79da_debug(struct FsmInst *fi, char *fmt, ...) 79da_debug(struct FsmInst *fi, char *fmt, ...)
80{ 80{
81 struct manager *mgr = fi->userdata; 81 struct manager *mgr = fi->userdata;
82 struct va_format vaf;
82 va_list va; 83 va_list va;
83 84
84 if (!(*debug & DEBUG_L2_TEIFSM)) 85 if (!(*debug & DEBUG_L2_TEIFSM))
85 return; 86 return;
87
86 va_start(va, fmt); 88 va_start(va, fmt);
87 printk(KERN_DEBUG "mgr(%d): ", mgr->ch.st->dev->id); 89
88 vprintk(fmt, va); 90 vaf.fmt = fmt;
89 printk("\n"); 91 vaf.va = &va;
92
93 printk(KERN_DEBUG "mgr(%d): %pV\n", mgr->ch.st->dev->id, &vaf);
94
90 va_end(va); 95 va_end(va);
91} 96}
92 97
@@ -223,14 +228,20 @@ static void
223tei_debug(struct FsmInst *fi, char *fmt, ...) 228tei_debug(struct FsmInst *fi, char *fmt, ...)
224{ 229{
225 struct teimgr *tm = fi->userdata; 230 struct teimgr *tm = fi->userdata;
231 struct va_format vaf;
226 va_list va; 232 va_list va;
227 233
228 if (!(*debug & DEBUG_L2_TEIFSM)) 234 if (!(*debug & DEBUG_L2_TEIFSM))
229 return; 235 return;
236
230 va_start(va, fmt); 237 va_start(va, fmt);
231 printk(KERN_DEBUG "sapi(%d) tei(%d): ", tm->l2->sapi, tm->l2->tei); 238
232 vprintk(fmt, va); 239 vaf.fmt = fmt;
233 printk("\n"); 240 vaf.va = &va;
241
242 printk(KERN_DEBUG "sapi(%d) tei(%d): %pV\n",
243 tm->l2->sapi, tm->l2->tei, &vaf);
244
234 va_end(va); 245 va_end(va);
235} 246}
236 247