diff options
| -rw-r--r-- | drivers/usb/serial/aircable.c | 7 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 59 | ||||
| -rw-r--r-- | drivers/usb/serial/generic.c | 150 | ||||
| -rw-r--r-- | include/linux/usb/serial.h | 8 |
4 files changed, 48 insertions, 176 deletions
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c index cac5162937b3..8a990a763c21 100644 --- a/drivers/usb/serial/aircable.c +++ b/drivers/usb/serial/aircable.c | |||
| @@ -84,9 +84,10 @@ static const struct usb_device_id id_table[] = { | |||
| 84 | MODULE_DEVICE_TABLE(usb, id_table); | 84 | MODULE_DEVICE_TABLE(usb, id_table); |
| 85 | 85 | ||
| 86 | static int aircable_prepare_write_buffer(struct usb_serial_port *port, | 86 | static int aircable_prepare_write_buffer(struct usb_serial_port *port, |
| 87 | void **dest, size_t size, const void *src, size_t count) | 87 | void *dest, size_t size) |
| 88 | { | 88 | { |
| 89 | unsigned char *buf = *dest; | 89 | int count; |
| 90 | unsigned char *buf = dest; | ||
| 90 | 91 | ||
| 91 | count = kfifo_out_locked(&port->write_fifo, buf + HCI_HEADER_LENGTH, | 92 | count = kfifo_out_locked(&port->write_fifo, buf + HCI_HEADER_LENGTH, |
| 92 | size - HCI_HEADER_LENGTH, &port->lock); | 93 | size - HCI_HEADER_LENGTH, &port->lock); |
| @@ -185,8 +186,6 @@ static struct usb_serial_driver aircable_device = { | |||
| 185 | .id_table = id_table, | 186 | .id_table = id_table, |
| 186 | .num_ports = 1, | 187 | .num_ports = 1, |
| 187 | .bulk_out_size = HCI_COMPLETE_FRAME, | 188 | .bulk_out_size = HCI_COMPLETE_FRAME, |
| 188 | /* Must modify prepare_write_buffer if multi_urb_write is changed. */ | ||
| 189 | .multi_urb_write = 0, | ||
| 190 | .probe = aircable_probe, | 189 | .probe = aircable_probe, |
| 191 | .process_read_urb = aircable_process_read_urb, | 190 | .process_read_urb = aircable_process_read_urb, |
| 192 | .prepare_write_buffer = aircable_prepare_write_buffer, | 191 | .prepare_write_buffer = aircable_prepare_write_buffer, |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index f515f32cde68..14f7a34d614c 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
| @@ -781,7 +781,7 @@ static void ftdi_close(struct usb_serial_port *port); | |||
| 781 | static void ftdi_dtr_rts(struct usb_serial_port *port, int on); | 781 | static void ftdi_dtr_rts(struct usb_serial_port *port, int on); |
| 782 | static void ftdi_process_read_urb(struct urb *urb); | 782 | static void ftdi_process_read_urb(struct urb *urb); |
| 783 | static int ftdi_prepare_write_buffer(struct usb_serial_port *port, | 783 | static int ftdi_prepare_write_buffer(struct usb_serial_port *port, |
| 784 | void **dest, size_t size, const void *buf, size_t count); | 784 | void *dest, size_t size); |
| 785 | static void ftdi_set_termios(struct tty_struct *tty, | 785 | static void ftdi_set_termios(struct tty_struct *tty, |
| 786 | struct usb_serial_port *port, struct ktermios *old); | 786 | struct usb_serial_port *port, struct ktermios *old); |
| 787 | static int ftdi_tiocmget(struct tty_struct *tty, struct file *file); | 787 | static int ftdi_tiocmget(struct tty_struct *tty, struct file *file); |
| @@ -808,8 +808,7 @@ static struct usb_serial_driver ftdi_sio_device = { | |||
| 808 | .id_table = id_table_combined, | 808 | .id_table = id_table_combined, |
| 809 | .num_ports = 1, | 809 | .num_ports = 1, |
| 810 | .bulk_in_size = 512, | 810 | .bulk_in_size = 512, |
| 811 | /* Must modify prepare_write_buffer if multi_urb_write is changed. */ | 811 | .bulk_out_size = 256, |
| 812 | .multi_urb_write = 1, | ||
| 813 | .probe = ftdi_sio_probe, | 812 | .probe = ftdi_sio_probe, |
| 814 | .port_probe = ftdi_sio_port_probe, | 813 | .port_probe = ftdi_sio_port_probe, |
| 815 | .port_remove = ftdi_sio_port_remove, | 814 | .port_remove = ftdi_sio_port_remove, |
| @@ -1531,15 +1530,6 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) | |||
| 1531 | quirk->port_probe(priv); | 1530 | quirk->port_probe(priv); |
| 1532 | 1531 | ||
| 1533 | priv->port = port; | 1532 | priv->port = port; |
| 1534 | |||
| 1535 | /* Free port's existing write urb and transfer buffer. */ | ||
| 1536 | if (port->write_urb) { | ||
| 1537 | usb_free_urb(port->write_urb); | ||
| 1538 | port->write_urb = NULL; | ||
| 1539 | } | ||
| 1540 | kfree(port->bulk_out_buffer); | ||
| 1541 | port->bulk_out_buffer = NULL; | ||
| 1542 | |||
| 1543 | usb_set_serial_port_data(port, priv); | 1533 | usb_set_serial_port_data(port, priv); |
| 1544 | 1534 | ||
| 1545 | ftdi_determine_type(port); | 1535 | ftdi_determine_type(port); |
| @@ -1734,8 +1724,7 @@ static void ftdi_close(struct usb_serial_port *port) | |||
| 1734 | 1724 | ||
| 1735 | dbg("%s", __func__); | 1725 | dbg("%s", __func__); |
| 1736 | 1726 | ||
| 1737 | /* shutdown our bulk read */ | 1727 | usb_serial_generic_close(port); |
| 1738 | usb_kill_urb(port->read_urb); | ||
| 1739 | kref_put(&priv->kref, ftdi_sio_priv_release); | 1728 | kref_put(&priv->kref, ftdi_sio_priv_release); |
| 1740 | } | 1729 | } |
| 1741 | 1730 | ||
| @@ -1747,40 +1736,34 @@ static void ftdi_close(struct usb_serial_port *port) | |||
| 1747 | * The new devices do not require this byte | 1736 | * The new devices do not require this byte |
| 1748 | */ | 1737 | */ |
| 1749 | static int ftdi_prepare_write_buffer(struct usb_serial_port *port, | 1738 | static int ftdi_prepare_write_buffer(struct usb_serial_port *port, |
| 1750 | void **dest, size_t size, const void *src, size_t count) | 1739 | void *dest, size_t size) |
| 1751 | { | 1740 | { |
| 1752 | struct ftdi_private *priv; | 1741 | struct ftdi_private *priv; |
| 1753 | unsigned char *buffer; | 1742 | int count; |
| 1754 | int len; | 1743 | unsigned long flags; |
| 1755 | 1744 | ||
| 1756 | priv = usb_get_serial_port_data(port); | 1745 | priv = usb_get_serial_port_data(port); |
| 1757 | 1746 | ||
| 1758 | len = count; | ||
| 1759 | if (priv->chip_type == SIO && count != 0) | ||
| 1760 | len += ((count - 1) / (priv->max_packet_size - 1)) + 1; | ||
| 1761 | |||
| 1762 | buffer = kmalloc(len, GFP_ATOMIC); | ||
| 1763 | if (!buffer) { | ||
| 1764 | dev_err(&port->dev, "%s - could not allocate buffer\n", | ||
| 1765 | __func__); | ||
| 1766 | return -ENOMEM; | ||
| 1767 | } | ||
| 1768 | |||
| 1769 | if (priv->chip_type == SIO) { | 1747 | if (priv->chip_type == SIO) { |
| 1770 | int i, msg_len; | 1748 | unsigned char *buffer = dest; |
| 1771 | 1749 | int i, len, c; | |
| 1772 | for (i = 0; i < len; i += priv->max_packet_size) { | 1750 | |
| 1773 | msg_len = min_t(int, len - i, priv->max_packet_size) - 1; | 1751 | count = 0; |
| 1774 | buffer[i] = (msg_len << 2) + 1; | 1752 | spin_lock_irqsave(&port->lock, flags); |
| 1775 | memcpy(&buffer[i + 1], src, msg_len); | 1753 | for (i = 0; i < size - 1; i += priv->max_packet_size) { |
| 1776 | src += msg_len; | 1754 | len = min_t(int, size - i, priv->max_packet_size) - 1; |
| 1755 | buffer[i] = (len << 2) + 1; | ||
| 1756 | c = kfifo_out(&port->write_fifo, &buffer[i + 1], len); | ||
| 1757 | if (!c) | ||
| 1758 | break; | ||
| 1759 | count += c + 1; | ||
| 1777 | } | 1760 | } |
| 1761 | spin_unlock_irqrestore(&port->lock, flags); | ||
| 1778 | } else { | 1762 | } else { |
| 1779 | memcpy(buffer, src, count); | 1763 | count = kfifo_out_locked(&port->write_fifo, dest, size, |
| 1764 | &port->lock); | ||
| 1780 | } | 1765 | } |
| 1781 | 1766 | ||
| 1782 | *dest = buffer; | ||
| 1783 | |||
| 1784 | return count; | 1767 | return count; |
| 1785 | } | 1768 | } |
| 1786 | 1769 | ||
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 3ae17840175c..fcd30b841559 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
| @@ -26,8 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | static int debug; | 27 | static int debug; |
| 28 | 28 | ||
| 29 | #define MAX_TX_URBS 40 | ||
| 30 | |||
| 31 | #ifdef CONFIG_USB_SERIAL_GENERIC | 29 | #ifdef CONFIG_USB_SERIAL_GENERIC |
| 32 | 30 | ||
| 33 | static int generic_probe(struct usb_interface *interface, | 31 | static int generic_probe(struct usb_interface *interface, |
| @@ -172,90 +170,9 @@ void usb_serial_generic_close(struct usb_serial_port *port) | |||
| 172 | EXPORT_SYMBOL_GPL(usb_serial_generic_close); | 170 | EXPORT_SYMBOL_GPL(usb_serial_generic_close); |
| 173 | 171 | ||
| 174 | int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, | 172 | int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, |
| 175 | void **dest, size_t size, const void *src, size_t count) | 173 | void *dest, size_t size) |
| 176 | { | 174 | { |
| 177 | if (!*dest) { | 175 | return kfifo_out_locked(&port->write_fifo, dest, size, &port->lock); |
| 178 | size = count; | ||
| 179 | *dest = kmalloc(count, GFP_ATOMIC); | ||
| 180 | if (!*dest) { | ||
| 181 | dev_err(&port->dev, "%s - could not allocate buffer\n", | ||
| 182 | __func__); | ||
| 183 | return -ENOMEM; | ||
| 184 | } | ||
| 185 | } | ||
| 186 | if (src) { | ||
| 187 | count = size; | ||
| 188 | memcpy(*dest, src, size); | ||
| 189 | } else { | ||
| 190 | count = kfifo_out_locked(&port->write_fifo, *dest, size, | ||
| 191 | &port->lock); | ||
| 192 | } | ||
| 193 | return count; | ||
| 194 | } | ||
| 195 | EXPORT_SYMBOL_GPL(usb_serial_generic_prepare_write_buffer); | ||
| 196 | |||
| 197 | static int usb_serial_multi_urb_write(struct tty_struct *tty, | ||
| 198 | struct usb_serial_port *port, const unsigned char *buf, int count) | ||
| 199 | { | ||
| 200 | unsigned long flags; | ||
| 201 | struct urb *urb; | ||
| 202 | void *buffer; | ||
| 203 | int status; | ||
| 204 | |||
| 205 | spin_lock_irqsave(&port->lock, flags); | ||
| 206 | if (port->tx_urbs == MAX_TX_URBS) { | ||
| 207 | spin_unlock_irqrestore(&port->lock, flags); | ||
| 208 | dbg("%s - write limit hit", __func__); | ||
| 209 | return 0; | ||
| 210 | } | ||
| 211 | port->tx_urbs++; | ||
| 212 | spin_unlock_irqrestore(&port->lock, flags); | ||
| 213 | |||
| 214 | urb = usb_alloc_urb(0, GFP_ATOMIC); | ||
| 215 | if (!urb) { | ||
| 216 | dev_err(&port->dev, "%s - no free urbs available\n", __func__); | ||
| 217 | status = -ENOMEM; | ||
| 218 | goto err_urb; | ||
| 219 | } | ||
| 220 | |||
| 221 | buffer = NULL; | ||
| 222 | count = min_t(int, count, PAGE_SIZE); | ||
| 223 | count = port->serial->type->prepare_write_buffer(port, &buffer, 0, | ||
| 224 | buf, count); | ||
| 225 | if (count < 0) { | ||
| 226 | status = count; | ||
| 227 | goto err_buf; | ||
| 228 | } | ||
| 229 | usb_serial_debug_data(debug, &port->dev, __func__, count, buffer); | ||
| 230 | usb_fill_bulk_urb(urb, port->serial->dev, | ||
| 231 | usb_sndbulkpipe(port->serial->dev, | ||
| 232 | port->bulk_out_endpointAddress), | ||
| 233 | buffer, count, | ||
| 234 | port->serial->type->write_bulk_callback, port); | ||
| 235 | |||
| 236 | status = usb_submit_urb(urb, GFP_ATOMIC); | ||
| 237 | if (status) { | ||
| 238 | dev_err(&port->dev, "%s - error submitting urb: %d\n", | ||
| 239 | __func__, status); | ||
| 240 | goto err; | ||
| 241 | } | ||
| 242 | spin_lock_irqsave(&port->lock, flags); | ||
| 243 | port->tx_bytes += urb->transfer_buffer_length; | ||
| 244 | spin_unlock_irqrestore(&port->lock, flags); | ||
| 245 | |||
| 246 | usb_free_urb(urb); | ||
| 247 | |||
| 248 | return count; | ||
| 249 | err: | ||
| 250 | kfree(buffer); | ||
| 251 | err_buf: | ||
| 252 | usb_free_urb(urb); | ||
| 253 | err_urb: | ||
| 254 | spin_lock_irqsave(&port->lock, flags); | ||
| 255 | port->tx_urbs--; | ||
| 256 | spin_unlock_irqrestore(&port->lock, flags); | ||
| 257 | |||
| 258 | return status; | ||
| 259 | } | 176 | } |
| 260 | 177 | ||
| 261 | /** | 178 | /** |
| @@ -286,8 +203,8 @@ retry: | |||
| 286 | 203 | ||
| 287 | urb = port->write_urbs[i]; | 204 | urb = port->write_urbs[i]; |
| 288 | count = port->serial->type->prepare_write_buffer(port, | 205 | count = port->serial->type->prepare_write_buffer(port, |
| 289 | &urb->transfer_buffer, | 206 | urb->transfer_buffer, |
| 290 | port->bulk_out_size, NULL, 0); | 207 | port->bulk_out_size); |
| 291 | urb->transfer_buffer_length = count; | 208 | urb->transfer_buffer_length = count; |
| 292 | usb_serial_debug_data(debug, &port->dev, __func__, count, | 209 | usb_serial_debug_data(debug, &port->dev, __func__, count, |
| 293 | urb->transfer_buffer); | 210 | urb->transfer_buffer); |
| @@ -328,7 +245,6 @@ retry: | |||
| 328 | int usb_serial_generic_write(struct tty_struct *tty, | 245 | int usb_serial_generic_write(struct tty_struct *tty, |
| 329 | struct usb_serial_port *port, const unsigned char *buf, int count) | 246 | struct usb_serial_port *port, const unsigned char *buf, int count) |
| 330 | { | 247 | { |
| 331 | struct usb_serial *serial = port->serial; | ||
| 332 | int result; | 248 | int result; |
| 333 | 249 | ||
| 334 | dbg("%s - port %d", __func__, port->number); | 250 | dbg("%s - port %d", __func__, port->number); |
| @@ -340,23 +256,18 @@ int usb_serial_generic_write(struct tty_struct *tty, | |||
| 340 | if (!count) | 256 | if (!count) |
| 341 | return 0; | 257 | return 0; |
| 342 | 258 | ||
| 343 | if (serial->type->multi_urb_write) | ||
| 344 | return usb_serial_multi_urb_write(tty, port, buf, count); | ||
| 345 | |||
| 346 | count = kfifo_in_locked(&port->write_fifo, buf, count, &port->lock); | 259 | count = kfifo_in_locked(&port->write_fifo, buf, count, &port->lock); |
| 347 | result = usb_serial_generic_write_start(port); | 260 | result = usb_serial_generic_write_start(port); |
| 261 | if (result) | ||
| 262 | return result; | ||
| 348 | 263 | ||
| 349 | if (result >= 0) | 264 | return count; |
| 350 | result = count; | ||
| 351 | |||
| 352 | return result; | ||
| 353 | } | 265 | } |
| 354 | EXPORT_SYMBOL_GPL(usb_serial_generic_write); | 266 | EXPORT_SYMBOL_GPL(usb_serial_generic_write); |
| 355 | 267 | ||
| 356 | int usb_serial_generic_write_room(struct tty_struct *tty) | 268 | int usb_serial_generic_write_room(struct tty_struct *tty) |
| 357 | { | 269 | { |
| 358 | struct usb_serial_port *port = tty->driver_data; | 270 | struct usb_serial_port *port = tty->driver_data; |
| 359 | struct usb_serial *serial = port->serial; | ||
| 360 | unsigned long flags; | 271 | unsigned long flags; |
| 361 | int room; | 272 | int room; |
| 362 | 273 | ||
| @@ -366,10 +277,7 @@ int usb_serial_generic_write_room(struct tty_struct *tty) | |||
| 366 | return 0; | 277 | return 0; |
| 367 | 278 | ||
| 368 | spin_lock_irqsave(&port->lock, flags); | 279 | spin_lock_irqsave(&port->lock, flags); |
| 369 | if (serial->type->multi_urb_write) | 280 | room = kfifo_avail(&port->write_fifo); |
| 370 | room = (MAX_TX_URBS - port->tx_urbs) * PAGE_SIZE; | ||
| 371 | else | ||
| 372 | room = kfifo_avail(&port->write_fifo); | ||
| 373 | spin_unlock_irqrestore(&port->lock, flags); | 281 | spin_unlock_irqrestore(&port->lock, flags); |
| 374 | 282 | ||
| 375 | dbg("%s - returns %d", __func__, room); | 283 | dbg("%s - returns %d", __func__, room); |
| @@ -379,7 +287,6 @@ int usb_serial_generic_write_room(struct tty_struct *tty) | |||
| 379 | int usb_serial_generic_chars_in_buffer(struct tty_struct *tty) | 287 | int usb_serial_generic_chars_in_buffer(struct tty_struct *tty) |
| 380 | { | 288 | { |
| 381 | struct usb_serial_port *port = tty->driver_data; | 289 | struct usb_serial_port *port = tty->driver_data; |
| 382 | struct usb_serial *serial = port->serial; | ||
| 383 | unsigned long flags; | 290 | unsigned long flags; |
| 384 | int chars; | 291 | int chars; |
| 385 | 292 | ||
| @@ -389,10 +296,7 @@ int usb_serial_generic_chars_in_buffer(struct tty_struct *tty) | |||
| 389 | return 0; | 296 | return 0; |
| 390 | 297 | ||
| 391 | spin_lock_irqsave(&port->lock, flags); | 298 | spin_lock_irqsave(&port->lock, flags); |
| 392 | if (serial->type->multi_urb_write) | 299 | chars = kfifo_len(&port->write_fifo) + port->tx_bytes; |
| 393 | chars = port->tx_bytes; | ||
| 394 | else | ||
| 395 | chars = kfifo_len(&port->write_fifo) + port->tx_bytes; | ||
| 396 | spin_unlock_irqrestore(&port->lock, flags); | 300 | spin_unlock_irqrestore(&port->lock, flags); |
| 397 | 301 | ||
| 398 | dbg("%s - returns %d", __func__, chars); | 302 | dbg("%s - returns %d", __func__, chars); |
| @@ -479,35 +383,25 @@ void usb_serial_generic_write_bulk_callback(struct urb *urb) | |||
| 479 | 383 | ||
| 480 | dbg("%s - port %d", __func__, port->number); | 384 | dbg("%s - port %d", __func__, port->number); |
| 481 | 385 | ||
| 482 | if (port->serial->type->multi_urb_write) { | 386 | for (i = 0; i < ARRAY_SIZE(port->write_urbs); ++i) |
| 483 | kfree(urb->transfer_buffer); | 387 | if (port->write_urbs[i] == urb) |
| 388 | break; | ||
| 484 | 389 | ||
| 485 | spin_lock_irqsave(&port->lock, flags); | 390 | spin_lock_irqsave(&port->lock, flags); |
| 486 | port->tx_bytes -= urb->transfer_buffer_length; | 391 | port->tx_bytes -= urb->transfer_buffer_length; |
| 487 | port->tx_urbs--; | 392 | set_bit(i, &port->write_urbs_free); |
| 488 | spin_unlock_irqrestore(&port->lock, flags); | 393 | spin_unlock_irqrestore(&port->lock, flags); |
| 489 | } else { | 394 | |
| 490 | for (i = 0; i < ARRAY_SIZE(port->write_urbs); ++i) | 395 | if (status) { |
| 491 | if (port->write_urbs[i] == urb) | 396 | dbg("%s - non-zero urb status: %d", __func__, status); |
| 492 | break; | ||
| 493 | 397 | ||
| 494 | spin_lock_irqsave(&port->lock, flags); | 398 | spin_lock_irqsave(&port->lock, flags); |
| 495 | port->tx_bytes -= urb->transfer_buffer_length; | 399 | kfifo_reset_out(&port->write_fifo); |
| 496 | set_bit(i, &port->write_urbs_free); | ||
| 497 | spin_unlock_irqrestore(&port->lock, flags); | 400 | spin_unlock_irqrestore(&port->lock, flags); |
| 498 | 401 | } else { | |
| 499 | if (status) { | 402 | usb_serial_generic_write_start(port); |
| 500 | spin_lock_irqsave(&port->lock, flags); | ||
| 501 | kfifo_reset_out(&port->write_fifo); | ||
| 502 | spin_unlock_irqrestore(&port->lock, flags); | ||
| 503 | } else { | ||
| 504 | usb_serial_generic_write_start(port); | ||
| 505 | } | ||
| 506 | } | 403 | } |
| 507 | 404 | ||
| 508 | if (status) | ||
| 509 | dbg("%s - non-zero urb status: %d", __func__, status); | ||
| 510 | |||
| 511 | usb_serial_port_softint(port); | 405 | usb_serial_port_softint(port); |
| 512 | } | 406 | } |
| 513 | EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback); | 407 | EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback); |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 70b6d6b28997..061c997ae0cf 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -67,7 +67,6 @@ enum port_dev_state { | |||
| 67 | * @write_urbs: pointers to the bulk out urbs for this port | 67 | * @write_urbs: pointers to the bulk out urbs for this port |
| 68 | * @write_urbs_free: status bitmap the for bulk out urbs | 68 | * @write_urbs_free: status bitmap the for bulk out urbs |
| 69 | * @tx_bytes: number of bytes currently in host stack queues | 69 | * @tx_bytes: number of bytes currently in host stack queues |
| 70 | * @tx_urbs: number of urbs currently in host stack queues | ||
| 71 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this | 70 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this |
| 72 | * port. | 71 | * port. |
| 73 | * @flags: usb serial port flags | 72 | * @flags: usb serial port flags |
| @@ -112,7 +111,6 @@ struct usb_serial_port { | |||
| 112 | __u8 bulk_out_endpointAddress; | 111 | __u8 bulk_out_endpointAddress; |
| 113 | 112 | ||
| 114 | int tx_bytes; | 113 | int tx_bytes; |
| 115 | int tx_urbs; | ||
| 116 | 114 | ||
| 117 | unsigned long flags; | 115 | unsigned long flags; |
| 118 | wait_queue_head_t write_wait; | 116 | wait_queue_head_t write_wait; |
| @@ -238,8 +236,6 @@ struct usb_serial_driver { | |||
| 238 | struct usb_driver *usb_driver; | 236 | struct usb_driver *usb_driver; |
| 239 | struct usb_dynids dynids; | 237 | struct usb_dynids dynids; |
| 240 | 238 | ||
| 241 | unsigned char multi_urb_write:1; | ||
| 242 | |||
| 243 | size_t bulk_in_size; | 239 | size_t bulk_in_size; |
| 244 | size_t bulk_out_size; | 240 | size_t bulk_out_size; |
| 245 | 241 | ||
| @@ -291,7 +287,7 @@ struct usb_serial_driver { | |||
| 291 | void (*process_read_urb)(struct urb *urb); | 287 | void (*process_read_urb)(struct urb *urb); |
| 292 | /* Called by the generic write implementation */ | 288 | /* Called by the generic write implementation */ |
| 293 | int (*prepare_write_buffer)(struct usb_serial_port *port, | 289 | int (*prepare_write_buffer)(struct usb_serial_port *port, |
| 294 | void **dest, size_t size, const void *src, size_t count); | 290 | void *dest, size_t size); |
| 295 | }; | 291 | }; |
| 296 | #define to_usb_serial_driver(d) \ | 292 | #define to_usb_serial_driver(d) \ |
| 297 | container_of(d, struct usb_serial_driver, driver) | 293 | container_of(d, struct usb_serial_driver, driver) |
| @@ -345,7 +341,7 @@ extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, | |||
| 345 | gfp_t mem_flags); | 341 | gfp_t mem_flags); |
| 346 | extern void usb_serial_generic_process_read_urb(struct urb *urb); | 342 | extern void usb_serial_generic_process_read_urb(struct urb *urb); |
| 347 | extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, | 343 | extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, |
| 348 | void **dest, size_t size, const void *src, size_t count); | 344 | void *dest, size_t size); |
| 349 | extern int usb_serial_handle_sysrq_char(struct tty_struct *tty, | 345 | extern int usb_serial_handle_sysrq_char(struct tty_struct *tty, |
| 350 | struct usb_serial_port *port, | 346 | struct usb_serial_port *port, |
| 351 | unsigned int ch); | 347 | unsigned int ch); |
