Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * USB ZyXEL omni.net LCD PLUS driver |
| 3 | * |
Greg Kroah-Hartman | 4d0dce3 | 2007-06-12 11:43:37 -0700 | [diff] [blame] | 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License version |
| 6 | * 2 as published by the Free Software Foundation. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 8 | * See Documentation/usb/usb-serial.txt for more information on using this |
| 9 | * driver |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | * |
| 11 | * Please report both successes and troubles to the author at omninet@kroah.com |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | */ |
| 13 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | #include <linux/kernel.h> |
| 15 | #include <linux/errno.h> |
| 16 | #include <linux/init.h> |
| 17 | #include <linux/slab.h> |
| 18 | #include <linux/tty.h> |
| 19 | #include <linux/tty_driver.h> |
| 20 | #include <linux/tty_flip.h> |
| 21 | #include <linux/module.h> |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 22 | #include <linux/uaccess.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | #include <linux/usb.h> |
Greg Kroah-Hartman | a969888 | 2006-07-11 21:22:58 -0700 | [diff] [blame] | 24 | #include <linux/usb/serial.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | #define DRIVER_AUTHOR "Alessandro Zummo" |
| 27 | #define DRIVER_DESC "USB ZyXEL omni.net LCD PLUS Driver" |
| 28 | |
| 29 | #define ZYXEL_VENDOR_ID 0x0586 |
| 30 | #define ZYXEL_OMNINET_ID 0x1000 |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 31 | /* This one seems to be a re-branded ZyXEL device */ |
| 32 | #define BT_IGNITIONPRO_ID 0x2000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | |
| 34 | /* function prototypes */ |
Alan Cox | a509a7e | 2009-09-19 13:13:26 -0700 | [diff] [blame] | 35 | static int omninet_open(struct tty_struct *tty, struct usb_serial_port *port); |
Johan Hovold | fbf9477 | 2013-04-16 18:01:23 +0200 | [diff] [blame] | 36 | static void omninet_process_read_urb(struct urb *urb); |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 37 | static void omninet_write_bulk_callback(struct urb *urb); |
| 38 | static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port, |
| 39 | const unsigned char *buf, int count); |
| 40 | static int omninet_write_room(struct tty_struct *tty); |
Alan Stern | f9c99bb | 2009-06-02 11:53:55 -0400 | [diff] [blame] | 41 | static void omninet_disconnect(struct usb_serial *serial); |
Johan Hovold | feffa7c | 2012-10-25 10:29:06 +0200 | [diff] [blame] | 42 | static int omninet_port_probe(struct usb_serial_port *port); |
| 43 | static int omninet_port_remove(struct usb_serial_port *port); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | |
Németh Márton | 7d40d7e | 2010-01-10 15:34:24 +0100 | [diff] [blame] | 45 | static const struct usb_device_id id_table[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | { USB_DEVICE(ZYXEL_VENDOR_ID, ZYXEL_OMNINET_ID) }, |
| 47 | { USB_DEVICE(ZYXEL_VENDOR_ID, BT_IGNITIONPRO_ID) }, |
| 48 | { } /* Terminating entry */ |
| 49 | }; |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 50 | MODULE_DEVICE_TABLE(usb, id_table); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | |
Greg Kroah-Hartman | ea65370 | 2005-06-20 21:15:16 -0700 | [diff] [blame] | 52 | static struct usb_serial_driver zyxel_omninet_device = { |
Greg Kroah-Hartman | 18fcac3 | 2005-06-20 21:15:16 -0700 | [diff] [blame] | 53 | .driver = { |
| 54 | .owner = THIS_MODULE, |
Greg Kroah-Hartman | 269bda1 | 2005-06-20 21:15:16 -0700 | [diff] [blame] | 55 | .name = "omninet", |
Greg Kroah-Hartman | 18fcac3 | 2005-06-20 21:15:16 -0700 | [diff] [blame] | 56 | }, |
Greg Kroah-Hartman | 269bda1 | 2005-06-20 21:15:16 -0700 | [diff] [blame] | 57 | .description = "ZyXEL - omni.net lcd plus usb", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | .id_table = id_table, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | .num_ports = 1, |
Johan Hovold | feffa7c | 2012-10-25 10:29:06 +0200 | [diff] [blame] | 60 | .port_probe = omninet_port_probe, |
| 61 | .port_remove = omninet_port_remove, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 62 | .open = omninet_open, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | .write = omninet_write, |
| 64 | .write_room = omninet_write_room, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | .write_bulk_callback = omninet_write_bulk_callback, |
Johan Hovold | fbf9477 | 2013-04-16 18:01:23 +0200 | [diff] [blame] | 66 | .process_read_urb = omninet_process_read_urb, |
Alan Stern | f9c99bb | 2009-06-02 11:53:55 -0400 | [diff] [blame] | 67 | .disconnect = omninet_disconnect, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | }; |
| 69 | |
Alan Stern | f667dda | 2012-02-23 14:57:18 -0500 | [diff] [blame] | 70 | static struct usb_serial_driver * const serial_drivers[] = { |
| 71 | &zyxel_omninet_device, NULL |
| 72 | }; |
| 73 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 74 | |
Johan Hovold | b42abbc | 2013-04-16 18:01:20 +0200 | [diff] [blame] | 75 | /* |
| 76 | * The protocol. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | * |
| 78 | * The omni.net always exchange 64 bytes of data with the host. The first |
Johan Hovold | b42abbc | 2013-04-16 18:01:20 +0200 | [diff] [blame] | 79 | * four bytes are the control header. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | * |
| 81 | * oh_seq is a sequence number. Don't know if/how it's used. |
| 82 | * oh_len is the length of the data bytes in the packet. |
| 83 | * oh_xxx Bit-mapped, related to handshaking and status info. |
Johan Hovold | b42abbc | 2013-04-16 18:01:20 +0200 | [diff] [blame] | 84 | * I normally set it to 0x03 in transmitted frames. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 85 | * 7: Active when the TA is in a CONNECTed state. |
| 86 | * 6: unknown |
| 87 | * 5: handshaking, unknown |
| 88 | * 4: handshaking, unknown |
| 89 | * 3: unknown, usually 0 |
| 90 | * 2: unknown, usually 0 |
Johan Hovold | b42abbc | 2013-04-16 18:01:20 +0200 | [diff] [blame] | 91 | * 1: handshaking, unknown, usually set to 1 in transmitted frames |
| 92 | * 0: handshaking, unknown, usually set to 1 in transmitted frames |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 93 | * oh_pad Probably a pad byte. |
| 94 | * |
| 95 | * After the header you will find data bytes if oh_len was greater than zero. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 96 | */ |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 97 | struct omninet_header { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 98 | __u8 oh_seq; |
| 99 | __u8 oh_len; |
| 100 | __u8 oh_xxx; |
| 101 | __u8 oh_pad; |
| 102 | }; |
| 103 | |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 104 | struct omninet_data { |
| 105 | __u8 od_outseq; /* Sequence number for bulk_out URBs */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 106 | }; |
| 107 | |
Johan Hovold | feffa7c | 2012-10-25 10:29:06 +0200 | [diff] [blame] | 108 | static int omninet_port_probe(struct usb_serial_port *port) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 109 | { |
Oliver Neukum | 5ec1862 | 2007-03-27 16:02:34 +0200 | [diff] [blame] | 110 | struct omninet_data *od; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 111 | |
Johan Hovold | 81f58c6 | 2013-04-16 18:01:19 +0200 | [diff] [blame] | 112 | od = kzalloc(sizeof(*od), GFP_KERNEL); |
Johan Hovold | feffa7c | 2012-10-25 10:29:06 +0200 | [diff] [blame] | 113 | if (!od) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | return -ENOMEM; |
Johan Hovold | feffa7c | 2012-10-25 10:29:06 +0200 | [diff] [blame] | 115 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | usb_set_serial_port_data(port, od); |
Johan Hovold | feffa7c | 2012-10-25 10:29:06 +0200 | [diff] [blame] | 117 | |
| 118 | return 0; |
| 119 | } |
| 120 | |
| 121 | static int omninet_port_remove(struct usb_serial_port *port) |
| 122 | { |
| 123 | struct omninet_data *od; |
| 124 | |
| 125 | od = usb_get_serial_port_data(port); |
| 126 | kfree(od); |
| 127 | |
Oliver Neukum | 5ec1862 | 2007-03-27 16:02:34 +0200 | [diff] [blame] | 128 | return 0; |
| 129 | } |
| 130 | |
Alan Cox | a509a7e | 2009-09-19 13:13:26 -0700 | [diff] [blame] | 131 | static int omninet_open(struct tty_struct *tty, struct usb_serial_port *port) |
Oliver Neukum | 5ec1862 | 2007-03-27 16:02:34 +0200 | [diff] [blame] | 132 | { |
| 133 | struct usb_serial *serial = port->serial; |
| 134 | struct usb_serial_port *wport; |
Oliver Neukum | 5ec1862 | 2007-03-27 16:02:34 +0200 | [diff] [blame] | 135 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 136 | wport = serial->port[1]; |
Alan Cox | 4a90f09 | 2008-10-13 10:39:46 +0100 | [diff] [blame] | 137 | tty_port_tty_set(&wport->port, tty); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 138 | |
Johan Hovold | fbf9477 | 2013-04-16 18:01:23 +0200 | [diff] [blame] | 139 | return usb_serial_generic_open(tty, port); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | } |
| 141 | |
Johan Hovold | d91641b | 2013-04-16 18:01:21 +0200 | [diff] [blame] | 142 | #define OMNINET_HEADERLEN 4 |
| 143 | #define OMNINET_BULKOUTSIZE 64 |
| 144 | #define OMNINET_PAYLOADSIZE (OMNINET_BULKOUTSIZE - OMNINET_HEADERLEN) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 145 | |
Johan Hovold | a6c042f | 2013-04-16 18:01:22 +0200 | [diff] [blame] | 146 | static void omninet_process_read_urb(struct urb *urb) |
| 147 | { |
| 148 | struct usb_serial_port *port = urb->context; |
| 149 | const struct omninet_header *hdr = urb->transfer_buffer; |
| 150 | const unsigned char *data; |
| 151 | size_t data_len; |
| 152 | |
| 153 | if (urb->actual_length <= OMNINET_HEADERLEN || !hdr->oh_len) |
| 154 | return; |
| 155 | |
| 156 | data = (char *)urb->transfer_buffer + OMNINET_HEADERLEN; |
| 157 | data_len = min_t(size_t, urb->actual_length - OMNINET_HEADERLEN, |
| 158 | hdr->oh_len); |
| 159 | tty_insert_flip_string(&port->port, data, data_len); |
| 160 | tty_flip_buffer_push(&port->port); |
| 161 | } |
| 162 | |
Alan Cox | 95da310 | 2008-07-22 11:09:07 +0100 | [diff] [blame] | 163 | static int omninet_write(struct tty_struct *tty, struct usb_serial_port *port, |
| 164 | const unsigned char *buf, int count) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 165 | { |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 166 | struct usb_serial *serial = port->serial; |
| 167 | struct usb_serial_port *wport = serial->port[1]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 168 | |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 169 | struct omninet_data *od = usb_get_serial_port_data(port); |
| 170 | struct omninet_header *header = (struct omninet_header *) |
| 171 | wport->write_urb->transfer_buffer; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 172 | |
| 173 | int result; |
| 174 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 175 | if (count == 0) { |
Greg Kroah-Hartman | 7b5ba275 | 2012-09-13 17:41:48 -0700 | [diff] [blame] | 176 | dev_dbg(&port->dev, "%s - write request of 0 bytes\n", __func__); |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 177 | return 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 178 | } |
Greg Kroah-Hartman | 507ca9b | 2005-04-23 12:49:16 -0700 | [diff] [blame] | 179 | |
Johan Hovold | 120f9db | 2011-11-06 19:06:22 +0100 | [diff] [blame] | 180 | if (!test_and_clear_bit(0, &port->write_urbs_free)) { |
Greg Kroah-Hartman | 7b5ba275 | 2012-09-13 17:41:48 -0700 | [diff] [blame] | 181 | dev_dbg(&port->dev, "%s - already writing\n", __func__); |
Greg Kroah-Hartman | 507ca9b | 2005-04-23 12:49:16 -0700 | [diff] [blame] | 182 | return 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 183 | } |
| 184 | |
Johan Hovold | d91641b | 2013-04-16 18:01:21 +0200 | [diff] [blame] | 185 | count = (count > OMNINET_PAYLOADSIZE) ? OMNINET_PAYLOADSIZE : count; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 186 | |
Johan Hovold | d91641b | 2013-04-16 18:01:21 +0200 | [diff] [blame] | 187 | memcpy(wport->write_urb->transfer_buffer + OMNINET_HEADERLEN, |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 188 | buf, count); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | |
Greg Kroah-Hartman | 59d33f2 | 2012-09-18 09:58:57 +0100 | [diff] [blame] | 190 | usb_serial_debug_data(&port->dev, __func__, count, |
| 191 | wport->write_urb->transfer_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 192 | |
| 193 | header->oh_seq = od->od_outseq++; |
| 194 | header->oh_len = count; |
| 195 | header->oh_xxx = 0x03; |
| 196 | header->oh_pad = 0x00; |
| 197 | |
| 198 | /* send the data out the bulk port, always 64 bytes */ |
Johan Hovold | d91641b | 2013-04-16 18:01:21 +0200 | [diff] [blame] | 199 | wport->write_urb->transfer_buffer_length = OMNINET_BULKOUTSIZE; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 200 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 201 | result = usb_submit_urb(wport->write_urb, GFP_ATOMIC); |
Greg Kroah-Hartman | 507ca9b | 2005-04-23 12:49:16 -0700 | [diff] [blame] | 202 | if (result) { |
Johan Hovold | 120f9db | 2011-11-06 19:06:22 +0100 | [diff] [blame] | 203 | set_bit(0, &wport->write_urbs_free); |
Johan Hovold | 22a416c | 2012-02-10 13:20:51 +0100 | [diff] [blame] | 204 | dev_err_console(port, |
Greg Kroah-Hartman | 194343d | 2008-08-20 16:56:34 -0700 | [diff] [blame] | 205 | "%s - failed submitting write urb, error %d\n", |
| 206 | __func__, result); |
Greg Kroah-Hartman | 507ca9b | 2005-04-23 12:49:16 -0700 | [diff] [blame] | 207 | } else |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 | result = count; |
| 209 | |
| 210 | return result; |
| 211 | } |
| 212 | |
| 213 | |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 214 | static int omninet_write_room(struct tty_struct *tty) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 215 | { |
Alan Cox | 95da310 | 2008-07-22 11:09:07 +0100 | [diff] [blame] | 216 | struct usb_serial_port *port = tty->driver_data; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 217 | struct usb_serial *serial = port->serial; |
| 218 | struct usb_serial_port *wport = serial->port[1]; |
| 219 | |
Alan Cox | a5b6f60 | 2008-04-08 17:16:06 +0100 | [diff] [blame] | 220 | int room = 0; /* Default: no room */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 221 | |
Johan Hovold | 120f9db | 2011-11-06 19:06:22 +0100 | [diff] [blame] | 222 | if (test_bit(0, &wport->write_urbs_free)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 223 | room = wport->bulk_out_size - OMNINET_HEADERLEN; |
| 224 | |
Greg Kroah-Hartman | 7b5ba275 | 2012-09-13 17:41:48 -0700 | [diff] [blame] | 225 | dev_dbg(&port->dev, "%s - returns %d\n", __func__, room); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 227 | return room; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 228 | } |
| 229 | |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 230 | static void omninet_write_bulk_callback(struct urb *urb) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 231 | { |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 232 | /* struct omninet_header *header = (struct omninet_header *) |
| 233 | urb->transfer_buffer; */ |
Ming Lei | cdc9779 | 2008-02-24 18:41:47 +0800 | [diff] [blame] | 234 | struct usb_serial_port *port = urb->context; |
Greg Kroah-Hartman | fdc2deb | 2007-06-15 15:44:13 -0700 | [diff] [blame] | 235 | int status = urb->status; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 236 | |
Johan Hovold | 120f9db | 2011-11-06 19:06:22 +0100 | [diff] [blame] | 237 | set_bit(0, &port->write_urbs_free); |
Greg Kroah-Hartman | fdc2deb | 2007-06-15 15:44:13 -0700 | [diff] [blame] | 238 | if (status) { |
Greg Kroah-Hartman | 7b5ba275 | 2012-09-13 17:41:48 -0700 | [diff] [blame] | 239 | dev_dbg(&port->dev, "%s - nonzero write bulk status received: %d\n", |
| 240 | __func__, status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | return; |
| 242 | } |
| 243 | |
Pete Zaitcev | cf2c748 | 2006-05-22 21:58:49 -0700 | [diff] [blame] | 244 | usb_serial_port_softint(port); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 245 | } |
| 246 | |
| 247 | |
Alan Stern | f9c99bb | 2009-06-02 11:53:55 -0400 | [diff] [blame] | 248 | static void omninet_disconnect(struct usb_serial *serial) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 249 | { |
Oliver Neukum | 5ec1862 | 2007-03-27 16:02:34 +0200 | [diff] [blame] | 250 | struct usb_serial_port *wport = serial->port[1]; |
Alan Stern | f9c99bb | 2009-06-02 11:53:55 -0400 | [diff] [blame] | 251 | |
Oliver Neukum | 5ec1862 | 2007-03-27 16:02:34 +0200 | [diff] [blame] | 252 | usb_kill_urb(wport->write_urb); |
Alan Stern | f9c99bb | 2009-06-02 11:53:55 -0400 | [diff] [blame] | 253 | } |
| 254 | |
Greg Kroah-Hartman | 68e2411 | 2012-05-08 15:46:14 -0700 | [diff] [blame] | 255 | module_usb_serial_driver(serial_drivers, id_table); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 256 | |
Alan Cox | f89d0df | 2008-07-22 11:15:54 +0100 | [diff] [blame] | 257 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 258 | MODULE_DESCRIPTION(DRIVER_DESC); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 259 | MODULE_LICENSE("GPL"); |