diff options
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/divert/divert_procfs.c | 6 | ||||
-rw-r--r-- | drivers/isdn/hardware/eicon/diva_didd.c | 6 | ||||
-rw-r--r-- | drivers/isdn/hardware/eicon/divasproc.c | 2 | ||||
-rw-r--r-- | drivers/isdn/hisax/hfc_pci.c | 1 | ||||
-rw-r--r-- | drivers/isdn/hisax/st5481.h | 4 | ||||
-rw-r--r-- | drivers/isdn/hisax/st5481_b.c | 20 | ||||
-rw-r--r-- | drivers/isdn/hisax/st5481_d.c | 26 | ||||
-rw-r--r-- | drivers/isdn/hisax/st5481_init.c | 4 | ||||
-rw-r--r-- | drivers/isdn/hisax/st5481_usb.c | 68 | ||||
-rw-r--r-- | drivers/isdn/hysdn/hysdn_procconf.c | 2 |
10 files changed, 80 insertions, 59 deletions
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index e1f0d87de0e..0b0ea26023e 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c @@ -287,12 +287,12 @@ divert_dev_init(void) init_waitqueue_head(&rd_queue); #ifdef CONFIG_PROC_FS - isdn_proc_entry = create_proc_entry("isdn", S_IFDIR | S_IRUGO | S_IXUGO, proc_net); + isdn_proc_entry = proc_mkdir("net/isdn", NULL); if (!isdn_proc_entry) return (-1); isdn_divert_entry = create_proc_entry("divert", S_IFREG | S_IRUGO, isdn_proc_entry); if (!isdn_divert_entry) { - remove_proc_entry("isdn", proc_net); + remove_proc_entry("net/isdn", NULL); return (-1); } isdn_divert_entry->proc_fops = &isdn_fops; @@ -312,7 +312,7 @@ divert_dev_deinit(void) #ifdef CONFIG_PROC_FS remove_proc_entry("divert", isdn_proc_entry); - remove_proc_entry("isdn", proc_net); + remove_proc_entry("net/isdn", NULL); #endif /* CONFIG_PROC_FS */ return (0); diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c index 7fdf8ae5be5..27204f4b111 100644 --- a/drivers/isdn/hardware/eicon/diva_didd.c +++ b/drivers/isdn/hardware/eicon/diva_didd.c @@ -30,8 +30,6 @@ static char *DRIVERNAME = static char *DRIVERLNAME = "divadidd"; char *DRIVERRELEASE_DIDD = "2.0"; -static char *main_proc_dir = "eicon"; - MODULE_DESCRIPTION("DIDD table driver for diva drivers"); MODULE_AUTHOR("Cytronics & Melware, Eicon Networks"); MODULE_SUPPORTED_DEVICE("Eicon diva drivers"); @@ -89,7 +87,7 @@ proc_read(char *page, char **start, off_t off, int count, int *eof, static int DIVA_INIT_FUNCTION create_proc(void) { - proc_net_eicon = create_proc_entry(main_proc_dir, S_IFDIR, proc_net); + proc_net_eicon = proc_mkdir("net/eicon", NULL); if (proc_net_eicon) { if ((proc_didd = @@ -105,7 +103,7 @@ static int DIVA_INIT_FUNCTION create_proc(void) static void DIVA_EXIT_FUNCTION remove_proc(void) { remove_proc_entry(DRIVERLNAME, proc_net_eicon); - remove_proc_entry(main_proc_dir, proc_net); + remove_proc_entry("net/eicon", NULL); } static int DIVA_INIT_FUNCTION divadidd_init(void) diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c index b6435589d45..c12efa6f842 100644 --- a/drivers/isdn/hardware/eicon/divasproc.c +++ b/drivers/isdn/hardware/eicon/divasproc.c @@ -381,7 +381,7 @@ int create_adapter_proc(diva_os_xdi_adapter_t * a) char tmp[16]; sprintf(tmp, "%s%d", adapter_dir_name, a->controller); - if (!(de = create_proc_entry(tmp, S_IFDIR, proc_net_eicon))) + if (!(de = proc_mkdir(tmp, proc_net_eicon))) return (0); a->proc_adapter_dir = (void *) de; diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index 8337b0f26cc..4866fc32d8d 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c @@ -61,6 +61,7 @@ static const PCI_ENTRY id_list[] = {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_E,"Digi International", "Digi DataFire Micro V (Europe)"}, {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_A,"Digi International", "Digi DataFire Micro V IOM2 (North America)"}, {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_A,"Digi International", "Digi DataFire Micro V (North America)"}, + {PCI_VENDOR_ID_SITECOM, PCI_DEVICE_ID_SITECOM_DC105V2, "Sitecom Europe", "DC-105 ISDN PCI"}, {0, 0, NULL, NULL}, }; diff --git a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h index 0fda5c89429..9ffaae7c657 100644 --- a/drivers/isdn/hisax/st5481.h +++ b/drivers/isdn/hisax/st5481.h @@ -466,10 +466,10 @@ void st5481_stop(struct st5481_adapter *adapter); #define __debug_variable st5481_debug #include "hisax_debug.h" -#ifdef CONFIG_HISAX_DEBUG - extern int st5481_debug; +#ifdef CONFIG_HISAX_DEBUG + #define DBG_ISO_PACKET(level,urb) \ if (level & __debug_variable) dump_iso_packet(__FUNCTION__,urb) diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c index 2fcd093921d..657817a591f 100644 --- a/drivers/isdn/hisax/st5481_b.c +++ b/drivers/isdn/hisax/st5481_b.c @@ -172,14 +172,18 @@ static void usb_b_out_complete(struct urb *urb, struct pt_regs *regs) test_and_clear_bit(buf_nr, &b_out->busy); if (unlikely(urb->status < 0)) { - if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) { - WARN("urb status %d",urb->status); - if (b_out->busy == 0) { - st5481_usb_pipe_reset(adapter, (bcs->channel+1)*2 | USB_DIR_OUT, NULL, NULL); - } - } else { - DBG(1,"urb killed"); - return; // Give up + switch (urb->status) { + case -ENOENT: + case -ESHUTDOWN: + case -ECONNRESET: + DBG(4,"urb killed status %d", urb->status); + return; // Give up + default: + WARN("urb status %d",urb->status); + if (b_out->busy == 0) { + st5481_usb_pipe_reset(adapter, (bcs->channel+1)*2 | USB_DIR_OUT, NULL, NULL); + } + break; } } diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c index 071b1d31999..941f7022ada 100644 --- a/drivers/isdn/hisax/st5481_d.c +++ b/drivers/isdn/hisax/st5481_d.c @@ -382,16 +382,20 @@ static void usb_d_out_complete(struct urb *urb, struct pt_regs *regs) test_and_clear_bit(buf_nr, &d_out->busy); if (unlikely(urb->status < 0)) { - if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) { - WARN("urb status %d",urb->status); - if (d_out->busy == 0) { - st5481_usb_pipe_reset(adapter, EP_D_OUT | USB_DIR_OUT, fifo_reseted, adapter); - } - return; - } else { - DBG(1,"urb killed"); - return; // Give up + switch (urb->status) { + case -ENOENT: + case -ESHUTDOWN: + case -ECONNRESET: + DBG(1,"urb killed status %d", urb->status); + break; + default: + WARN("urb status %d",urb->status); + if (d_out->busy == 0) { + st5481_usb_pipe_reset(adapter, EP_D_OUT | USB_DIR_OUT, fifo_reseted, adapter); + } + break; } + return; // Give up } FsmEvent(&adapter->d_out.fsm, EV_DOUT_COMPLETE, (void *) buf_nr); @@ -709,14 +713,14 @@ int st5481_setup_d(struct st5481_adapter *adapter) adapter->l1m.fsm = &l1fsm; adapter->l1m.state = ST_L1_F3; - adapter->l1m.debug = 1; + adapter->l1m.debug = st5481_debug & 0x100; adapter->l1m.userdata = adapter; adapter->l1m.printdebug = l1m_debug; FsmInitTimer(&adapter->l1m, &adapter->timer); adapter->d_out.fsm.fsm = &dout_fsm; adapter->d_out.fsm.state = ST_DOUT_NONE; - adapter->d_out.fsm.debug = 1; + adapter->d_out.fsm.debug = st5481_debug & 0x100; adapter->d_out.fsm.userdata = adapter; adapter->d_out.fsm.printdebug = dout_debug; diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c index 7aa810d5d33..2cf5d1a6df6 100644 --- a/drivers/isdn/hisax/st5481_init.c +++ b/drivers/isdn/hisax/st5481_init.c @@ -43,10 +43,10 @@ static int number_of_leds = 2; /* 2 LEDs on the adpater default */ module_param(number_of_leds, int, 0); #ifdef CONFIG_HISAX_DEBUG -static int debug = 0x1; +static int debug = 0; module_param(debug, int, 0); -int st5481_debug; #endif +int st5481_debug; static LIST_HEAD(adapter_list); diff --git a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c index ab62223297a..89fbeb58485 100644 --- a/drivers/isdn/hisax/st5481_usb.c +++ b/drivers/isdn/hisax/st5481_usb.c @@ -132,11 +132,15 @@ static void usb_ctrl_complete(struct urb *urb, struct pt_regs *regs) struct ctrl_msg *ctrl_msg; if (unlikely(urb->status < 0)) { - if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) { - WARN("urb status %d",urb->status); - } else { - DBG(1,"urb killed"); - return; // Give up + switch (urb->status) { + case -ENOENT: + case -ESHUTDOWN: + case -ECONNRESET: + DBG(1,"urb killed status %d", urb->status); + return; // Give up + default: + WARN("urb status %d",urb->status); + break; } } @@ -184,22 +188,22 @@ static void usb_int_complete(struct urb *urb, struct pt_regs *regs) int status; switch (urb->status) { - case 0: - /* success */ - break; - case -ECONNRESET: - case -ENOENT: - case -ESHUTDOWN: - /* this urb is terminated, clean up */ - DBG(1, "urb shutting down with status: %d", urb->status); - return; - default: - WARN("nonzero urb status received: %d", urb->status); - goto exit; + case 0: + /* success */ + break; + case -ECONNRESET: + case -ENOENT: + case -ESHUTDOWN: + /* this urb is terminated, clean up */ + DBG(2, "urb shutting down with status: %d", urb->status); + return; + default: + WARN("nonzero urb status received: %d", urb->status); + goto exit; } - DBG_PACKET(1, data, INT_PKT_SIZE); + DBG_PACKET(2, data, INT_PKT_SIZE); if (urb->actual_length == 0) { goto exit; @@ -250,7 +254,7 @@ int st5481_setup_usb(struct st5481_adapter *adapter) struct urb *urb; u8 *buf; - DBG(1,""); + DBG(2,""); if ((status = usb_reset_configuration (dev)) < 0) { WARN("reset_configuration failed,status=%d",status); @@ -330,15 +334,17 @@ void st5481_release_usb(struct st5481_adapter *adapter) DBG(1,""); // Stop and free Control and Interrupt URBs - usb_unlink_urb(ctrl->urb); + usb_kill_urb(ctrl->urb); if (ctrl->urb->transfer_buffer) kfree(ctrl->urb->transfer_buffer); usb_free_urb(ctrl->urb); + ctrl->urb = NULL; - usb_unlink_urb(intr->urb); + usb_kill_urb(intr->urb); if (intr->urb->transfer_buffer) kfree(intr->urb->transfer_buffer); usb_free_urb(intr->urb); + ctrl->urb = NULL; } /* @@ -406,6 +412,7 @@ fill_isoc_urb(struct urb *urb, struct usb_device *dev, spin_lock_init(&urb->lock); urb->dev=dev; urb->pipe=pipe; + urb->interval = 1; urb->transfer_buffer=buf; urb->number_of_packets = num_packets; urb->transfer_buffer_length=num_packets*packet_size; @@ -452,7 +459,9 @@ st5481_setup_isocpipes(struct urb* urb[2], struct usb_device *dev, if (urb[j]) { if (urb[j]->transfer_buffer) kfree(urb[j]->transfer_buffer); + urb[j]->transfer_buffer = NULL; usb_free_urb(urb[j]); + urb[j] = NULL; } } return retval; @@ -463,10 +472,11 @@ void st5481_release_isocpipes(struct urb* urb[2]) int j; for (j = 0; j < 2; j++) { - usb_unlink_urb(urb[j]); + usb_kill_urb(urb[j]); if (urb[j]->transfer_buffer) kfree(urb[j]->transfer_buffer); usb_free_urb(urb[j]); + urb[j] = NULL; } } @@ -485,11 +495,15 @@ static void usb_in_complete(struct urb *urb, struct pt_regs *regs) int len, count, status; if (unlikely(urb->status < 0)) { - if (urb->status != -ENOENT && urb->status != -ESHUTDOWN) { - WARN("urb status %d",urb->status); - } else { - DBG(1,"urb killed"); - return; // Give up + switch (urb->status) { + case -ENOENT: + case -ESHUTDOWN: + case -ECONNRESET: + DBG(1,"urb killed status %d", urb->status); + return; // Give up + default: + WARN("urb status %d",urb->status); + break; } } diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c index 5da507e532f..639582f61f4 100644 --- a/drivers/isdn/hysdn/hysdn_procconf.c +++ b/drivers/isdn/hysdn/hysdn_procconf.c @@ -394,7 +394,7 @@ hysdn_procconf_init(void) hysdn_card *card; uchar conf_name[20]; - hysdn_proc_entry = create_proc_entry(PROC_SUBDIR_NAME, S_IFDIR | S_IRUGO | S_IXUGO, proc_net); + hysdn_proc_entry = proc_mkdir(PROC_SUBDIR_NAME, proc_net); if (!hysdn_proc_entry) { printk(KERN_ERR "HYSDN: unable to create hysdn subdir\n"); return (-1); |