diff options
Diffstat (limited to 'drivers/usb/serial/aircable.c')
-rw-r--r-- | drivers/usb/serial/aircable.c | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c index 2cbdc8f230b8..365db1097bfd 100644 --- a/drivers/usb/serial/aircable.c +++ b/drivers/usb/serial/aircable.c | |||
@@ -468,10 +468,6 @@ static void aircable_read_bulk_callback(struct urb *urb) | |||
468 | 468 | ||
469 | if (status) { | 469 | if (status) { |
470 | dbg("%s - urb status = %d", __func__, status); | 470 | dbg("%s - urb status = %d", __func__, status); |
471 | if (!port->port.count) { | ||
472 | dbg("%s - port is closed, exiting.", __func__); | ||
473 | return; | ||
474 | } | ||
475 | if (status == -EPROTO) { | 471 | if (status == -EPROTO) { |
476 | dbg("%s - caught -EPROTO, resubmitting the urb", | 472 | dbg("%s - caught -EPROTO, resubmitting the urb", |
477 | __func__); | 473 | __func__); |
@@ -530,23 +526,19 @@ static void aircable_read_bulk_callback(struct urb *urb) | |||
530 | } | 526 | } |
531 | tty_kref_put(tty); | 527 | tty_kref_put(tty); |
532 | 528 | ||
533 | /* Schedule the next read _if_ we are still open */ | 529 | /* Schedule the next read */ |
534 | if (port->port.count) { | 530 | usb_fill_bulk_urb(port->read_urb, port->serial->dev, |
535 | usb_fill_bulk_urb(port->read_urb, port->serial->dev, | 531 | usb_rcvbulkpipe(port->serial->dev, |
536 | usb_rcvbulkpipe(port->serial->dev, | 532 | port->bulk_in_endpointAddress), |
537 | port->bulk_in_endpointAddress), | 533 | port->read_urb->transfer_buffer, |
538 | port->read_urb->transfer_buffer, | 534 | port->read_urb->transfer_buffer_length, |
539 | port->read_urb->transfer_buffer_length, | 535 | aircable_read_bulk_callback, port); |
540 | aircable_read_bulk_callback, port); | 536 | |
541 | 537 | result = usb_submit_urb(urb, GFP_ATOMIC); | |
542 | result = usb_submit_urb(urb, GFP_ATOMIC); | 538 | if (result && result != -EPERM) |
543 | if (result) | 539 | dev_err(&urb->dev->dev, |
544 | dev_err(&urb->dev->dev, | 540 | "%s - failed resubmitting read urb, error %d\n", |
545 | "%s - failed resubmitting read urb, error %d\n", | 541 | __func__, result); |
546 | __func__, result); | ||
547 | } | ||
548 | |||
549 | return; | ||
550 | } | 542 | } |
551 | 543 | ||
552 | /* Based on ftdi_sio.c throttle */ | 544 | /* Based on ftdi_sio.c throttle */ |