Index: linux-2.6.20.7/drivers/char/ts0710.h =================================================================== --- linux-2.6.20.7.orig/drivers/char/ts0710.h 2007-04-24 16:04:23.000000000 +0200 +++ linux-2.6.20.7/drivers/char/ts0710.h 2007-04-24 16:04:23.000000000 +0200 @@ -45,7 +45,7 @@ * 11/18/2002 Modified */ -#include +//#include #include #include @@ -58,7 +58,7 @@ #include #include #include -#include +//#include #include #include Index: linux-2.6.20.7/drivers/char/ts0710_mux.c =================================================================== --- linux-2.6.20.7.orig/drivers/char/ts0710_mux.c 2007-04-24 16:04:23.000000000 +0200 +++ linux-2.6.20.7/drivers/char/ts0710_mux.c 2007-04-24 16:26:58.000000000 +0200 @@ -46,7 +46,7 @@ * 11/18/2002 Second version * 04/21/2004 Add GPRS PROC */ -#include +//#include #include #include @@ -70,7 +70,7 @@ #include #include #include -#include +//#include //#include #include @@ -268,8 +268,8 @@ static struct work_struct post_recv_tqueue; static struct tty_struct *mux_table[NR_MUXS]; -static struct termios *mux_termios[NR_MUXS]; -static struct termios *mux_termios_locked[NR_MUXS]; +static struct ktermios *mux_termios[NR_MUXS]; +static struct ktermios *mux_termios_locked[NR_MUXS]; static volatile short int mux_tty[NR_MUXS]; #ifdef min @@ -1894,11 +1894,14 @@ if (test_bit(TTY_THROTTLED, &tty->flags)) { queue_data = 1; } else { + /* if (test_bit (TTY_DONT_FLIP, &tty->flags)) { queue_data = 1; post_recv = 1; - } else if (recv_info->total) { + } else + */ + if (recv_info->total) { queue_data = 1; post_recv = 1; } else if (recv_room < uih_len) { @@ -3149,7 +3152,7 @@ /*For BP UART problem End*/ -static void receive_worker(void *private_) +static void receive_worker(struct work_struct *private_) { struct tty_struct *tty = COMM_FOR_MUX_TTY; int i, count, tbuf_free, tbuf_read; @@ -3440,7 +3443,7 @@ clear_bit(RECV_RUNNING, &mux_recv_flags); } -static void post_recv_worker(void *private_) +static void post_recv_worker(struct work_struct *private_) { ts0710_con *ts0710 = &ts0710_connection; int tty_idx; @@ -3499,11 +3502,14 @@ if (test_bit(TTY_THROTTLED, &tty->flags)) { add_post_recv_queue(&post_recv_q, recv_info); continue; - } else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { + } + /* + else if (test_bit(TTY_DONT_FLIP, &tty->flags)) { post_recv = 1; add_post_recv_queue(&post_recv_q, recv_info); continue; } + */ flow_control = 0; recv_packet2 = recv_info->mux_packet; @@ -3635,7 +3641,7 @@ } } -static void send_worker(void *private_) +static void send_worker(struct work_struct *private_) { ts0710_con *ts0710 = &ts0710_connection; __u8 j; @@ -3893,9 +3899,9 @@ } post_recv_count_flag = 0; - INIT_WORK(&send_tqueue, send_worker, NULL); - INIT_WORK(&receive_tqueue, receive_worker, NULL); - INIT_WORK(&post_recv_tqueue, post_recv_worker, NULL); + INIT_WORK(&send_tqueue, send_worker); + INIT_WORK(&receive_tqueue, receive_worker); + INIT_WORK(&post_recv_tqueue, post_recv_worker); mux_driver = alloc_tty_driver(NR_MUXS); if (!mux_driver) @@ -3904,12 +3910,12 @@ mux_driver->owner = THIS_MODULE; mux_driver->driver_name = "ts0710mux"; mux_driver->name = "mux"; - mux_driver->devfs_name = "mux"; + //mux_driver->devfs_name = "mux"; mux_driver->major = TS0710MUX_MAJOR; mux_driver->minor_start = TS0710MUX_MINOR_START; mux_driver->type = TTY_DRIVER_TYPE_SERIAL; mux_driver->subtype = SERIAL_TYPE_NORMAL; - mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW; + mux_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; mux_driver->init_termios = tty_std_termios; mux_driver->init_termios.c_iflag = 0; @@ -3917,10 +3923,10 @@ mux_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; mux_driver->init_termios.c_lflag = 0; -// mux_driver.ttys = mux_table; + //mux_driver.ttys = mux_table; mux_driver->termios = mux_termios; mux_driver->termios_locked = mux_termios_locked; -// mux_driver.driver_state = mux_state; + //mux_driver.driver_state = mux_state; mux_driver->other = NULL; mux_driver->open = mux_open; Index: linux-2.6.20.7/drivers/char/ts0710_mux_usb.c =================================================================== --- linux-2.6.20.7.orig/drivers/char/ts0710_mux_usb.c 2007-04-24 16:27:30.000000000 +0200 +++ linux-2.6.20.7/drivers/char/ts0710_mux_usb.c 2007-04-24 16:31:51.000000000 +0200 @@ -86,8 +86,8 @@ struct tty_struct *usb_for_mux_tty = NULL; void (*usb_mux_dispatcher)(struct tty_struct *tty) = NULL; void (*usb_mux_sender)(void) = NULL; -void (*ipcusb_ap_to_bp)(unsigned char*, int) = NULL; -void (*ipcusb_bp_to_ap)(unsigned char*, int) = NULL; +void (*ipcusb_ap_to_bp)(const unsigned char*, int) = NULL; +void (*ipcusb_bp_to_ap)(const unsigned char*, int) = NULL; EXPORT_SYMBOL(usb_for_mux_driver); EXPORT_SYMBOL(usb_for_mux_tty); EXPORT_SYMBOL(usb_mux_dispatcher); @@ -222,7 +222,7 @@ inbuf = list_entry(ptr, buf_list_t, list); src_count = inbuf->size; if (dst_count >= src_count) { - memcpy(buf, inbuf->body, src_count); + memcpy((char *)buf, inbuf->body, src_count); ret = src_count; list_del(ptr); kfree(inbuf->body); @@ -282,7 +282,7 @@ spin_unlock(&bvd_ipc->in_buf_lock); } -static void usb_ipc_read_bulk(struct urb *urb, struct pt_regs *regs) +static void usb_ipc_read_bulk(struct urb *urb) { buf_list_t *inbuf; int count = urb->actual_length; @@ -319,7 +319,7 @@ bvd_dbg("usb_ipc_read_bulk: completed!!!"); } -static void usb_ipc_write_bulk(struct urb *urb, struct pt_regs *regs) +static void usb_ipc_write_bulk(struct urb *urb) { callback_times++; bvd_ipc->write_finished_flag = 1; @@ -437,7 +437,7 @@ /*send IN token*/ bvd_ipc->readurb_mux.actual_length = 0; bvd_ipc->readurb_mux.dev = bvd_ipc->ipc_dev; - if (ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) + if ( (ret = usb_submit_urb(&bvd_ipc->readurb_mux, GFP_ATOMIC)) ) printk("ipcusb_xmit_data: usb_submit_urb(read mux bulk)" "failed! status=%d\n", ret); bvd_dbg("ipcusb_xmit_data: Send a IN token successfully!"); @@ -447,7 +447,7 @@ bvd_ipc->write_finished_flag = 0; //printk("%s: clear write_finished_flag:%d\n", __FUNCTION__, bvd_ipc->write_finished_flag); bvd_ipc->writeurb_mux.dev = bvd_ipc->ipc_dev; - if (result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC)) + if ( (result = usb_submit_urb(&bvd_ipc->writeurb_mux, GFP_ATOMIC)) ) warn("ipcusb_xmit_data: funky result! result=%d\n", result); bvd_dbg("ipcusb_xmit_data: usb_submit_urb finished! result:%d", result); @@ -556,7 +556,7 @@ struct usb_config_descriptor *ipccfg; struct usb_interface_descriptor *interface; struct usb_endpoint_descriptor *endpoint; - int ep_cnt, readsize, writesize; + int ep_cnt, readsize=0, writesize=0; char have_bulk_in_mux, have_bulk_out_mux; bvd_dbg("usb_ipc_probe: vendor id 0x%x, device id 0x%x",